1 (function(e, a) { for(var i in a) e[i] = a[i]; if(a.__esModule) Object.defineProperty(e, "__esModule", { value: true }); }(exports,
2 /******/ (() => { // webpackBootstrap
4 /******/ var __webpack_modules__ = ([
11 module.exports = require("path");;
15 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
18 /* --------------------------------------------------------------------------------------------
19 * Copyright (c) Microsoft Corporation. All rights reserved.
20 * Licensed under the MIT License. See License.txt in the project root for license information.
21 * ------------------------------------------------------------------------------------------ */
22 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
23 if (k2 === undefined) k2 = k;
24 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
25 }) : (function(o, m, k, k2) {
26 if (k2 === undefined) k2 = k;
29 var __exportStar = (this && this.__exportStar) || function(m, exports) {
30 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
32 Object.defineProperty(exports, "__esModule", ({ value: true }));
33 exports.createProtocolConnection = void 0;
34 const node_1 = __webpack_require__(5);
35 __exportStar(__webpack_require__(5), exports);
36 __exportStar(__webpack_require__(25), exports);
37 function createProtocolConnection(input, output, logger, options) {
38 return node_1.createMessageConnection(input, output, logger, options);
40 exports.createProtocolConnection = createProtocolConnection;
41 //# sourceMappingURL=main.js.map
45 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
47 /* --------------------------------------------------------------------------------------------
48 * Copyright (c) Microsoft Corporation. All rights reserved.
49 * Licensed under the MIT License. See License.txt in the project root for license information.
50 * ----------------------------------------------------------------------------------------- */
53 module.exports = __webpack_require__(6);
57 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
60 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
61 if (k2 === undefined) k2 = k;
62 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
63 }) : (function(o, m, k, k2) {
64 if (k2 === undefined) k2 = k;
67 var __exportStar = (this && this.__exportStar) || function(m, exports) {
68 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
70 Object.defineProperty(exports, "__esModule", ({ value: true }));
71 exports.createMessageConnection = exports.createServerSocketTransport = exports.createClientSocketTransport = exports.createServerPipeTransport = exports.createClientPipeTransport = exports.generateRandomPipeName = exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0;
72 /* --------------------------------------------------------------------------------------------
73 * Copyright (c) Microsoft Corporation. All rights reserved.
74 * Licensed under the MIT License. See License.txt in the project root for license information.
75 * ----------------------------------------------------------------------------------------- */
76 const ril_1 = __webpack_require__(7);
77 // Install the node runtime abstract.
78 ril_1.default.install();
79 const api_1 = __webpack_require__(12);
80 const path = __webpack_require__(3);
81 const os = __webpack_require__(22);
82 const crypto_1 = __webpack_require__(23);
83 const net_1 = __webpack_require__(24);
84 __exportStar(__webpack_require__(12), exports);
85 class IPCMessageReader extends api_1.AbstractMessageReader {
86 constructor(process) {
88 this.process = process;
89 let eventEmitter = this.process;
90 eventEmitter.on('error', (error) => this.fireError(error));
91 eventEmitter.on('close', () => this.fireClose());
94 this.process.on('message', callback);
95 return api_1.Disposable.create(() => this.process.off('message', callback));
98 exports.IPCMessageReader = IPCMessageReader;
99 class IPCMessageWriter extends api_1.AbstractMessageWriter {
100 constructor(process) {
102 this.process = process;
104 let eventEmitter = this.process;
105 eventEmitter.on('error', (error) => this.fireError(error));
106 eventEmitter.on('close', () => this.fireClose);
110 if (typeof this.process.send === 'function') {
111 this.process.send(msg, undefined, undefined, (error) => {
114 this.handleError(error, msg);
121 return Promise.resolve();
124 this.handleError(error, msg);
125 return Promise.reject(error);
128 handleError(error, msg) {
130 this.fireError(error, msg, this.errorCount);
135 exports.IPCMessageWriter = IPCMessageWriter;
136 class SocketMessageReader extends api_1.ReadableStreamMessageReader {
137 constructor(socket, encoding = 'utf-8') {
138 super(ril_1.default().stream.asReadableStream(socket), encoding);
141 exports.SocketMessageReader = SocketMessageReader;
142 class SocketMessageWriter extends api_1.WriteableStreamMessageWriter {
143 constructor(socket, options) {
144 super(ril_1.default().stream.asWritableStream(socket), options);
145 this.socket = socket;
149 this.socket.destroy();
152 exports.SocketMessageWriter = SocketMessageWriter;
153 class StreamMessageReader extends api_1.ReadableStreamMessageReader {
154 constructor(readble, encoding) {
155 super(ril_1.default().stream.asReadableStream(readble), encoding);
158 exports.StreamMessageReader = StreamMessageReader;
159 class StreamMessageWriter extends api_1.WriteableStreamMessageWriter {
160 constructor(writable, options) {
161 super(ril_1.default().stream.asWritableStream(writable), options);
164 exports.StreamMessageWriter = StreamMessageWriter;
165 const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR'];
166 const safeIpcPathLengths = new Map([
170 function generateRandomPipeName() {
171 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
172 if (process.platform === 'win32') {
173 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
176 if (XDG_RUNTIME_DIR) {
177 result = path.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`);
180 result = path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
182 const limit = safeIpcPathLengths.get(process.platform);
183 if (limit !== undefined && result.length >= limit) {
184 ril_1.default().console.warn(`WARNING: IPC handle "${result}" is longer than ${limit} characters.`);
188 exports.generateRandomPipeName = generateRandomPipeName;
189 function createClientPipeTransport(pipeName, encoding = 'utf-8') {
191 const connected = new Promise((resolve, _reject) => {
192 connectResolve = resolve;
194 return new Promise((resolve, reject) => {
195 let server = net_1.createServer((socket) => {
198 new SocketMessageReader(socket, encoding),
199 new SocketMessageWriter(socket, encoding)
202 server.on('error', reject);
203 server.listen(pipeName, () => {
204 server.removeListener('error', reject);
206 onConnected: () => { return connected; }
211 exports.createClientPipeTransport = createClientPipeTransport;
212 function createServerPipeTransport(pipeName, encoding = 'utf-8') {
213 const socket = net_1.createConnection(pipeName);
215 new SocketMessageReader(socket, encoding),
216 new SocketMessageWriter(socket, encoding)
219 exports.createServerPipeTransport = createServerPipeTransport;
220 function createClientSocketTransport(port, encoding = 'utf-8') {
222 const connected = new Promise((resolve, _reject) => {
223 connectResolve = resolve;
225 return new Promise((resolve, reject) => {
226 const server = net_1.createServer((socket) => {
229 new SocketMessageReader(socket, encoding),
230 new SocketMessageWriter(socket, encoding)
233 server.on('error', reject);
234 server.listen(port, '127.0.0.1', () => {
235 server.removeListener('error', reject);
237 onConnected: () => { return connected; }
242 exports.createClientSocketTransport = createClientSocketTransport;
243 function createServerSocketTransport(port, encoding = 'utf-8') {
244 const socket = net_1.createConnection(port, '127.0.0.1');
246 new SocketMessageReader(socket, encoding),
247 new SocketMessageWriter(socket, encoding)
250 exports.createServerSocketTransport = createServerSocketTransport;
251 function isReadableStream(value) {
252 const candidate = value;
253 return candidate.read !== undefined && candidate.addListener !== undefined;
255 function isWritableStream(value) {
256 const candidate = value;
257 return candidate.write !== undefined && candidate.addListener !== undefined;
259 function createMessageConnection(input, output, logger, options) {
261 logger = api_1.NullLogger;
263 const reader = isReadableStream(input) ? new StreamMessageReader(input) : input;
264 const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output;
265 if (api_1.ConnectionStrategy.is(options)) {
266 options = { connectionStrategy: options };
268 return api_1.createMessageConnection(reader, writer, logger, options);
270 exports.createMessageConnection = createMessageConnection;
271 //# sourceMappingURL=main.js.map
275 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
278 /* --------------------------------------------------------------------------------------------
279 * Copyright (c) Microsoft Corporation. All rights reserved.
280 * Licensed under the MIT License. See License.txt in the project root for license information.
281 * ------------------------------------------------------------------------------------------ */
282 Object.defineProperty(exports, "__esModule", ({ value: true }));
283 const ral_1 = __webpack_require__(8);
284 const util_1 = __webpack_require__(9);
285 const disposable_1 = __webpack_require__(10);
286 const messageBuffer_1 = __webpack_require__(11);
287 class MessageBuffer extends messageBuffer_1.AbstractMessageBuffer {
288 constructor(encoding = 'utf-8') {
292 return MessageBuffer.emptyBuffer;
294 fromString(value, encoding) {
295 return Buffer.from(value, encoding);
297 toString(value, encoding) {
298 if (value instanceof Buffer) {
299 return value.toString(encoding);
302 return new util_1.TextDecoder(encoding).decode(value);
305 asNative(buffer, length) {
306 if (length === undefined) {
307 return buffer instanceof Buffer ? buffer : Buffer.from(buffer);
310 return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length);
313 allocNative(length) {
314 return Buffer.allocUnsafe(length);
317 MessageBuffer.emptyBuffer = Buffer.allocUnsafe(0);
318 class ReadableStreamWrapper {
319 constructor(stream) {
320 this.stream = stream;
323 this.stream.on('close', listener);
324 return disposable_1.Disposable.create(() => this.stream.off('close', listener));
327 this.stream.on('error', listener);
328 return disposable_1.Disposable.create(() => this.stream.off('error', listener));
331 this.stream.on('end', listener);
332 return disposable_1.Disposable.create(() => this.stream.off('end', listener));
335 this.stream.on('data', listener);
336 return disposable_1.Disposable.create(() => this.stream.off('data', listener));
339 class WritableStreamWrapper {
340 constructor(stream) {
341 this.stream = stream;
344 this.stream.on('close', listener);
345 return disposable_1.Disposable.create(() => this.stream.off('close', listener));
348 this.stream.on('error', listener);
349 return disposable_1.Disposable.create(() => this.stream.off('error', listener));
352 this.stream.on('end', listener);
353 return disposable_1.Disposable.create(() => this.stream.off('end', listener));
355 write(data, encoding) {
356 return new Promise((resolve, reject) => {
357 const callback = (error) => {
358 if (error === undefined || error === null) {
365 if (typeof data === 'string') {
366 this.stream.write(data, encoding, callback);
369 this.stream.write(data, callback);
377 const _ril = Object.freeze({
378 messageBuffer: Object.freeze({
379 create: (encoding) => new MessageBuffer(encoding)
381 applicationJson: Object.freeze({
382 encoder: Object.freeze({
383 name: 'application/json',
384 encode: (msg, options) => {
386 return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset));
389 return Promise.reject(err);
393 decoder: Object.freeze({
394 name: 'application/json',
395 decode: (buffer, options) => {
397 if (buffer instanceof Buffer) {
398 return Promise.resolve(JSON.parse(buffer.toString(options.charset)));
401 return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer)));
405 return Promise.reject(err);
410 stream: Object.freeze({
411 asReadableStream: (stream) => new ReadableStreamWrapper(stream),
412 asWritableStream: (stream) => new WritableStreamWrapper(stream)
415 timer: Object.freeze({
416 setTimeout(callback, ms, ...args) {
417 return setTimeout(callback, ms, ...args);
419 clearTimeout(handle) {
420 clearTimeout(handle);
422 setImmediate(callback, ...args) {
423 return setImmediate(callback, ...args);
425 clearImmediate(handle) {
426 clearImmediate(handle);
435 ral_1.default.install(_ril);
437 RIL.install = install;
438 })(RIL || (RIL = {}));
439 exports.default = RIL;
440 //# sourceMappingURL=ril.js.map
444 /***/ ((__unused_webpack_module, exports) => {
447 /* --------------------------------------------------------------------------------------------
448 * Copyright (c) Microsoft Corporation. All rights reserved.
449 * Licensed under the MIT License. See License.txt in the project root for license information.
450 * ------------------------------------------------------------------------------------------ */
451 Object.defineProperty(exports, "__esModule", ({ value: true }));
454 if (_ral === undefined) {
455 throw new Error(`No runtime abstraction layer installed`);
460 function install(ral) {
461 if (ral === undefined) {
462 throw new Error(`No runtime abstraction layer provided`);
466 RAL.install = install;
467 })(RAL || (RAL = {}));
468 exports.default = RAL;
469 //# sourceMappingURL=ral.js.map
475 module.exports = require("util");;
479 /***/ ((__unused_webpack_module, exports) => {
482 /*---------------------------------------------------------------------------------------------
483 * Copyright (c) Microsoft Corporation. All rights reserved.
484 * Licensed under the MIT License. See License.txt in the project root for license information.
485 *--------------------------------------------------------------------------------------------*/
486 Object.defineProperty(exports, "__esModule", ({ value: true }));
487 exports.Disposable = void 0;
489 (function (Disposable) {
490 function create(func) {
495 Disposable.create = create;
496 })(Disposable = exports.Disposable || (exports.Disposable = {}));
497 //# sourceMappingURL=disposable.js.map
501 /***/ ((__unused_webpack_module, exports) => {
504 /*---------------------------------------------------------------------------------------------
505 * Copyright (c) Microsoft Corporation. All rights reserved.
506 * Licensed under the MIT License. See License.txt in the project root for license information.
507 *--------------------------------------------------------------------------------------------*/
508 Object.defineProperty(exports, "__esModule", ({ value: true }));
509 exports.AbstractMessageBuffer = void 0;
513 class AbstractMessageBuffer {
514 constructor(encoding = 'utf-8') {
515 this._encoding = encoding;
517 this._totalLength = 0;
520 return this._encoding;
523 const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk;
524 this._chunks.push(toAppend);
525 this._totalLength += toAppend.byteLength;
528 if (this._chunks.length === 0) {
534 let chunkBytesRead = 0;
535 row: while (chunkIndex < this._chunks.length) {
536 const chunk = this._chunks[chunkIndex];
538 column: while (offset < chunk.length) {
539 const value = chunk[offset];
571 chunkBytesRead += chunk.byteLength;
577 // The buffer contains the two CRLF at the end. So we will
578 // have two empty lines after the split at the end as well.
579 const buffer = this._read(chunkBytesRead + offset);
580 const result = new Map();
581 const headers = this.toString(buffer, 'ascii').split(CRLF);
582 if (headers.length < 2) {
585 for (let i = 0; i < headers.length - 2; i++) {
586 const header = headers[i];
587 const index = header.indexOf(':');
589 throw new Error('Message header must separate key and value using :');
591 const key = header.substr(0, index);
592 const value = header.substr(index + 1).trim();
593 result.set(key, value);
597 tryReadBody(length) {
598 if (this._totalLength < length) {
601 return this._read(length);
603 get numberOfBytes() {
604 return this._totalLength;
607 if (byteCount === 0) {
608 return this.emptyBuffer();
610 if (byteCount > this._totalLength) {
611 throw new Error(`Cannot read so many bytes!`);
613 if (this._chunks[0].byteLength === byteCount) {
614 // super fast path, precisely first chunk must be returned
615 const chunk = this._chunks[0];
616 this._chunks.shift();
617 this._totalLength -= byteCount;
618 return this.asNative(chunk);
620 if (this._chunks[0].byteLength > byteCount) {
621 // fast path, the reading is entirely within the first chunk
622 const chunk = this._chunks[0];
623 const result = this.asNative(chunk, byteCount);
624 this._chunks[0] = chunk.slice(byteCount);
625 this._totalLength -= byteCount;
628 const result = this.allocNative(byteCount);
629 let resultOffset = 0;
631 while (byteCount > 0) {
632 const chunk = this._chunks[chunkIndex];
633 if (chunk.byteLength > byteCount) {
634 // this chunk will survive
635 const chunkPart = chunk.slice(0, byteCount);
636 result.set(chunkPart, resultOffset);
637 resultOffset += byteCount;
638 this._chunks[chunkIndex] = chunk.slice(byteCount);
639 this._totalLength -= byteCount;
640 byteCount -= byteCount;
643 // this chunk will be entirely read
644 result.set(chunk, resultOffset);
645 resultOffset += chunk.byteLength;
646 this._chunks.shift();
647 this._totalLength -= chunk.byteLength;
648 byteCount -= chunk.byteLength;
654 exports.AbstractMessageBuffer = AbstractMessageBuffer;
655 //# sourceMappingURL=messageBuffer.js.map
659 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
662 /* --------------------------------------------------------------------------------------------
663 * Copyright (c) Microsoft Corporation. All rights reserved.
664 * Licensed under the MIT License. See License.txt in the project root for license information.
665 * ------------------------------------------------------------------------------------------ */
666 /// <reference path="../../typings/thenable.d.ts" />
667 Object.defineProperty(exports, "__esModule", ({ value: true }));
668 exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.Trace = exports.ProgressType = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.RAL = void 0;
669 exports.CancellationStrategy = void 0;
670 const messages_1 = __webpack_require__(13);
671 Object.defineProperty(exports, "RequestType", ({ enumerable: true, get: function () { return messages_1.RequestType; } }));
672 Object.defineProperty(exports, "RequestType0", ({ enumerable: true, get: function () { return messages_1.RequestType0; } }));
673 Object.defineProperty(exports, "RequestType1", ({ enumerable: true, get: function () { return messages_1.RequestType1; } }));
674 Object.defineProperty(exports, "RequestType2", ({ enumerable: true, get: function () { return messages_1.RequestType2; } }));
675 Object.defineProperty(exports, "RequestType3", ({ enumerable: true, get: function () { return messages_1.RequestType3; } }));
676 Object.defineProperty(exports, "RequestType4", ({ enumerable: true, get: function () { return messages_1.RequestType4; } }));
677 Object.defineProperty(exports, "RequestType5", ({ enumerable: true, get: function () { return messages_1.RequestType5; } }));
678 Object.defineProperty(exports, "RequestType6", ({ enumerable: true, get: function () { return messages_1.RequestType6; } }));
679 Object.defineProperty(exports, "RequestType7", ({ enumerable: true, get: function () { return messages_1.RequestType7; } }));
680 Object.defineProperty(exports, "RequestType8", ({ enumerable: true, get: function () { return messages_1.RequestType8; } }));
681 Object.defineProperty(exports, "RequestType9", ({ enumerable: true, get: function () { return messages_1.RequestType9; } }));
682 Object.defineProperty(exports, "ResponseError", ({ enumerable: true, get: function () { return messages_1.ResponseError; } }));
683 Object.defineProperty(exports, "ErrorCodes", ({ enumerable: true, get: function () { return messages_1.ErrorCodes; } }));
684 Object.defineProperty(exports, "NotificationType", ({ enumerable: true, get: function () { return messages_1.NotificationType; } }));
685 Object.defineProperty(exports, "NotificationType0", ({ enumerable: true, get: function () { return messages_1.NotificationType0; } }));
686 Object.defineProperty(exports, "NotificationType1", ({ enumerable: true, get: function () { return messages_1.NotificationType1; } }));
687 Object.defineProperty(exports, "NotificationType2", ({ enumerable: true, get: function () { return messages_1.NotificationType2; } }));
688 Object.defineProperty(exports, "NotificationType3", ({ enumerable: true, get: function () { return messages_1.NotificationType3; } }));
689 Object.defineProperty(exports, "NotificationType4", ({ enumerable: true, get: function () { return messages_1.NotificationType4; } }));
690 Object.defineProperty(exports, "NotificationType5", ({ enumerable: true, get: function () { return messages_1.NotificationType5; } }));
691 Object.defineProperty(exports, "NotificationType6", ({ enumerable: true, get: function () { return messages_1.NotificationType6; } }));
692 Object.defineProperty(exports, "NotificationType7", ({ enumerable: true, get: function () { return messages_1.NotificationType7; } }));
693 Object.defineProperty(exports, "NotificationType8", ({ enumerable: true, get: function () { return messages_1.NotificationType8; } }));
694 Object.defineProperty(exports, "NotificationType9", ({ enumerable: true, get: function () { return messages_1.NotificationType9; } }));
695 Object.defineProperty(exports, "ParameterStructures", ({ enumerable: true, get: function () { return messages_1.ParameterStructures; } }));
696 const disposable_1 = __webpack_require__(10);
697 Object.defineProperty(exports, "Disposable", ({ enumerable: true, get: function () { return disposable_1.Disposable; } }));
698 const events_1 = __webpack_require__(15);
699 Object.defineProperty(exports, "Event", ({ enumerable: true, get: function () { return events_1.Event; } }));
700 Object.defineProperty(exports, "Emitter", ({ enumerable: true, get: function () { return events_1.Emitter; } }));
701 const cancellation_1 = __webpack_require__(16);
702 Object.defineProperty(exports, "CancellationTokenSource", ({ enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } }));
703 Object.defineProperty(exports, "CancellationToken", ({ enumerable: true, get: function () { return cancellation_1.CancellationToken; } }));
704 const messageReader_1 = __webpack_require__(17);
705 Object.defineProperty(exports, "MessageReader", ({ enumerable: true, get: function () { return messageReader_1.MessageReader; } }));
706 Object.defineProperty(exports, "AbstractMessageReader", ({ enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } }));
707 Object.defineProperty(exports, "ReadableStreamMessageReader", ({ enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } }));
708 const messageWriter_1 = __webpack_require__(18);
709 Object.defineProperty(exports, "MessageWriter", ({ enumerable: true, get: function () { return messageWriter_1.MessageWriter; } }));
710 Object.defineProperty(exports, "AbstractMessageWriter", ({ enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } }));
711 Object.defineProperty(exports, "WriteableStreamMessageWriter", ({ enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } }));
712 const connection_1 = __webpack_require__(20);
713 Object.defineProperty(exports, "ConnectionStrategy", ({ enumerable: true, get: function () { return connection_1.ConnectionStrategy; } }));
714 Object.defineProperty(exports, "ConnectionOptions", ({ enumerable: true, get: function () { return connection_1.ConnectionOptions; } }));
715 Object.defineProperty(exports, "NullLogger", ({ enumerable: true, get: function () { return connection_1.NullLogger; } }));
716 Object.defineProperty(exports, "createMessageConnection", ({ enumerable: true, get: function () { return connection_1.createMessageConnection; } }));
717 Object.defineProperty(exports, "ProgressType", ({ enumerable: true, get: function () { return connection_1.ProgressType; } }));
718 Object.defineProperty(exports, "Trace", ({ enumerable: true, get: function () { return connection_1.Trace; } }));
719 Object.defineProperty(exports, "TraceFormat", ({ enumerable: true, get: function () { return connection_1.TraceFormat; } }));
720 Object.defineProperty(exports, "SetTraceNotification", ({ enumerable: true, get: function () { return connection_1.SetTraceNotification; } }));
721 Object.defineProperty(exports, "LogTraceNotification", ({ enumerable: true, get: function () { return connection_1.LogTraceNotification; } }));
722 Object.defineProperty(exports, "ConnectionErrors", ({ enumerable: true, get: function () { return connection_1.ConnectionErrors; } }));
723 Object.defineProperty(exports, "ConnectionError", ({ enumerable: true, get: function () { return connection_1.ConnectionError; } }));
724 Object.defineProperty(exports, "CancellationReceiverStrategy", ({ enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } }));
725 Object.defineProperty(exports, "CancellationSenderStrategy", ({ enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } }));
726 Object.defineProperty(exports, "CancellationStrategy", ({ enumerable: true, get: function () { return connection_1.CancellationStrategy; } }));
727 const ral_1 = __webpack_require__(8);
728 exports.RAL = ral_1.default;
729 //# sourceMappingURL=api.js.map
733 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
736 /* --------------------------------------------------------------------------------------------
737 * Copyright (c) Microsoft Corporation. All rights reserved.
738 * Licensed under the MIT License. See License.txt in the project root for license information.
739 * ------------------------------------------------------------------------------------------ */
740 Object.defineProperty(exports, "__esModule", ({ value: true }));
741 exports.isResponseMessage = exports.isNotificationMessage = exports.isRequestMessage = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0;
742 const is = __webpack_require__(14);
744 * Predefined error codes.
747 (function (ErrorCodes) {
748 // Defined by JSON RPC
749 ErrorCodes.ParseError = -32700;
750 ErrorCodes.InvalidRequest = -32600;
751 ErrorCodes.MethodNotFound = -32601;
752 ErrorCodes.InvalidParams = -32602;
753 ErrorCodes.InternalError = -32603;
755 * This is the start range of JSON RPC reserved error codes.
756 * It doesn't denote a real error code. No application error codes should
757 * be defined between the start and end range. For backwards
758 * compatibility the `ServerNotInitialized` and the `UnknownErrorCode`
759 * are left in the range.
763 ErrorCodes.jsonrpcReservedErrorRangeStart = -32099;
764 /** @deprecated use jsonrpcReservedErrorRangeStart */
765 ErrorCodes.serverErrorStart = ErrorCodes.jsonrpcReservedErrorRangeStart;
766 ErrorCodes.MessageWriteError = -32099;
767 ErrorCodes.MessageReadError = -32098;
768 ErrorCodes.ServerNotInitialized = -32002;
769 ErrorCodes.UnknownErrorCode = -32001;
771 * This is the end range of JSON RPC reserved error codes.
772 * It doesn't denote a real error code.
776 ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000;
777 /** @deprecated use jsonrpcReservedErrorRangeEnd */
778 ErrorCodes.serverErrorEnd = ErrorCodes.jsonrpcReservedErrorRangeEnd;
779 })(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
781 * An error object return in a response in case a request
784 class ResponseError extends Error {
785 constructor(code, message, data) {
787 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
789 Object.setPrototypeOf(this, ResponseError.prototype);
794 message: this.message,
799 exports.ResponseError = ResponseError;
800 class ParameterStructures {
805 return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition;
811 exports.ParameterStructures = ParameterStructures;
813 * The parameter structure is automatically inferred on the number of parameters
814 * and the parameter type in case of a single param.
816 ParameterStructures.auto = new ParameterStructures('auto');
818 * Forces `byPosition` parameter structure. This is useful if you have a single
819 * parameter which has a literal type.
821 ParameterStructures.byPosition = new ParameterStructures('byPosition');
823 * Forces `byName` parameter structure. This is only useful when having a single
824 * parameter. The library will report errors if used with a different number of
827 ParameterStructures.byName = new ParameterStructures('byName');
829 * An abstract implementation of a MessageType.
831 class AbstractMessageSignature {
832 constructor(method, numberOfParams) {
833 this.method = method;
834 this.numberOfParams = numberOfParams;
836 get parameterStructures() {
837 return ParameterStructures.auto;
840 exports.AbstractMessageSignature = AbstractMessageSignature;
842 * Classes to type request response pairs
844 class RequestType0 extends AbstractMessageSignature {
845 constructor(method) {
849 exports.RequestType0 = RequestType0;
850 class RequestType extends AbstractMessageSignature {
851 constructor(method, _parameterStructures = ParameterStructures.auto) {
853 this._parameterStructures = _parameterStructures;
855 get parameterStructures() {
856 return this._parameterStructures;
859 exports.RequestType = RequestType;
860 class RequestType1 extends AbstractMessageSignature {
861 constructor(method, _parameterStructures = ParameterStructures.auto) {
863 this._parameterStructures = _parameterStructures;
865 get parameterStructures() {
866 return this._parameterStructures;
869 exports.RequestType1 = RequestType1;
870 class RequestType2 extends AbstractMessageSignature {
871 constructor(method) {
875 exports.RequestType2 = RequestType2;
876 class RequestType3 extends AbstractMessageSignature {
877 constructor(method) {
881 exports.RequestType3 = RequestType3;
882 class RequestType4 extends AbstractMessageSignature {
883 constructor(method) {
887 exports.RequestType4 = RequestType4;
888 class RequestType5 extends AbstractMessageSignature {
889 constructor(method) {
893 exports.RequestType5 = RequestType5;
894 class RequestType6 extends AbstractMessageSignature {
895 constructor(method) {
899 exports.RequestType6 = RequestType6;
900 class RequestType7 extends AbstractMessageSignature {
901 constructor(method) {
905 exports.RequestType7 = RequestType7;
906 class RequestType8 extends AbstractMessageSignature {
907 constructor(method) {
911 exports.RequestType8 = RequestType8;
912 class RequestType9 extends AbstractMessageSignature {
913 constructor(method) {
917 exports.RequestType9 = RequestType9;
918 class NotificationType extends AbstractMessageSignature {
919 constructor(method, _parameterStructures = ParameterStructures.auto) {
921 this._parameterStructures = _parameterStructures;
923 get parameterStructures() {
924 return this._parameterStructures;
927 exports.NotificationType = NotificationType;
928 class NotificationType0 extends AbstractMessageSignature {
929 constructor(method) {
933 exports.NotificationType0 = NotificationType0;
934 class NotificationType1 extends AbstractMessageSignature {
935 constructor(method, _parameterStructures = ParameterStructures.auto) {
937 this._parameterStructures = _parameterStructures;
939 get parameterStructures() {
940 return this._parameterStructures;
943 exports.NotificationType1 = NotificationType1;
944 class NotificationType2 extends AbstractMessageSignature {
945 constructor(method) {
949 exports.NotificationType2 = NotificationType2;
950 class NotificationType3 extends AbstractMessageSignature {
951 constructor(method) {
955 exports.NotificationType3 = NotificationType3;
956 class NotificationType4 extends AbstractMessageSignature {
957 constructor(method) {
961 exports.NotificationType4 = NotificationType4;
962 class NotificationType5 extends AbstractMessageSignature {
963 constructor(method) {
967 exports.NotificationType5 = NotificationType5;
968 class NotificationType6 extends AbstractMessageSignature {
969 constructor(method) {
973 exports.NotificationType6 = NotificationType6;
974 class NotificationType7 extends AbstractMessageSignature {
975 constructor(method) {
979 exports.NotificationType7 = NotificationType7;
980 class NotificationType8 extends AbstractMessageSignature {
981 constructor(method) {
985 exports.NotificationType8 = NotificationType8;
986 class NotificationType9 extends AbstractMessageSignature {
987 constructor(method) {
991 exports.NotificationType9 = NotificationType9;
993 * Tests if the given message is a request message
995 function isRequestMessage(message) {
996 const candidate = message;
997 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
999 exports.isRequestMessage = isRequestMessage;
1001 * Tests if the given message is a notification message
1003 function isNotificationMessage(message) {
1004 const candidate = message;
1005 return candidate && is.string(candidate.method) && message.id === void 0;
1007 exports.isNotificationMessage = isNotificationMessage;
1009 * Tests if the given message is a response message
1011 function isResponseMessage(message) {
1012 const candidate = message;
1013 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
1015 exports.isResponseMessage = isResponseMessage;
1016 //# sourceMappingURL=messages.js.map
1020 /***/ ((__unused_webpack_module, exports) => {
1023 /* --------------------------------------------------------------------------------------------
1024 * Copyright (c) Microsoft Corporation. All rights reserved.
1025 * Licensed under the MIT License. See License.txt in the project root for license information.
1026 * ------------------------------------------------------------------------------------------ */
1027 Object.defineProperty(exports, "__esModule", ({ value: true }));
1028 exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;
1029 function boolean(value) {
1030 return value === true || value === false;
1032 exports.boolean = boolean;
1033 function string(value) {
1034 return typeof value === 'string' || value instanceof String;
1036 exports.string = string;
1037 function number(value) {
1038 return typeof value === 'number' || value instanceof Number;
1040 exports.number = number;
1041 function error(value) {
1042 return value instanceof Error;
1044 exports.error = error;
1045 function func(value) {
1046 return typeof value === 'function';
1048 exports.func = func;
1049 function array(value) {
1050 return Array.isArray(value);
1052 exports.array = array;
1053 function stringArray(value) {
1054 return array(value) && value.every(elem => string(elem));
1056 exports.stringArray = stringArray;
1057 //# sourceMappingURL=is.js.map
1061 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1064 /* --------------------------------------------------------------------------------------------
1065 * Copyright (c) Microsoft Corporation. All rights reserved.
1066 * Licensed under the MIT License. See License.txt in the project root for license information.
1067 * ------------------------------------------------------------------------------------------ */
1068 Object.defineProperty(exports, "__esModule", ({ value: true }));
1069 exports.Emitter = exports.Event = void 0;
1070 const ral_1 = __webpack_require__(8);
1073 const _disposable = { dispose() { } };
1074 Event.None = function () { return _disposable; };
1075 })(Event = exports.Event || (exports.Event = {}));
1076 class CallbackList {
1077 add(callback, context = null, bucket) {
1078 if (!this._callbacks) {
1079 this._callbacks = [];
1080 this._contexts = [];
1082 this._callbacks.push(callback);
1083 this._contexts.push(context);
1084 if (Array.isArray(bucket)) {
1085 bucket.push({ dispose: () => this.remove(callback, context) });
1088 remove(callback, context = null) {
1089 if (!this._callbacks) {
1092 let foundCallbackWithDifferentContext = false;
1093 for (let i = 0, len = this._callbacks.length; i < len; i++) {
1094 if (this._callbacks[i] === callback) {
1095 if (this._contexts[i] === context) {
1096 // callback & context match => remove it
1097 this._callbacks.splice(i, 1);
1098 this._contexts.splice(i, 1);
1102 foundCallbackWithDifferentContext = true;
1106 if (foundCallbackWithDifferentContext) {
1107 throw new Error('When adding a listener with a context, you should remove it with the same context');
1111 if (!this._callbacks) {
1114 const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
1115 for (let i = 0, len = callbacks.length; i < len; i++) {
1117 ret.push(callbacks[i].apply(contexts[i], args));
1120 // eslint-disable-next-line no-console
1121 ral_1.default().console.error(e);
1127 return !this._callbacks || this._callbacks.length === 0;
1130 this._callbacks = undefined;
1131 this._contexts = undefined;
1135 constructor(_options) {
1136 this._options = _options;
1139 * For the public to allow to subscribe
1140 * to events from this Emitter
1144 this._event = (listener, thisArgs, disposables) => {
1145 if (!this._callbacks) {
1146 this._callbacks = new CallbackList();
1148 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
1149 this._options.onFirstListenerAdd(this);
1151 this._callbacks.add(listener, thisArgs);
1154 if (!this._callbacks) {
1155 // disposable is disposed after emitter is disposed.
1158 this._callbacks.remove(listener, thisArgs);
1159 result.dispose = Emitter._noop;
1160 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
1161 this._options.onLastListenerRemove(this);
1165 if (Array.isArray(disposables)) {
1166 disposables.push(result);
1174 * To be kept private to fire an event to
1178 if (this._callbacks) {
1179 this._callbacks.invoke.call(this._callbacks, event);
1183 if (this._callbacks) {
1184 this._callbacks.dispose();
1185 this._callbacks = undefined;
1189 exports.Emitter = Emitter;
1190 Emitter._noop = function () { };
1191 //# sourceMappingURL=events.js.map
1195 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1198 /*---------------------------------------------------------------------------------------------
1199 * Copyright (c) Microsoft Corporation. All rights reserved.
1200 * Licensed under the MIT License. See License.txt in the project root for license information.
1201 *--------------------------------------------------------------------------------------------*/
1202 Object.defineProperty(exports, "__esModule", ({ value: true }));
1203 exports.CancellationTokenSource = exports.CancellationToken = void 0;
1204 const ral_1 = __webpack_require__(8);
1205 const Is = __webpack_require__(14);
1206 const events_1 = __webpack_require__(15);
1207 var CancellationToken;
1208 (function (CancellationToken) {
1209 CancellationToken.None = Object.freeze({
1210 isCancellationRequested: false,
1211 onCancellationRequested: events_1.Event.None
1213 CancellationToken.Cancelled = Object.freeze({
1214 isCancellationRequested: true,
1215 onCancellationRequested: events_1.Event.None
1217 function is(value) {
1218 const candidate = value;
1219 return candidate && (candidate === CancellationToken.None
1220 || candidate === CancellationToken.Cancelled
1221 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
1223 CancellationToken.is = is;
1224 })(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
1225 const shortcutEvent = Object.freeze(function (callback, context) {
1226 const handle = ral_1.default().timer.setTimeout(callback.bind(context), 0);
1227 return { dispose() { ral_1.default().timer.clearTimeout(handle); } };
1229 class MutableToken {
1231 this._isCancelled = false;
1234 if (!this._isCancelled) {
1235 this._isCancelled = true;
1236 if (this._emitter) {
1237 this._emitter.fire(undefined);
1242 get isCancellationRequested() {
1243 return this._isCancelled;
1245 get onCancellationRequested() {
1246 if (this._isCancelled) {
1247 return shortcutEvent;
1249 if (!this._emitter) {
1250 this._emitter = new events_1.Emitter();
1252 return this._emitter.event;
1255 if (this._emitter) {
1256 this._emitter.dispose();
1257 this._emitter = undefined;
1261 class CancellationTokenSource {
1264 // be lazy and create the token only when
1266 this._token = new MutableToken();
1272 // save an object by returning the default
1273 // cancelled token when cancellation happens
1274 // before someone asks for the token
1275 this._token = CancellationToken.Cancelled;
1278 this._token.cancel();
1283 // ensure to initialize with an empty token if we had none
1284 this._token = CancellationToken.None;
1286 else if (this._token instanceof MutableToken) {
1288 this._token.dispose();
1292 exports.CancellationTokenSource = CancellationTokenSource;
1293 //# sourceMappingURL=cancellation.js.map
1297 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1300 /* --------------------------------------------------------------------------------------------
1301 * Copyright (c) Microsoft Corporation. All rights reserved.
1302 * Licensed under the MIT License. See License.txt in the project root for license information.
1303 * ------------------------------------------------------------------------------------------ */
1304 Object.defineProperty(exports, "__esModule", ({ value: true }));
1305 exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0;
1306 const ral_1 = __webpack_require__(8);
1307 const Is = __webpack_require__(14);
1308 const events_1 = __webpack_require__(15);
1310 (function (MessageReader) {
1311 function is(value) {
1312 let candidate = value;
1313 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
1314 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
1316 MessageReader.is = is;
1317 })(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
1318 class AbstractMessageReader {
1320 this.errorEmitter = new events_1.Emitter();
1321 this.closeEmitter = new events_1.Emitter();
1322 this.partialMessageEmitter = new events_1.Emitter();
1325 this.errorEmitter.dispose();
1326 this.closeEmitter.dispose();
1329 return this.errorEmitter.event;
1332 this.errorEmitter.fire(this.asError(error));
1335 return this.closeEmitter.event;
1338 this.closeEmitter.fire(undefined);
1340 get onPartialMessage() {
1341 return this.partialMessageEmitter.event;
1343 firePartialMessage(info) {
1344 this.partialMessageEmitter.fire(info);
1347 if (error instanceof Error) {
1351 return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
1355 exports.AbstractMessageReader = AbstractMessageReader;
1356 var ResolvedMessageReaderOptions;
1357 (function (ResolvedMessageReaderOptions) {
1358 function fromOptions(options) {
1363 const contentDecoders = new Map();
1364 let contentTypeDecoder;
1365 const contentTypeDecoders = new Map();
1366 if (options === undefined || typeof options === 'string') {
1367 charset = options !== null && options !== void 0 ? options : 'utf-8';
1370 charset = (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8';
1371 if (options.contentDecoder !== undefined) {
1372 contentDecoder = options.contentDecoder;
1373 contentDecoders.set(contentDecoder.name, contentDecoder);
1375 if (options.contentDecoders !== undefined) {
1376 for (const decoder of options.contentDecoders) {
1377 contentDecoders.set(decoder.name, decoder);
1380 if (options.contentTypeDecoder !== undefined) {
1381 contentTypeDecoder = options.contentTypeDecoder;
1382 contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
1384 if (options.contentTypeDecoders !== undefined) {
1385 for (const decoder of options.contentTypeDecoders) {
1386 contentTypeDecoders.set(decoder.name, decoder);
1390 if (contentTypeDecoder === undefined) {
1391 contentTypeDecoder = ral_1.default().applicationJson.decoder;
1392 contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
1394 return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };
1396 ResolvedMessageReaderOptions.fromOptions = fromOptions;
1397 })(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));
1398 class ReadableStreamMessageReader extends AbstractMessageReader {
1399 constructor(readable, options) {
1401 this.readable = readable;
1402 this.options = ResolvedMessageReaderOptions.fromOptions(options);
1403 this.buffer = ral_1.default().messageBuffer.create(this.options.charset);
1404 this._partialMessageTimeout = 10000;
1405 this.nextMessageLength = -1;
1406 this.messageToken = 0;
1408 set partialMessageTimeout(timeout) {
1409 this._partialMessageTimeout = timeout;
1411 get partialMessageTimeout() {
1412 return this._partialMessageTimeout;
1415 this.nextMessageLength = -1;
1416 this.messageToken = 0;
1417 this.partialMessageTimer = undefined;
1418 this.callback = callback;
1419 const result = this.readable.onData((data) => {
1422 this.readable.onError((error) => this.fireError(error));
1423 this.readable.onClose(() => this.fireClose());
1427 this.buffer.append(data);
1429 if (this.nextMessageLength === -1) {
1430 const headers = this.buffer.tryReadHeaders();
1434 const contentLength = headers.get('Content-Length');
1435 if (!contentLength) {
1436 throw new Error('Header must provide a Content-Length property.');
1438 const length = parseInt(contentLength);
1439 if (isNaN(length)) {
1440 throw new Error('Content-Length value must be a number.');
1442 this.nextMessageLength = length;
1444 const body = this.buffer.tryReadBody(this.nextMessageLength);
1445 if (body === undefined) {
1446 /** We haven't received the full message yet. */
1447 this.setPartialMessageTimer();
1450 this.clearPartialMessageTimer();
1451 this.nextMessageLength = -1;
1453 if (this.options.contentDecoder !== undefined) {
1454 p = this.options.contentDecoder.decode(body);
1457 p = Promise.resolve(body);
1460 this.options.contentTypeDecoder.decode(value, this.options).then((msg) => {
1463 this.fireError(error);
1466 this.fireError(error);
1470 clearPartialMessageTimer() {
1471 if (this.partialMessageTimer) {
1472 ral_1.default().timer.clearTimeout(this.partialMessageTimer);
1473 this.partialMessageTimer = undefined;
1476 setPartialMessageTimer() {
1477 this.clearPartialMessageTimer();
1478 if (this._partialMessageTimeout <= 0) {
1481 this.partialMessageTimer = ral_1.default().timer.setTimeout((token, timeout) => {
1482 this.partialMessageTimer = undefined;
1483 if (token === this.messageToken) {
1484 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
1485 this.setPartialMessageTimer();
1487 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
1490 exports.ReadableStreamMessageReader = ReadableStreamMessageReader;
1491 //# sourceMappingURL=messageReader.js.map
1495 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1498 /* --------------------------------------------------------------------------------------------
1499 * Copyright (c) Microsoft Corporation. All rights reserved.
1500 * Licensed under the MIT License. See License.txt in the project root for license information.
1501 * ------------------------------------------------------------------------------------------ */
1502 Object.defineProperty(exports, "__esModule", ({ value: true }));
1503 exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0;
1504 const ral_1 = __webpack_require__(8);
1505 const Is = __webpack_require__(14);
1506 const semaphore_1 = __webpack_require__(19);
1507 const events_1 = __webpack_require__(15);
1508 const ContentLength = 'Content-Length: ';
1509 const CRLF = '\r\n';
1511 (function (MessageWriter) {
1512 function is(value) {
1513 let candidate = value;
1514 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
1515 Is.func(candidate.onError) && Is.func(candidate.write);
1517 MessageWriter.is = is;
1518 })(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
1519 class AbstractMessageWriter {
1521 this.errorEmitter = new events_1.Emitter();
1522 this.closeEmitter = new events_1.Emitter();
1525 this.errorEmitter.dispose();
1526 this.closeEmitter.dispose();
1529 return this.errorEmitter.event;
1531 fireError(error, message, count) {
1532 this.errorEmitter.fire([this.asError(error), message, count]);
1535 return this.closeEmitter.event;
1538 this.closeEmitter.fire(undefined);
1541 if (error instanceof Error) {
1545 return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
1549 exports.AbstractMessageWriter = AbstractMessageWriter;
1550 var ResolvedMessageWriterOptions;
1551 (function (ResolvedMessageWriterOptions) {
1552 function fromOptions(options) {
1554 if (options === undefined || typeof options === 'string') {
1555 return { charset: options !== null && options !== void 0 ? options : 'utf-8', contentTypeEncoder: ral_1.default().applicationJson.encoder };
1558 return { charset: (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: (_b = options.contentTypeEncoder) !== null && _b !== void 0 ? _b : ral_1.default().applicationJson.encoder };
1561 ResolvedMessageWriterOptions.fromOptions = fromOptions;
1562 })(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));
1563 class WriteableStreamMessageWriter extends AbstractMessageWriter {
1564 constructor(writable, options) {
1566 this.writable = writable;
1567 this.options = ResolvedMessageWriterOptions.fromOptions(options);
1568 this.errorCount = 0;
1569 this.writeSemaphore = new semaphore_1.Semaphore(1);
1570 this.writable.onError((error) => this.fireError(error));
1571 this.writable.onClose(() => this.fireClose());
1574 return this.writeSemaphore.lock(async () => {
1575 const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {
1576 if (this.options.contentEncoder !== undefined) {
1577 return this.options.contentEncoder.encode(buffer);
1583 return payload.then((buffer) => {
1585 headers.push(ContentLength, buffer.byteLength.toString(), CRLF);
1587 return this.doWrite(msg, headers, buffer);
1589 this.fireError(error);
1594 async doWrite(msg, headers, data) {
1596 await this.writable.write(headers.join(''), 'ascii');
1597 return this.writable.write(data);
1600 this.handleError(error, msg);
1601 return Promise.reject(error);
1604 handleError(error, msg) {
1606 this.fireError(error, msg, this.errorCount);
1609 this.writable.end();
1612 exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
1613 //# sourceMappingURL=messageWriter.js.map
1617 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1620 /* --------------------------------------------------------------------------------------------
1621 * Copyright (c) Microsoft Corporation. All rights reserved.
1622 * Licensed under the MIT License. See License.txt in the project root for license information.
1623 * ------------------------------------------------------------------------------------------ */
1624 Object.defineProperty(exports, "__esModule", ({ value: true }));
1625 exports.Semaphore = void 0;
1626 const ral_1 = __webpack_require__(8);
1628 constructor(capacity = 1) {
1629 if (capacity <= 0) {
1630 throw new Error('Capacity must be greater than 0');
1632 this._capacity = capacity;
1637 return new Promise((resolve, reject) => {
1638 this._waiting.push({ thunk, resolve, reject });
1643 return this._active;
1646 if (this._waiting.length === 0 || this._active === this._capacity) {
1649 ral_1.default().timer.setImmediate(() => this.doRunNext());
1652 if (this._waiting.length === 0 || this._active === this._capacity) {
1655 const next = this._waiting.shift();
1657 if (this._active > this._capacity) {
1658 throw new Error(`To many thunks active`);
1661 const result = next.thunk();
1662 if (result instanceof Promise) {
1663 result.then((value) => {
1665 next.resolve(value);
1675 next.resolve(result);
1686 exports.Semaphore = Semaphore;
1687 //# sourceMappingURL=semaphore.js.map
1691 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1694 /* --------------------------------------------------------------------------------------------
1695 * Copyright (c) Microsoft Corporation. All rights reserved.
1696 * Licensed under the MIT License. See License.txt in the project root for license information.
1697 * ------------------------------------------------------------------------------------------ */
1698 Object.defineProperty(exports, "__esModule", ({ value: true }));
1699 exports.createMessageConnection = exports.ConnectionOptions = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.Trace = exports.NullLogger = exports.ProgressType = void 0;
1700 const ral_1 = __webpack_require__(8);
1701 const Is = __webpack_require__(14);
1702 const messages_1 = __webpack_require__(13);
1703 const linkedMap_1 = __webpack_require__(21);
1704 const events_1 = __webpack_require__(15);
1705 const cancellation_1 = __webpack_require__(16);
1706 var CancelNotification;
1707 (function (CancelNotification) {
1708 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
1709 })(CancelNotification || (CancelNotification = {}));
1710 var ProgressNotification;
1711 (function (ProgressNotification) {
1712 ProgressNotification.type = new messages_1.NotificationType('$/progress');
1713 })(ProgressNotification || (ProgressNotification = {}));
1714 class ProgressType {
1718 exports.ProgressType = ProgressType;
1719 var StarRequestHandler;
1720 (function (StarRequestHandler) {
1721 function is(value) {
1722 return Is.func(value);
1724 StarRequestHandler.is = is;
1725 })(StarRequestHandler || (StarRequestHandler = {}));
1726 exports.NullLogger = Object.freeze({
1734 Trace[Trace["Off"] = 0] = "Off";
1735 Trace[Trace["Messages"] = 1] = "Messages";
1736 Trace[Trace["Verbose"] = 2] = "Verbose";
1737 })(Trace = exports.Trace || (exports.Trace = {}));
1739 function fromString(value) {
1740 if (!Is.string(value)) {
1743 value = value.toLowerCase();
1748 return Trace.Messages;
1750 return Trace.Verbose;
1755 Trace.fromString = fromString;
1756 function toString(value) {
1760 case Trace.Messages:
1768 Trace.toString = toString;
1769 })(Trace = exports.Trace || (exports.Trace = {}));
1771 (function (TraceFormat) {
1772 TraceFormat["Text"] = "text";
1773 TraceFormat["JSON"] = "json";
1774 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1775 (function (TraceFormat) {
1776 function fromString(value) {
1777 value = value.toLowerCase();
1778 if (value === 'json') {
1779 return TraceFormat.JSON;
1782 return TraceFormat.Text;
1785 TraceFormat.fromString = fromString;
1786 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1787 var SetTraceNotification;
1788 (function (SetTraceNotification) {
1789 SetTraceNotification.type = new messages_1.NotificationType('$/setTrace');
1790 })(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
1791 var LogTraceNotification;
1792 (function (LogTraceNotification) {
1793 LogTraceNotification.type = new messages_1.NotificationType('$/logTrace');
1794 })(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
1795 var ConnectionErrors;
1796 (function (ConnectionErrors) {
1798 * The connection is closed.
1800 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
1802 * The connection got disposed.
1804 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
1806 * The connection is already in listening mode.
1808 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
1809 })(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
1810 class ConnectionError extends Error {
1811 constructor(code, message) {
1814 Object.setPrototypeOf(this, ConnectionError.prototype);
1817 exports.ConnectionError = ConnectionError;
1818 var ConnectionStrategy;
1819 (function (ConnectionStrategy) {
1820 function is(value) {
1821 const candidate = value;
1822 return candidate && Is.func(candidate.cancelUndispatched);
1824 ConnectionStrategy.is = is;
1825 })(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
1826 var CancellationReceiverStrategy;
1827 (function (CancellationReceiverStrategy) {
1828 CancellationReceiverStrategy.Message = Object.freeze({
1829 createCancellationTokenSource(_) {
1830 return new cancellation_1.CancellationTokenSource();
1833 function is(value) {
1834 const candidate = value;
1835 return candidate && Is.func(candidate.createCancellationTokenSource);
1837 CancellationReceiverStrategy.is = is;
1838 })(CancellationReceiverStrategy = exports.CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = {}));
1839 var CancellationSenderStrategy;
1840 (function (CancellationSenderStrategy) {
1841 CancellationSenderStrategy.Message = Object.freeze({
1842 sendCancellation(conn, id) {
1843 conn.sendNotification(CancelNotification.type, { id });
1847 function is(value) {
1848 const candidate = value;
1849 return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);
1851 CancellationSenderStrategy.is = is;
1852 })(CancellationSenderStrategy = exports.CancellationSenderStrategy || (exports.CancellationSenderStrategy = {}));
1853 var CancellationStrategy;
1854 (function (CancellationStrategy) {
1855 CancellationStrategy.Message = Object.freeze({
1856 receiver: CancellationReceiverStrategy.Message,
1857 sender: CancellationSenderStrategy.Message
1859 function is(value) {
1860 const candidate = value;
1861 return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);
1863 CancellationStrategy.is = is;
1864 })(CancellationStrategy = exports.CancellationStrategy || (exports.CancellationStrategy = {}));
1865 var ConnectionOptions;
1866 (function (ConnectionOptions) {
1867 function is(value) {
1868 const candidate = value;
1869 return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy));
1871 ConnectionOptions.is = is;
1872 })(ConnectionOptions = exports.ConnectionOptions || (exports.ConnectionOptions = {}));
1873 var ConnectionState;
1874 (function (ConnectionState) {
1875 ConnectionState[ConnectionState["New"] = 1] = "New";
1876 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
1877 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
1878 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
1879 })(ConnectionState || (ConnectionState = {}));
1880 function createMessageConnection(messageReader, messageWriter, _logger, options) {
1881 const logger = _logger !== undefined ? _logger : exports.NullLogger;
1882 let sequenceNumber = 0;
1883 let notificationSquenceNumber = 0;
1884 let unknownResponseSquenceNumber = 0;
1885 const version = '2.0';
1886 let starRequestHandler = undefined;
1887 const requestHandlers = Object.create(null);
1888 let starNotificationHandler = undefined;
1889 const notificationHandlers = Object.create(null);
1890 const progressHandlers = new Map();
1892 let messageQueue = new linkedMap_1.LinkedMap();
1893 let responsePromises = Object.create(null);
1894 let requestTokens = Object.create(null);
1895 let trace = Trace.Off;
1896 let traceFormat = TraceFormat.Text;
1898 let state = ConnectionState.New;
1899 const errorEmitter = new events_1.Emitter();
1900 const closeEmitter = new events_1.Emitter();
1901 const unhandledNotificationEmitter = new events_1.Emitter();
1902 const unhandledProgressEmitter = new events_1.Emitter();
1903 const disposeEmitter = new events_1.Emitter();
1904 const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;
1905 function createRequestQueueKey(id) {
1907 throw new Error(`Can't send requests with id null since the response can't be correlated.`);
1909 return 'req-' + id.toString();
1911 function createResponseQueueKey(id) {
1913 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
1916 return 'res-' + id.toString();
1919 function createNotificationQueueKey() {
1920 return 'not-' + (++notificationSquenceNumber).toString();
1922 function addMessageToQueue(queue, message) {
1923 if (messages_1.isRequestMessage(message)) {
1924 queue.set(createRequestQueueKey(message.id), message);
1926 else if (messages_1.isResponseMessage(message)) {
1927 queue.set(createResponseQueueKey(message.id), message);
1930 queue.set(createNotificationQueueKey(), message);
1933 function cancelUndispatched(_message) {
1936 function isListening() {
1937 return state === ConnectionState.Listening;
1939 function isClosed() {
1940 return state === ConnectionState.Closed;
1942 function isDisposed() {
1943 return state === ConnectionState.Disposed;
1945 function closeHandler() {
1946 if (state === ConnectionState.New || state === ConnectionState.Listening) {
1947 state = ConnectionState.Closed;
1948 closeEmitter.fire(undefined);
1950 // If the connection is disposed don't sent close events.
1952 function readErrorHandler(error) {
1953 errorEmitter.fire([error, undefined, undefined]);
1955 function writeErrorHandler(data) {
1956 errorEmitter.fire(data);
1958 messageReader.onClose(closeHandler);
1959 messageReader.onError(readErrorHandler);
1960 messageWriter.onClose(closeHandler);
1961 messageWriter.onError(writeErrorHandler);
1962 function triggerMessageQueue() {
1963 if (timer || messageQueue.size === 0) {
1966 timer = ral_1.default().timer.setImmediate(() => {
1968 processMessageQueue();
1971 function processMessageQueue() {
1972 if (messageQueue.size === 0) {
1975 const message = messageQueue.shift();
1977 if (messages_1.isRequestMessage(message)) {
1978 handleRequest(message);
1980 else if (messages_1.isNotificationMessage(message)) {
1981 handleNotification(message);
1983 else if (messages_1.isResponseMessage(message)) {
1984 handleResponse(message);
1987 handleInvalidMessage(message);
1991 triggerMessageQueue();
1994 const callback = (message) => {
1996 // We have received a cancellation message. Check if the message is still in the queue
1997 // and cancel it if allowed to do so.
1998 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
1999 const key = createRequestQueueKey(message.params.id);
2000 const toCancel = messageQueue.get(key);
2001 if (messages_1.isRequestMessage(toCancel)) {
2002 const strategy = options === null || options === void 0 ? void 0 : options.connectionStrategy;
2003 const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
2004 if (response && (response.error !== undefined || response.result !== undefined)) {
2005 messageQueue.delete(key);
2006 response.id = toCancel.id;
2007 traceSendingResponse(response, message.method, Date.now());
2008 messageWriter.write(response);
2013 addMessageToQueue(messageQueue, message);
2016 triggerMessageQueue();
2019 function handleRequest(requestMessage) {
2021 // we return here silently since we fired an event when the
2022 // connection got disposed.
2025 function reply(resultOrError, method, startTime) {
2028 id: requestMessage.id
2030 if (resultOrError instanceof messages_1.ResponseError) {
2031 message.error = resultOrError.toJson();
2034 message.result = resultOrError === undefined ? null : resultOrError;
2036 traceSendingResponse(message, method, startTime);
2037 messageWriter.write(message);
2039 function replyError(error, method, startTime) {
2042 id: requestMessage.id,
2043 error: error.toJson()
2045 traceSendingResponse(message, method, startTime);
2046 messageWriter.write(message);
2048 function replySuccess(result, method, startTime) {
2049 // The JSON RPC defines that a response must either have a result or an error
2050 // So we can't treat undefined as a valid response result.
2051 if (result === undefined) {
2056 id: requestMessage.id,
2059 traceSendingResponse(message, method, startTime);
2060 messageWriter.write(message);
2062 traceReceivedRequest(requestMessage);
2063 const element = requestHandlers[requestMessage.method];
2067 type = element.type;
2068 requestHandler = element.handler;
2070 const startTime = Date.now();
2071 if (requestHandler || starRequestHandler) {
2072 const tokenKey = String(requestMessage.id);
2073 const cancellationSource = cancellationStrategy.receiver.createCancellationTokenSource(tokenKey);
2074 requestTokens[tokenKey] = cancellationSource;
2077 if (requestHandler) {
2078 if (requestMessage.params === undefined) {
2079 if (type !== undefined && type.numberOfParams !== 0) {
2080 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but recevied none.`), requestMessage.method, startTime);
2083 handlerResult = requestHandler(cancellationSource.token);
2085 else if (Array.isArray(requestMessage.params)) {
2086 if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) {
2087 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime);
2090 handlerResult = requestHandler(...requestMessage.params, cancellationSource.token);
2093 if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {
2094 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime);
2097 handlerResult = requestHandler(requestMessage.params, cancellationSource.token);
2100 else if (starRequestHandler) {
2101 handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
2103 const promise = handlerResult;
2104 if (!handlerResult) {
2105 delete requestTokens[tokenKey];
2106 replySuccess(handlerResult, requestMessage.method, startTime);
2108 else if (promise.then) {
2109 promise.then((resultOrError) => {
2110 delete requestTokens[tokenKey];
2111 reply(resultOrError, requestMessage.method, startTime);
2113 delete requestTokens[tokenKey];
2114 if (error instanceof messages_1.ResponseError) {
2115 replyError(error, requestMessage.method, startTime);
2117 else if (error && Is.string(error.message)) {
2118 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
2121 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
2126 delete requestTokens[tokenKey];
2127 reply(handlerResult, requestMessage.method, startTime);
2131 delete requestTokens[tokenKey];
2132 if (error instanceof messages_1.ResponseError) {
2133 reply(error, requestMessage.method, startTime);
2135 else if (error && Is.string(error.message)) {
2136 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
2139 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
2144 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
2147 function handleResponse(responseMessage) {
2149 // See handle request.
2152 if (responseMessage.id === null) {
2153 if (responseMessage.error) {
2154 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
2157 logger.error(`Received response message without id. No further error information provided.`);
2161 const key = String(responseMessage.id);
2162 const responsePromise = responsePromises[key];
2163 traceReceivedResponse(responseMessage, responsePromise);
2164 if (responsePromise) {
2165 delete responsePromises[key];
2167 if (responseMessage.error) {
2168 const error = responseMessage.error;
2169 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
2171 else if (responseMessage.result !== undefined) {
2172 responsePromise.resolve(responseMessage.result);
2175 throw new Error('Should never happen.');
2179 if (error.message) {
2180 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
2183 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
2189 function handleNotification(message) {
2191 // See handle request.
2194 let type = undefined;
2195 let notificationHandler;
2196 if (message.method === CancelNotification.type.method) {
2197 notificationHandler = (params) => {
2198 const id = params.id;
2199 const source = requestTokens[String(id)];
2206 const element = notificationHandlers[message.method];
2208 notificationHandler = element.handler;
2209 type = element.type;
2212 if (notificationHandler || starNotificationHandler) {
2214 traceReceivedNotification(message);
2215 if (notificationHandler) {
2216 if (message.params === undefined) {
2217 if (type !== undefined) {
2218 if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) {
2219 logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but recevied none.`);
2222 notificationHandler();
2224 else if (Array.isArray(message.params)) {
2225 if (type !== undefined) {
2226 if (type.parameterStructures === messages_1.ParameterStructures.byName) {
2227 logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`);
2229 if (type.numberOfParams !== message.params.length) {
2230 logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${message.params.length} argumennts`);
2233 notificationHandler(...message.params);
2236 if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {
2237 logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`);
2239 notificationHandler(message.params);
2242 else if (starNotificationHandler) {
2243 starNotificationHandler(message.method, message.params);
2247 if (error.message) {
2248 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
2251 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
2256 unhandledNotificationEmitter.fire(message);
2259 function handleInvalidMessage(message) {
2261 logger.error('Received empty message.');
2264 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
2265 // Test whether we find an id to reject the promise
2266 const responseMessage = message;
2267 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
2268 const key = String(responseMessage.id);
2269 const responseHandler = responsePromises[key];
2270 if (responseHandler) {
2271 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
2275 function traceSendingRequest(message) {
2276 if (trace === Trace.Off || !tracer) {
2279 if (traceFormat === TraceFormat.Text) {
2280 let data = undefined;
2281 if (trace === Trace.Verbose && message.params) {
2282 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
2284 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
2287 logLSPMessage('send-request', message);
2290 function traceSendingNotification(message) {
2291 if (trace === Trace.Off || !tracer) {
2294 if (traceFormat === TraceFormat.Text) {
2295 let data = undefined;
2296 if (trace === Trace.Verbose) {
2297 if (message.params) {
2298 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
2301 data = 'No parameters provided.\n\n';
2304 tracer.log(`Sending notification '${message.method}'.`, data);
2307 logLSPMessage('send-notification', message);
2310 function traceSendingResponse(message, method, startTime) {
2311 if (trace === Trace.Off || !tracer) {
2314 if (traceFormat === TraceFormat.Text) {
2315 let data = undefined;
2316 if (trace === Trace.Verbose) {
2317 if (message.error && message.error.data) {
2318 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
2321 if (message.result) {
2322 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
2324 else if (message.error === undefined) {
2325 data = 'No result returned.\n\n';
2329 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
2332 logLSPMessage('send-response', message);
2335 function traceReceivedRequest(message) {
2336 if (trace === Trace.Off || !tracer) {
2339 if (traceFormat === TraceFormat.Text) {
2340 let data = undefined;
2341 if (trace === Trace.Verbose && message.params) {
2342 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
2344 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
2347 logLSPMessage('receive-request', message);
2350 function traceReceivedNotification(message) {
2351 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
2354 if (traceFormat === TraceFormat.Text) {
2355 let data = undefined;
2356 if (trace === Trace.Verbose) {
2357 if (message.params) {
2358 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
2361 data = 'No parameters provided.\n\n';
2364 tracer.log(`Received notification '${message.method}'.`, data);
2367 logLSPMessage('receive-notification', message);
2370 function traceReceivedResponse(message, responsePromise) {
2371 if (trace === Trace.Off || !tracer) {
2374 if (traceFormat === TraceFormat.Text) {
2375 let data = undefined;
2376 if (trace === Trace.Verbose) {
2377 if (message.error && message.error.data) {
2378 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
2381 if (message.result) {
2382 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
2384 else if (message.error === undefined) {
2385 data = 'No result returned.\n\n';
2389 if (responsePromise) {
2390 const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
2391 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
2394 tracer.log(`Received response ${message.id} without active response promise.`, data);
2398 logLSPMessage('receive-response', message);
2401 function logLSPMessage(type, message) {
2402 if (!tracer || trace === Trace.Off) {
2405 const lspMessage = {
2409 timestamp: Date.now()
2411 tracer.log(lspMessage);
2413 function throwIfClosedOrDisposed() {
2415 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
2418 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
2421 function throwIfListening() {
2422 if (isListening()) {
2423 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
2426 function throwIfNotListening() {
2427 if (!isListening()) {
2428 throw new Error('Call listen() first.');
2431 function undefinedToNull(param) {
2432 if (param === undefined) {
2439 function nullToUndefined(param) {
2440 if (param === null) {
2447 function isNamedParam(param) {
2448 return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object';
2450 function computeSingleParam(parameterStructures, param) {
2451 switch (parameterStructures) {
2452 case messages_1.ParameterStructures.auto:
2453 if (isNamedParam(param)) {
2454 return nullToUndefined(param);
2457 return [undefinedToNull(param)];
2460 case messages_1.ParameterStructures.byName:
2461 if (!isNamedParam(param)) {
2462 throw new Error(`Recevied parameters by name but param is not an object literal.`);
2464 return nullToUndefined(param);
2465 case messages_1.ParameterStructures.byPosition:
2466 return [undefinedToNull(param)];
2468 throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`);
2471 function computeMessageParams(type, params) {
2473 const numberOfParams = type.numberOfParams;
2474 switch (numberOfParams) {
2479 result = computeSingleParam(type.parameterStructures, params[0]);
2483 for (let i = 0; i < params.length && i < numberOfParams; i++) {
2484 result.push(undefinedToNull(params[i]));
2486 if (params.length < numberOfParams) {
2487 for (let i = params.length; i < numberOfParams; i++) {
2495 const connection = {
2496 sendNotification: (type, ...args) => {
2497 throwIfClosedOrDisposed();
2500 if (Is.string(type)) {
2502 const first = args[0];
2504 let parameterStructures = messages_1.ParameterStructures.auto;
2505 if (messages_1.ParameterStructures.is(first)) {
2507 parameterStructures = first;
2509 let paramEnd = args.length;
2510 const numberOfParams = paramEnd - paramStart;
2511 switch (numberOfParams) {
2513 messageParams = undefined;
2516 messageParams = computeSingleParam(parameterStructures, args[paramStart]);
2519 if (parameterStructures === messages_1.ParameterStructures.byName) {
2520 throw new Error(`Recevied ${numberOfParams} parameters for 'by Name' notification parameter structure.`);
2522 messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));
2527 const params = args;
2528 method = type.method;
2529 messageParams = computeMessageParams(type, params);
2531 const notificationMessage = {
2534 params: messageParams
2536 traceSendingNotification(notificationMessage);
2537 messageWriter.write(notificationMessage);
2539 onNotification: (type, handler) => {
2540 throwIfClosedOrDisposed();
2542 if (Is.func(type)) {
2543 starNotificationHandler = type;
2546 if (Is.string(type)) {
2548 notificationHandlers[type] = { type: undefined, handler };
2551 method = type.method;
2552 notificationHandlers[type.method] = { type, handler };
2557 if (method !== undefined) {
2558 delete notificationHandlers[method];
2561 starNotificationHandler = undefined;
2566 onProgress: (_type, token, handler) => {
2567 if (progressHandlers.has(token)) {
2568 throw new Error(`Progress handler for token ${token} already registered`);
2570 progressHandlers.set(token, handler);
2573 progressHandlers.delete(token);
2577 sendProgress: (_type, token, value) => {
2578 connection.sendNotification(ProgressNotification.type, { token, value });
2580 onUnhandledProgress: unhandledProgressEmitter.event,
2581 sendRequest: (type, ...args) => {
2582 throwIfClosedOrDisposed();
2583 throwIfNotListening();
2586 let token = undefined;
2587 if (Is.string(type)) {
2589 const first = args[0];
2590 const last = args[args.length - 1];
2592 let parameterStructures = messages_1.ParameterStructures.auto;
2593 if (messages_1.ParameterStructures.is(first)) {
2595 parameterStructures = first;
2597 let paramEnd = args.length;
2598 if (cancellation_1.CancellationToken.is(last)) {
2599 paramEnd = paramEnd - 1;
2602 const numberOfParams = paramEnd - paramStart;
2603 switch (numberOfParams) {
2605 messageParams = undefined;
2608 messageParams = computeSingleParam(parameterStructures, args[paramStart]);
2611 if (parameterStructures === messages_1.ParameterStructures.byName) {
2612 throw new Error(`Recevied ${numberOfParams} parameters for 'by Name' request parameter structure.`);
2614 messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));
2619 const params = args;
2620 method = type.method;
2621 messageParams = computeMessageParams(type, params);
2622 const numberOfParams = type.numberOfParams;
2623 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
2625 const id = sequenceNumber++;
2628 disposable = token.onCancellationRequested(() => {
2629 cancellationStrategy.sender.sendCancellation(connection, id);
2632 const result = new Promise((resolve, reject) => {
2633 const requestMessage = {
2637 params: messageParams
2639 const resolveWithCleanup = (r) => {
2641 cancellationStrategy.sender.cleanup(id);
2642 disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
2644 const rejectWithCleanup = (r) => {
2646 cancellationStrategy.sender.cleanup(id);
2647 disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
2649 let responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };
2650 traceSendingRequest(requestMessage);
2652 messageWriter.write(requestMessage);
2655 // Writing the message failed. So we need to reject the promise.
2656 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
2657 responsePromise = null;
2659 if (responsePromise) {
2660 responsePromises[String(id)] = responsePromise;
2665 onRequest: (type, handler) => {
2666 throwIfClosedOrDisposed();
2668 if (StarRequestHandler.is(type)) {
2670 starRequestHandler = type;
2672 else if (Is.string(type)) {
2674 if (handler !== undefined) {
2676 requestHandlers[type] = { handler: handler, type: undefined };
2680 if (handler !== undefined) {
2681 method = type.method;
2682 requestHandlers[type.method] = { type, handler };
2687 if (method === null) {
2690 if (method !== undefined) {
2691 delete requestHandlers[method];
2694 starRequestHandler = undefined;
2699 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
2700 let _sendNotification = false;
2701 let _traceFormat = TraceFormat.Text;
2702 if (sendNotificationOrTraceOptions !== undefined) {
2703 if (Is.boolean(sendNotificationOrTraceOptions)) {
2704 _sendNotification = sendNotificationOrTraceOptions;
2707 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
2708 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
2712 traceFormat = _traceFormat;
2713 if (trace === Trace.Off) {
2719 if (_sendNotification && !isClosed() && !isDisposed()) {
2720 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
2723 onError: errorEmitter.event,
2724 onClose: closeEmitter.event,
2725 onUnhandledNotification: unhandledNotificationEmitter.event,
2726 onDispose: disposeEmitter.event,
2728 messageWriter.end();
2734 state = ConnectionState.Disposed;
2735 disposeEmitter.fire(undefined);
2736 const error = new Error('Connection got disposed.');
2737 Object.keys(responsePromises).forEach((key) => {
2738 responsePromises[key].reject(error);
2740 responsePromises = Object.create(null);
2741 requestTokens = Object.create(null);
2742 messageQueue = new linkedMap_1.LinkedMap();
2743 // Test for backwards compatibility
2744 if (Is.func(messageWriter.dispose)) {
2745 messageWriter.dispose();
2747 if (Is.func(messageReader.dispose)) {
2748 messageReader.dispose();
2752 throwIfClosedOrDisposed();
2754 state = ConnectionState.Listening;
2755 messageReader.listen(callback);
2758 // eslint-disable-next-line no-console
2759 ral_1.default().console.log('inspect');
2762 connection.onNotification(LogTraceNotification.type, (params) => {
2763 if (trace === Trace.Off || !tracer) {
2766 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
2768 connection.onNotification(ProgressNotification.type, (params) => {
2769 const handler = progressHandlers.get(params.token);
2771 handler(params.value);
2774 unhandledProgressEmitter.fire(params);
2779 exports.createMessageConnection = createMessageConnection;
2780 //# sourceMappingURL=connection.js.map
2784 /***/ ((__unused_webpack_module, exports) => {
2787 /*---------------------------------------------------------------------------------------------
2788 * Copyright (c) Microsoft Corporation. All rights reserved.
2789 * Licensed under the MIT License. See License.txt in the project root for license information.
2790 *--------------------------------------------------------------------------------------------*/
2791 Object.defineProperty(exports, "__esModule", ({ value: true }));
2792 exports.LRUCache = exports.LinkedMap = exports.Touch = void 0;
2797 Touch.AsOld = Touch.First;
2799 Touch.AsNew = Touch.Last;
2800 })(Touch = exports.Touch || (exports.Touch = {}));
2803 this[Symbol.toStringTag] = 'LinkedMap';
2804 this._map = new Map();
2805 this._head = undefined;
2806 this._tail = undefined;
2812 this._head = undefined;
2813 this._tail = undefined;
2818 return !this._head && !this._tail;
2825 return (_a = this._head) === null || _a === void 0 ? void 0 : _a.value;
2829 return (_a = this._tail) === null || _a === void 0 ? void 0 : _a.value;
2832 return this._map.has(key);
2834 get(key, touch = Touch.None) {
2835 const item = this._map.get(key);
2839 if (touch !== Touch.None) {
2840 this.touch(item, touch);
2844 set(key, value, touch = Touch.None) {
2845 let item = this._map.get(key);
2848 if (touch !== Touch.None) {
2849 this.touch(item, touch);
2853 item = { key, value, next: undefined, previous: undefined };
2856 this.addItemLast(item);
2859 this.addItemFirst(item);
2862 this.addItemLast(item);
2865 this.addItemLast(item);
2868 this._map.set(key, item);
2874 return !!this.remove(key);
2877 const item = this._map.get(key);
2881 this._map.delete(key);
2882 this.removeItem(item);
2887 if (!this._head && !this._tail) {
2890 if (!this._head || !this._tail) {
2891 throw new Error('Invalid list');
2893 const item = this._head;
2894 this._map.delete(item.key);
2895 this.removeItem(item);
2899 forEach(callbackfn, thisArg) {
2900 const state = this._state;
2901 let current = this._head;
2904 callbackfn.bind(thisArg)(current.value, current.key, this);
2907 callbackfn(current.value, current.key, this);
2909 if (this._state !== state) {
2910 throw new Error(`LinkedMap got modified during iteration.`);
2912 current = current.next;
2917 const state = this._state;
2918 let current = this._head;
2920 [Symbol.iterator]() {
2924 if (map._state !== state) {
2925 throw new Error(`LinkedMap got modified during iteration.`);
2928 const result = { value: current.key, done: false };
2929 current = current.next;
2933 return { value: undefined, done: true };
2941 const state = this._state;
2942 let current = this._head;
2944 [Symbol.iterator]() {
2948 if (map._state !== state) {
2949 throw new Error(`LinkedMap got modified during iteration.`);
2952 const result = { value: current.value, done: false };
2953 current = current.next;
2957 return { value: undefined, done: true };
2965 const state = this._state;
2966 let current = this._head;
2968 [Symbol.iterator]() {
2972 if (map._state !== state) {
2973 throw new Error(`LinkedMap got modified during iteration.`);
2976 const result = { value: [current.key, current.value], done: false };
2977 current = current.next;
2981 return { value: undefined, done: true };
2987 [Symbol.iterator]() {
2988 return this.entries();
2991 if (newSize >= this.size) {
2994 if (newSize === 0) {
2998 let current = this._head;
2999 let currentSize = this.size;
3000 while (current && currentSize > newSize) {
3001 this._map.delete(current.key);
3002 current = current.next;
3005 this._head = current;
3006 this._size = currentSize;
3008 current.previous = undefined;
3012 addItemFirst(item) {
3013 // First time Insert
3014 if (!this._head && !this._tail) {
3017 else if (!this._head) {
3018 throw new Error('Invalid list');
3021 item.next = this._head;
3022 this._head.previous = item;
3028 // First time Insert
3029 if (!this._head && !this._tail) {
3032 else if (!this._tail) {
3033 throw new Error('Invalid list');
3036 item.previous = this._tail;
3037 this._tail.next = item;
3043 if (item === this._head && item === this._tail) {
3044 this._head = undefined;
3045 this._tail = undefined;
3047 else if (item === this._head) {
3048 // This can only happend if size === 1 which is handle
3049 // by the case above.
3051 throw new Error('Invalid list');
3053 item.next.previous = undefined;
3054 this._head = item.next;
3056 else if (item === this._tail) {
3057 // This can only happend if size === 1 which is handle
3058 // by the case above.
3059 if (!item.previous) {
3060 throw new Error('Invalid list');
3062 item.previous.next = undefined;
3063 this._tail = item.previous;
3066 const next = item.next;
3067 const previous = item.previous;
3068 if (!next || !previous) {
3069 throw new Error('Invalid list');
3071 next.previous = previous;
3072 previous.next = next;
3074 item.next = undefined;
3075 item.previous = undefined;
3078 touch(item, touch) {
3079 if (!this._head || !this._tail) {
3080 throw new Error('Invalid list');
3082 if ((touch !== Touch.First && touch !== Touch.Last)) {
3085 if (touch === Touch.First) {
3086 if (item === this._head) {
3089 const next = item.next;
3090 const previous = item.previous;
3092 if (item === this._tail) {
3093 // previous must be defined since item was not head but is tail
3094 // So there are more than on item in the map
3095 previous.next = undefined;
3096 this._tail = previous;
3099 // Both next and previous are not undefined since item was neither head nor tail.
3100 next.previous = previous;
3101 previous.next = next;
3103 // Insert the node at head
3104 item.previous = undefined;
3105 item.next = this._head;
3106 this._head.previous = item;
3110 else if (touch === Touch.Last) {
3111 if (item === this._tail) {
3114 const next = item.next;
3115 const previous = item.previous;
3117 if (item === this._head) {
3118 // next must be defined since item was not tail but is head
3119 // So there are more than on item in the map
3120 next.previous = undefined;
3124 // Both next and previous are not undefined since item was neither head nor tail.
3125 next.previous = previous;
3126 previous.next = next;
3128 item.next = undefined;
3129 item.previous = this._tail;
3130 this._tail.next = item;
3137 this.forEach((value, key) => {
3138 data.push([key, value]);
3144 for (const [key, value] of data) {
3145 this.set(key, value);
3149 exports.LinkedMap = LinkedMap;
3150 class LRUCache extends LinkedMap {
3151 constructor(limit, ratio = 1) {
3153 this._limit = limit;
3154 this._ratio = Math.min(Math.max(0, ratio), 1);
3160 this._limit = limit;
3167 this._ratio = Math.min(Math.max(0, ratio), 1);
3170 get(key, touch = Touch.AsNew) {
3171 return super.get(key, touch);
3174 return super.get(key, Touch.None);
3177 super.set(key, value, Touch.Last);
3182 if (this.size > this._limit) {
3183 this.trimOld(Math.round(this._limit * this._ratio));
3187 exports.LRUCache = LRUCache;
3188 //# sourceMappingURL=linkedMap.js.map
3192 /***/ ((module) => {
3194 module.exports = require("os");;
3198 /***/ ((module) => {
3200 module.exports = require("crypto");;
3204 /***/ ((module) => {
3206 module.exports = require("net");;
3210 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3213 /* --------------------------------------------------------------------------------------------
3214 * Copyright (c) Microsoft Corporation. All rights reserved.
3215 * Licensed under the MIT License. See License.txt in the project root for license information.
3216 * ------------------------------------------------------------------------------------------ */
3217 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3218 if (k2 === undefined) k2 = k;
3219 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3220 }) : (function(o, m, k, k2) {
3221 if (k2 === undefined) k2 = k;
3224 var __exportStar = (this && this.__exportStar) || function(m, exports) {
3225 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
3227 Object.defineProperty(exports, "__esModule", ({ value: true }));
3228 exports.LSPErrorCodes = exports.createProtocolConnection = void 0;
3229 __exportStar(__webpack_require__(6), exports);
3230 __exportStar(__webpack_require__(26), exports);
3231 __exportStar(__webpack_require__(27), exports);
3232 __exportStar(__webpack_require__(28), exports);
3233 var connection_1 = __webpack_require__(45);
3234 Object.defineProperty(exports, "createProtocolConnection", ({ enumerable: true, get: function () { return connection_1.createProtocolConnection; } }));
3236 (function (LSPErrorCodes) {
3238 * This is the start range of LSP reserved error codes.
3239 * It doesn't denote a real error code.
3243 LSPErrorCodes.lspReservedErrorRangeStart = -32899;
3244 LSPErrorCodes.ContentModified = -32801;
3245 LSPErrorCodes.RequestCancelled = -32800;
3247 * This is the end range of LSP reserved error codes.
3248 * It doesn't denote a real error code.
3252 LSPErrorCodes.lspReservedErrorRangeEnd = -32800;
3253 })(LSPErrorCodes = exports.LSPErrorCodes || (exports.LSPErrorCodes = {}));
3254 //# sourceMappingURL=api.js.map
3258 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3260 __webpack_require__.r(__webpack_exports__);
3261 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3262 /* harmony export */ "integer": () => /* binding */ integer,
3263 /* harmony export */ "uinteger": () => /* binding */ uinteger,
3264 /* harmony export */ "Position": () => /* binding */ Position,
3265 /* harmony export */ "Range": () => /* binding */ Range,
3266 /* harmony export */ "Location": () => /* binding */ Location,
3267 /* harmony export */ "LocationLink": () => /* binding */ LocationLink,
3268 /* harmony export */ "Color": () => /* binding */ Color,
3269 /* harmony export */ "ColorInformation": () => /* binding */ ColorInformation,
3270 /* harmony export */ "ColorPresentation": () => /* binding */ ColorPresentation,
3271 /* harmony export */ "FoldingRangeKind": () => /* binding */ FoldingRangeKind,
3272 /* harmony export */ "FoldingRange": () => /* binding */ FoldingRange,
3273 /* harmony export */ "DiagnosticRelatedInformation": () => /* binding */ DiagnosticRelatedInformation,
3274 /* harmony export */ "DiagnosticSeverity": () => /* binding */ DiagnosticSeverity,
3275 /* harmony export */ "DiagnosticTag": () => /* binding */ DiagnosticTag,
3276 /* harmony export */ "CodeDescription": () => /* binding */ CodeDescription,
3277 /* harmony export */ "Diagnostic": () => /* binding */ Diagnostic,
3278 /* harmony export */ "Command": () => /* binding */ Command,
3279 /* harmony export */ "TextEdit": () => /* binding */ TextEdit,
3280 /* harmony export */ "ChangeAnnotation": () => /* binding */ ChangeAnnotation,
3281 /* harmony export */ "ChangeAnnotationIdentifier": () => /* binding */ ChangeAnnotationIdentifier,
3282 /* harmony export */ "AnnotatedTextEdit": () => /* binding */ AnnotatedTextEdit,
3283 /* harmony export */ "TextDocumentEdit": () => /* binding */ TextDocumentEdit,
3284 /* harmony export */ "CreateFile": () => /* binding */ CreateFile,
3285 /* harmony export */ "RenameFile": () => /* binding */ RenameFile,
3286 /* harmony export */ "DeleteFile": () => /* binding */ DeleteFile,
3287 /* harmony export */ "WorkspaceEdit": () => /* binding */ WorkspaceEdit,
3288 /* harmony export */ "WorkspaceChange": () => /* binding */ WorkspaceChange,
3289 /* harmony export */ "TextDocumentIdentifier": () => /* binding */ TextDocumentIdentifier,
3290 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* binding */ VersionedTextDocumentIdentifier,
3291 /* harmony export */ "OptionalVersionedTextDocumentIdentifier": () => /* binding */ OptionalVersionedTextDocumentIdentifier,
3292 /* harmony export */ "TextDocumentItem": () => /* binding */ TextDocumentItem,
3293 /* harmony export */ "MarkupKind": () => /* binding */ MarkupKind,
3294 /* harmony export */ "MarkupContent": () => /* binding */ MarkupContent,
3295 /* harmony export */ "CompletionItemKind": () => /* binding */ CompletionItemKind,
3296 /* harmony export */ "InsertTextFormat": () => /* binding */ InsertTextFormat,
3297 /* harmony export */ "CompletionItemTag": () => /* binding */ CompletionItemTag,
3298 /* harmony export */ "InsertReplaceEdit": () => /* binding */ InsertReplaceEdit,
3299 /* harmony export */ "InsertTextMode": () => /* binding */ InsertTextMode,
3300 /* harmony export */ "CompletionItem": () => /* binding */ CompletionItem,
3301 /* harmony export */ "CompletionList": () => /* binding */ CompletionList,
3302 /* harmony export */ "MarkedString": () => /* binding */ MarkedString,
3303 /* harmony export */ "Hover": () => /* binding */ Hover,
3304 /* harmony export */ "ParameterInformation": () => /* binding */ ParameterInformation,
3305 /* harmony export */ "SignatureInformation": () => /* binding */ SignatureInformation,
3306 /* harmony export */ "DocumentHighlightKind": () => /* binding */ DocumentHighlightKind,
3307 /* harmony export */ "DocumentHighlight": () => /* binding */ DocumentHighlight,
3308 /* harmony export */ "SymbolKind": () => /* binding */ SymbolKind,
3309 /* harmony export */ "SymbolTag": () => /* binding */ SymbolTag,
3310 /* harmony export */ "SymbolInformation": () => /* binding */ SymbolInformation,
3311 /* harmony export */ "DocumentSymbol": () => /* binding */ DocumentSymbol,
3312 /* harmony export */ "CodeActionKind": () => /* binding */ CodeActionKind,
3313 /* harmony export */ "CodeActionContext": () => /* binding */ CodeActionContext,
3314 /* harmony export */ "CodeAction": () => /* binding */ CodeAction,
3315 /* harmony export */ "CodeLens": () => /* binding */ CodeLens,
3316 /* harmony export */ "FormattingOptions": () => /* binding */ FormattingOptions,
3317 /* harmony export */ "DocumentLink": () => /* binding */ DocumentLink,
3318 /* harmony export */ "SelectionRange": () => /* binding */ SelectionRange,
3319 /* harmony export */ "EOL": () => /* binding */ EOL,
3320 /* harmony export */ "TextDocument": () => /* binding */ TextDocument
3321 /* harmony export */ });
3322 /* --------------------------------------------------------------------------------------------
3323 * Copyright (c) Microsoft Corporation. All rights reserved.
3324 * Licensed under the MIT License. See License.txt in the project root for license information.
3325 * ------------------------------------------------------------------------------------------ */
3328 (function (integer) {
3329 integer.MIN_VALUE = -2147483648;
3330 integer.MAX_VALUE = 2147483647;
3331 })(integer || (integer = {}));
3333 (function (uinteger) {
3334 uinteger.MIN_VALUE = 0;
3335 uinteger.MAX_VALUE = 2147483647;
3336 })(uinteger || (uinteger = {}));
3338 * The Position namespace provides helper functions to work with
3339 * [Position](#Position) literals.
3342 (function (Position) {
3344 * Creates a new Position literal from the given line and character.
3345 * @param line The position's line.
3346 * @param character The position's character.
3348 function create(line, character) {
3349 if (line === Number.MAX_VALUE) {
3350 line = uinteger.MAX_VALUE;
3352 if (character === Number.MAX_VALUE) {
3353 character = uinteger.MAX_VALUE;
3355 return { line: line, character: character };
3357 Position.create = create;
3359 * Checks whether the given literal conforms to the [Position](#Position) interface.
3361 function is(value) {
3362 var candidate = value;
3363 return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
3366 })(Position || (Position = {}));
3368 * The Range namespace provides helper functions to work with
3369 * [Range](#Range) literals.
3373 function create(one, two, three, four) {
3374 if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
3375 return { start: Position.create(one, two), end: Position.create(three, four) };
3377 else if (Position.is(one) && Position.is(two)) {
3378 return { start: one, end: two };
3381 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
3384 Range.create = create;
3386 * Checks whether the given literal conforms to the [Range](#Range) interface.
3388 function is(value) {
3389 var candidate = value;
3390 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
3393 })(Range || (Range = {}));
3395 * The Location namespace provides helper functions to work with
3396 * [Location](#Location) literals.
3399 (function (Location) {
3401 * Creates a Location literal.
3402 * @param uri The location's uri.
3403 * @param range The location's range.
3405 function create(uri, range) {
3406 return { uri: uri, range: range };
3408 Location.create = create;
3410 * Checks whether the given literal conforms to the [Location](#Location) interface.
3412 function is(value) {
3413 var candidate = value;
3414 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
3417 })(Location || (Location = {}));
3419 * The LocationLink namespace provides helper functions to work with
3420 * [LocationLink](#LocationLink) literals.
3423 (function (LocationLink) {
3425 * Creates a LocationLink literal.
3426 * @param targetUri The definition's uri.
3427 * @param targetRange The full range of the definition.
3428 * @param targetSelectionRange The span of the symbol definition at the target.
3429 * @param originSelectionRange The span of the symbol being defined in the originating source file.
3431 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
3432 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
3434 LocationLink.create = create;
3436 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
3438 function is(value) {
3439 var candidate = value;
3440 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
3441 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
3442 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
3444 LocationLink.is = is;
3445 })(LocationLink || (LocationLink = {}));
3447 * The Color namespace provides helper functions to work with
3448 * [Color](#Color) literals.
3453 * Creates a new Color literal.
3455 function create(red, green, blue, alpha) {
3463 Color.create = create;
3465 * Checks whether the given literal conforms to the [Color](#Color) interface.
3467 function is(value) {
3468 var candidate = value;
3469 return Is.numberRange(candidate.red, 0, 1)
3470 && Is.numberRange(candidate.green, 0, 1)
3471 && Is.numberRange(candidate.blue, 0, 1)
3472 && Is.numberRange(candidate.alpha, 0, 1);
3475 })(Color || (Color = {}));
3477 * The ColorInformation namespace provides helper functions to work with
3478 * [ColorInformation](#ColorInformation) literals.
3480 var ColorInformation;
3481 (function (ColorInformation) {
3483 * Creates a new ColorInformation literal.
3485 function create(range, color) {
3491 ColorInformation.create = create;
3493 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3495 function is(value) {
3496 var candidate = value;
3497 return Range.is(candidate.range) && Color.is(candidate.color);
3499 ColorInformation.is = is;
3500 })(ColorInformation || (ColorInformation = {}));
3502 * The Color namespace provides helper functions to work with
3503 * [ColorPresentation](#ColorPresentation) literals.
3505 var ColorPresentation;
3506 (function (ColorPresentation) {
3508 * Creates a new ColorInformation literal.
3510 function create(label, textEdit, additionalTextEdits) {
3514 additionalTextEdits: additionalTextEdits,
3517 ColorPresentation.create = create;
3519 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3521 function is(value) {
3522 var candidate = value;
3523 return Is.string(candidate.label)
3524 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
3525 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
3527 ColorPresentation.is = is;
3528 })(ColorPresentation || (ColorPresentation = {}));
3530 * Enum of known range kinds
3532 var FoldingRangeKind;
3533 (function (FoldingRangeKind) {
3535 * Folding range for a comment
3537 FoldingRangeKind["Comment"] = "comment";
3539 * Folding range for a imports or includes
3541 FoldingRangeKind["Imports"] = "imports";
3543 * Folding range for a region (e.g. `#region`)
3545 FoldingRangeKind["Region"] = "region";
3546 })(FoldingRangeKind || (FoldingRangeKind = {}));
3548 * The folding range namespace provides helper functions to work with
3549 * [FoldingRange](#FoldingRange) literals.
3552 (function (FoldingRange) {
3554 * Creates a new FoldingRange literal.
3556 function create(startLine, endLine, startCharacter, endCharacter, kind) {
3558 startLine: startLine,
3561 if (Is.defined(startCharacter)) {
3562 result.startCharacter = startCharacter;
3564 if (Is.defined(endCharacter)) {
3565 result.endCharacter = endCharacter;
3567 if (Is.defined(kind)) {
3572 FoldingRange.create = create;
3574 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
3576 function is(value) {
3577 var candidate = value;
3578 return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
3579 && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
3580 && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
3581 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
3583 FoldingRange.is = is;
3584 })(FoldingRange || (FoldingRange = {}));
3586 * The DiagnosticRelatedInformation namespace provides helper functions to work with
3587 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
3589 var DiagnosticRelatedInformation;
3590 (function (DiagnosticRelatedInformation) {
3592 * Creates a new DiagnosticRelatedInformation literal.
3594 function create(location, message) {
3600 DiagnosticRelatedInformation.create = create;
3602 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
3604 function is(value) {
3605 var candidate = value;
3606 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
3608 DiagnosticRelatedInformation.is = is;
3609 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
3611 * The diagnostic's severity.
3613 var DiagnosticSeverity;
3614 (function (DiagnosticSeverity) {
3618 DiagnosticSeverity.Error = 1;
3620 * Reports a warning.
3622 DiagnosticSeverity.Warning = 2;
3624 * Reports an information.
3626 DiagnosticSeverity.Information = 3;
3630 DiagnosticSeverity.Hint = 4;
3631 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
3633 * The diagnostic tags.
3638 (function (DiagnosticTag) {
3640 * Unused or unnecessary code.
3642 * Clients are allowed to render diagnostics with this tag faded out instead of having
3643 * an error squiggle.
3645 DiagnosticTag.Unnecessary = 1;
3647 * Deprecated or obsolete code.
3649 * Clients are allowed to rendered diagnostics with this tag strike through.
3651 DiagnosticTag.Deprecated = 2;
3652 })(DiagnosticTag || (DiagnosticTag = {}));
3654 * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
3658 var CodeDescription;
3659 (function (CodeDescription) {
3660 function is(value) {
3661 var candidate = value;
3662 return candidate !== undefined && candidate !== null && Is.string(candidate.href);
3664 CodeDescription.is = is;
3665 })(CodeDescription || (CodeDescription = {}));
3667 * The Diagnostic namespace provides helper functions to work with
3668 * [Diagnostic](#Diagnostic) literals.
3671 (function (Diagnostic) {
3673 * Creates a new Diagnostic literal.
3675 function create(range, message, severity, code, source, relatedInformation) {
3676 var result = { range: range, message: message };
3677 if (Is.defined(severity)) {
3678 result.severity = severity;
3680 if (Is.defined(code)) {
3683 if (Is.defined(source)) {
3684 result.source = source;
3686 if (Is.defined(relatedInformation)) {
3687 result.relatedInformation = relatedInformation;
3691 Diagnostic.create = create;
3693 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
3695 function is(value) {
3697 var candidate = value;
3698 return Is.defined(candidate)
3699 && Range.is(candidate.range)
3700 && Is.string(candidate.message)
3701 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
3702 && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
3703 && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
3704 && (Is.string(candidate.source) || Is.undefined(candidate.source))
3705 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
3708 })(Diagnostic || (Diagnostic = {}));
3710 * The Command namespace provides helper functions to work with
3711 * [Command](#Command) literals.
3714 (function (Command) {
3716 * Creates a new Command literal.
3718 function create(title, command) {
3720 for (var _i = 2; _i < arguments.length; _i++) {
3721 args[_i - 2] = arguments[_i];
3723 var result = { title: title, command: command };
3724 if (Is.defined(args) && args.length > 0) {
3725 result.arguments = args;
3729 Command.create = create;
3731 * Checks whether the given literal conforms to the [Command](#Command) interface.
3733 function is(value) {
3734 var candidate = value;
3735 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
3738 })(Command || (Command = {}));
3740 * The TextEdit namespace provides helper function to create replace,
3741 * insert and delete edits more easily.
3744 (function (TextEdit) {
3746 * Creates a replace text edit.
3747 * @param range The range of text to be replaced.
3748 * @param newText The new text.
3750 function replace(range, newText) {
3751 return { range: range, newText: newText };
3753 TextEdit.replace = replace;
3755 * Creates a insert text edit.
3756 * @param position The position to insert the text at.
3757 * @param newText The text to be inserted.
3759 function insert(position, newText) {
3760 return { range: { start: position, end: position }, newText: newText };
3762 TextEdit.insert = insert;
3764 * Creates a delete text edit.
3765 * @param range The range of text to be deleted.
3767 function del(range) {
3768 return { range: range, newText: '' };
3771 function is(value) {
3772 var candidate = value;
3773 return Is.objectLiteral(candidate)
3774 && Is.string(candidate.newText)
3775 && Range.is(candidate.range);
3778 })(TextEdit || (TextEdit = {}));
3779 var ChangeAnnotation;
3780 (function (ChangeAnnotation) {
3781 function create(label, needsConfirmation, description) {
3782 var result = { label: label };
3783 if (needsConfirmation !== undefined) {
3784 result.needsConfirmation = needsConfirmation;
3786 if (description !== undefined) {
3787 result.description = description;
3791 ChangeAnnotation.create = create;
3792 function is(value) {
3793 var candidate = value;
3794 return candidate !== undefined && Is.objectLiteral(candidate) && Is.string(candidate.label) &&
3795 (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
3796 (Is.string(candidate.description) || candidate.description === undefined);
3798 ChangeAnnotation.is = is;
3799 })(ChangeAnnotation || (ChangeAnnotation = {}));
3800 var ChangeAnnotationIdentifier;
3801 (function (ChangeAnnotationIdentifier) {
3802 function is(value) {
3803 var candidate = value;
3804 return typeof candidate === 'string';
3806 ChangeAnnotationIdentifier.is = is;
3807 })(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
3808 var AnnotatedTextEdit;
3809 (function (AnnotatedTextEdit) {
3811 * Creates an annotated replace text edit.
3813 * @param range The range of text to be replaced.
3814 * @param newText The new text.
3815 * @param annotation The annotation.
3817 function replace(range, newText, annotation) {
3818 return { range: range, newText: newText, annotationId: annotation };
3820 AnnotatedTextEdit.replace = replace;
3822 * Creates an annotated insert text edit.
3824 * @param position The position to insert the text at.
3825 * @param newText The text to be inserted.
3826 * @param annotation The annotation.
3828 function insert(position, newText, annotation) {
3829 return { range: { start: position, end: position }, newText: newText, annotationId: annotation };
3831 AnnotatedTextEdit.insert = insert;
3833 * Creates an annotated delete text edit.
3835 * @param range The range of text to be deleted.
3836 * @param annotation The annotation.
3838 function del(range, annotation) {
3839 return { range: range, newText: '', annotationId: annotation };
3841 AnnotatedTextEdit.del = del;
3842 function is(value) {
3843 var candidate = value;
3844 return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
3846 AnnotatedTextEdit.is = is;
3847 })(AnnotatedTextEdit || (AnnotatedTextEdit = {}));
3849 * The TextDocumentEdit namespace provides helper function to create
3850 * an edit that manipulates a text document.
3852 var TextDocumentEdit;
3853 (function (TextDocumentEdit) {
3855 * Creates a new `TextDocumentEdit`
3857 function create(textDocument, edits) {
3858 return { textDocument: textDocument, edits: edits };
3860 TextDocumentEdit.create = create;
3861 function is(value) {
3862 var candidate = value;
3863 return Is.defined(candidate)
3864 && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
3865 && Array.isArray(candidate.edits);
3867 TextDocumentEdit.is = is;
3868 })(TextDocumentEdit || (TextDocumentEdit = {}));
3870 (function (CreateFile) {
3871 function create(uri, options, annotation) {
3876 if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
3877 result.options = options;
3879 if (annotation !== undefined) {
3880 result.annotationId = annotation;
3884 CreateFile.create = create;
3885 function is(value) {
3886 var candidate = value;
3887 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
3888 ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
3891 })(CreateFile || (CreateFile = {}));
3893 (function (RenameFile) {
3894 function create(oldUri, newUri, options, annotation) {
3900 if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
3901 result.options = options;
3903 if (annotation !== undefined) {
3904 result.annotationId = annotation;
3908 RenameFile.create = create;
3909 function is(value) {
3910 var candidate = value;
3911 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
3912 ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
3915 })(RenameFile || (RenameFile = {}));
3917 (function (DeleteFile) {
3918 function create(uri, options, annotation) {
3923 if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
3924 result.options = options;
3926 if (annotation !== undefined) {
3927 result.annotationId = annotation;
3931 DeleteFile.create = create;
3932 function is(value) {
3933 var candidate = value;
3934 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
3935 ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
3938 })(DeleteFile || (DeleteFile = {}));
3940 (function (WorkspaceEdit) {
3941 function is(value) {
3942 var candidate = value;
3944 (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
3945 (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
3946 if (Is.string(change.kind)) {
3947 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
3950 return TextDocumentEdit.is(change);
3954 WorkspaceEdit.is = is;
3955 })(WorkspaceEdit || (WorkspaceEdit = {}));
3956 var TextEditChangeImpl = /** @class */ (function () {
3957 function TextEditChangeImpl(edits, changeAnnotations) {
3959 this.changeAnnotations = changeAnnotations;
3961 TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
3964 if (annotation === undefined) {
3965 edit = TextEdit.insert(position, newText);
3967 else if (ChangeAnnotationIdentifier.is(annotation)) {
3969 edit = AnnotatedTextEdit.insert(position, newText, annotation);
3972 this.assertChangeAnnotations(this.changeAnnotations);
3973 id = this.changeAnnotations.manage(annotation);
3974 edit = AnnotatedTextEdit.insert(position, newText, id);
3976 this.edits.push(edit);
3977 if (id !== undefined) {
3981 TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
3984 if (annotation === undefined) {
3985 edit = TextEdit.replace(range, newText);
3987 else if (ChangeAnnotationIdentifier.is(annotation)) {
3989 edit = AnnotatedTextEdit.replace(range, newText, annotation);
3992 this.assertChangeAnnotations(this.changeAnnotations);
3993 id = this.changeAnnotations.manage(annotation);
3994 edit = AnnotatedTextEdit.replace(range, newText, id);
3996 this.edits.push(edit);
3997 if (id !== undefined) {
4001 TextEditChangeImpl.prototype.delete = function (range, annotation) {
4004 if (annotation === undefined) {
4005 edit = TextEdit.del(range);
4007 else if (ChangeAnnotationIdentifier.is(annotation)) {
4009 edit = AnnotatedTextEdit.del(range, annotation);
4012 this.assertChangeAnnotations(this.changeAnnotations);
4013 id = this.changeAnnotations.manage(annotation);
4014 edit = AnnotatedTextEdit.del(range, id);
4016 this.edits.push(edit);
4017 if (id !== undefined) {
4021 TextEditChangeImpl.prototype.add = function (edit) {
4022 this.edits.push(edit);
4024 TextEditChangeImpl.prototype.all = function () {
4027 TextEditChangeImpl.prototype.clear = function () {
4028 this.edits.splice(0, this.edits.length);
4030 TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
4031 if (value === undefined) {
4032 throw new Error("Text edit change is not configured to manage change annotations.");
4035 return TextEditChangeImpl;
4040 var ChangeAnnotations = /** @class */ (function () {
4041 function ChangeAnnotations(annotations) {
4042 this._annotations = annotations === undefined ? Object.create(null) : annotations;
4046 ChangeAnnotations.prototype.all = function () {
4047 return this._annotations;
4049 Object.defineProperty(ChangeAnnotations.prototype, "size", {
4056 ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
4058 if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
4059 id = idOrAnnotation;
4063 annotation = idOrAnnotation;
4065 if (this._annotations[id] !== undefined) {
4066 throw new Error("Id " + id + " is already in use.");
4068 if (annotation === undefined) {
4069 throw new Error("No annotation provided for id " + id);
4071 this._annotations[id] = annotation;
4075 ChangeAnnotations.prototype.nextId = function () {
4077 return this._counter.toString();
4079 return ChangeAnnotations;
4082 * A workspace change helps constructing changes to a workspace.
4084 var WorkspaceChange = /** @class */ (function () {
4085 function WorkspaceChange(workspaceEdit) {
4087 this._textEditChanges = Object.create(null);
4088 if (workspaceEdit !== undefined) {
4089 this._workspaceEdit = workspaceEdit;
4090 if (workspaceEdit.documentChanges) {
4091 this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
4092 workspaceEdit.changeAnnotations = this._changeAnnotations.all();
4093 workspaceEdit.documentChanges.forEach(function (change) {
4094 if (TextDocumentEdit.is(change)) {
4095 var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
4096 _this._textEditChanges[change.textDocument.uri] = textEditChange;
4100 else if (workspaceEdit.changes) {
4101 Object.keys(workspaceEdit.changes).forEach(function (key) {
4102 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
4103 _this._textEditChanges[key] = textEditChange;
4108 this._workspaceEdit = {};
4111 Object.defineProperty(WorkspaceChange.prototype, "edit", {
4113 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
4114 * use to be returned from a workspace edit operation like rename.
4117 this.initDocumentChanges();
4118 if (this._changeAnnotations !== undefined) {
4119 if (this._changeAnnotations.size === 0) {
4120 this._workspaceEdit.changeAnnotations = undefined;
4123 this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
4126 return this._workspaceEdit;
4131 WorkspaceChange.prototype.getTextEditChange = function (key) {
4132 if (OptionalVersionedTextDocumentIdentifier.is(key)) {
4133 this.initDocumentChanges();
4134 if (this._workspaceEdit.documentChanges === undefined) {
4135 throw new Error('Workspace edit is not configured for document changes.');
4137 var textDocument = { uri: key.uri, version: key.version };
4138 var result = this._textEditChanges[textDocument.uri];
4141 var textDocumentEdit = {
4142 textDocument: textDocument,
4145 this._workspaceEdit.documentChanges.push(textDocumentEdit);
4146 result = new TextEditChangeImpl(edits, this._changeAnnotations);
4147 this._textEditChanges[textDocument.uri] = result;
4153 if (this._workspaceEdit.changes === undefined) {
4154 throw new Error('Workspace edit is not configured for normal text edit changes.');
4156 var result = this._textEditChanges[key];
4159 this._workspaceEdit.changes[key] = edits;
4160 result = new TextEditChangeImpl(edits);
4161 this._textEditChanges[key] = result;
4166 WorkspaceChange.prototype.initDocumentChanges = function () {
4167 if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
4168 this._changeAnnotations = new ChangeAnnotations();
4169 this._workspaceEdit.documentChanges = [];
4170 this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
4173 WorkspaceChange.prototype.initChanges = function () {
4174 if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
4175 this._workspaceEdit.changes = Object.create(null);
4178 WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
4179 this.initDocumentChanges();
4180 if (this._workspaceEdit.documentChanges === undefined) {
4181 throw new Error('Workspace edit is not configured for document changes.');
4184 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
4185 annotation = optionsOrAnnotation;
4188 options = optionsOrAnnotation;
4192 if (annotation === undefined) {
4193 operation = CreateFile.create(uri, options);
4196 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
4197 operation = CreateFile.create(uri, options, id);
4199 this._workspaceEdit.documentChanges.push(operation);
4200 if (id !== undefined) {
4204 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
4205 this.initDocumentChanges();
4206 if (this._workspaceEdit.documentChanges === undefined) {
4207 throw new Error('Workspace edit is not configured for document changes.');
4210 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
4211 annotation = optionsOrAnnotation;
4214 options = optionsOrAnnotation;
4218 if (annotation === undefined) {
4219 operation = RenameFile.create(oldUri, newUri, options);
4222 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
4223 operation = RenameFile.create(oldUri, newUri, options, id);
4225 this._workspaceEdit.documentChanges.push(operation);
4226 if (id !== undefined) {
4230 WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
4231 this.initDocumentChanges();
4232 if (this._workspaceEdit.documentChanges === undefined) {
4233 throw new Error('Workspace edit is not configured for document changes.');
4236 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
4237 annotation = optionsOrAnnotation;
4240 options = optionsOrAnnotation;
4244 if (annotation === undefined) {
4245 operation = DeleteFile.create(uri, options);
4248 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
4249 operation = DeleteFile.create(uri, options, id);
4251 this._workspaceEdit.documentChanges.push(operation);
4252 if (id !== undefined) {
4256 return WorkspaceChange;
4260 * The TextDocumentIdentifier namespace provides helper functions to work with
4261 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
4263 var TextDocumentIdentifier;
4264 (function (TextDocumentIdentifier) {
4266 * Creates a new TextDocumentIdentifier literal.
4267 * @param uri The document's uri.
4269 function create(uri) {
4270 return { uri: uri };
4272 TextDocumentIdentifier.create = create;
4274 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
4276 function is(value) {
4277 var candidate = value;
4278 return Is.defined(candidate) && Is.string(candidate.uri);
4280 TextDocumentIdentifier.is = is;
4281 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
4283 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
4284 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
4286 var VersionedTextDocumentIdentifier;
4287 (function (VersionedTextDocumentIdentifier) {
4289 * Creates a new VersionedTextDocumentIdentifier literal.
4290 * @param uri The document's uri.
4291 * @param uri The document's text.
4293 function create(uri, version) {
4294 return { uri: uri, version: version };
4296 VersionedTextDocumentIdentifier.create = create;
4298 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
4300 function is(value) {
4301 var candidate = value;
4302 return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
4304 VersionedTextDocumentIdentifier.is = is;
4305 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
4307 * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
4308 * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.
4310 var OptionalVersionedTextDocumentIdentifier;
4311 (function (OptionalVersionedTextDocumentIdentifier) {
4313 * Creates a new OptionalVersionedTextDocumentIdentifier literal.
4314 * @param uri The document's uri.
4315 * @param uri The document's text.
4317 function create(uri, version) {
4318 return { uri: uri, version: version };
4320 OptionalVersionedTextDocumentIdentifier.create = create;
4322 * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.
4324 function is(value) {
4325 var candidate = value;
4326 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
4328 OptionalVersionedTextDocumentIdentifier.is = is;
4329 })(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
4331 * The TextDocumentItem namespace provides helper functions to work with
4332 * [TextDocumentItem](#TextDocumentItem) literals.
4334 var TextDocumentItem;
4335 (function (TextDocumentItem) {
4337 * Creates a new TextDocumentItem literal.
4338 * @param uri The document's uri.
4339 * @param languageId The document's language identifier.
4340 * @param version The document's version number.
4341 * @param text The document's text.
4343 function create(uri, languageId, version, text) {
4344 return { uri: uri, languageId: languageId, version: version, text: text };
4346 TextDocumentItem.create = create;
4348 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
4350 function is(value) {
4351 var candidate = value;
4352 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
4354 TextDocumentItem.is = is;
4355 })(TextDocumentItem || (TextDocumentItem = {}));
4357 * Describes the content type that a client supports in various
4358 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
4360 * Please note that `MarkupKinds` must not start with a `$`. This kinds
4361 * are reserved for internal usage.
4364 (function (MarkupKind) {
4366 * Plain text is supported as a content format
4368 MarkupKind.PlainText = 'plaintext';
4370 * Markdown is supported as a content format
4372 MarkupKind.Markdown = 'markdown';
4373 })(MarkupKind || (MarkupKind = {}));
4374 (function (MarkupKind) {
4376 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
4378 function is(value) {
4379 var candidate = value;
4380 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
4383 })(MarkupKind || (MarkupKind = {}));
4385 (function (MarkupContent) {
4387 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
4389 function is(value) {
4390 var candidate = value;
4391 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
4393 MarkupContent.is = is;
4394 })(MarkupContent || (MarkupContent = {}));
4396 * The kind of a completion entry.
4398 var CompletionItemKind;
4399 (function (CompletionItemKind) {
4400 CompletionItemKind.Text = 1;
4401 CompletionItemKind.Method = 2;
4402 CompletionItemKind.Function = 3;
4403 CompletionItemKind.Constructor = 4;
4404 CompletionItemKind.Field = 5;
4405 CompletionItemKind.Variable = 6;
4406 CompletionItemKind.Class = 7;
4407 CompletionItemKind.Interface = 8;
4408 CompletionItemKind.Module = 9;
4409 CompletionItemKind.Property = 10;
4410 CompletionItemKind.Unit = 11;
4411 CompletionItemKind.Value = 12;
4412 CompletionItemKind.Enum = 13;
4413 CompletionItemKind.Keyword = 14;
4414 CompletionItemKind.Snippet = 15;
4415 CompletionItemKind.Color = 16;
4416 CompletionItemKind.File = 17;
4417 CompletionItemKind.Reference = 18;
4418 CompletionItemKind.Folder = 19;
4419 CompletionItemKind.EnumMember = 20;
4420 CompletionItemKind.Constant = 21;
4421 CompletionItemKind.Struct = 22;
4422 CompletionItemKind.Event = 23;
4423 CompletionItemKind.Operator = 24;
4424 CompletionItemKind.TypeParameter = 25;
4425 })(CompletionItemKind || (CompletionItemKind = {}));
4427 * Defines whether the insert text in a completion item should be interpreted as
4428 * plain text or a snippet.
4430 var InsertTextFormat;
4431 (function (InsertTextFormat) {
4433 * The primary text to be inserted is treated as a plain string.
4435 InsertTextFormat.PlainText = 1;
4437 * The primary text to be inserted is treated as a snippet.
4439 * A snippet can define tab stops and placeholders with `$1`, `$2`
4440 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4441 * the end of the snippet. Placeholders with equal identifiers are linked,
4442 * that is typing in one will update others too.
4444 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
4446 InsertTextFormat.Snippet = 2;
4447 })(InsertTextFormat || (InsertTextFormat = {}));
4449 * Completion item tags are extra annotations that tweak the rendering of a completion
4454 var CompletionItemTag;
4455 (function (CompletionItemTag) {
4457 * Render a completion as obsolete, usually using a strike-out.
4459 CompletionItemTag.Deprecated = 1;
4460 })(CompletionItemTag || (CompletionItemTag = {}));
4462 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
4466 var InsertReplaceEdit;
4467 (function (InsertReplaceEdit) {
4469 * Creates a new insert / replace edit
4471 function create(newText, insert, replace) {
4472 return { newText: newText, insert: insert, replace: replace };
4474 InsertReplaceEdit.create = create;
4476 * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
4478 function is(value) {
4479 var candidate = value;
4480 return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
4482 InsertReplaceEdit.is = is;
4483 })(InsertReplaceEdit || (InsertReplaceEdit = {}));
4485 * How whitespace and indentation is handled during completion
4491 (function (InsertTextMode) {
4493 * The insertion or replace strings is taken as it is. If the
4494 * value is multi line the lines below the cursor will be
4495 * inserted using the indentation defined in the string value.
4496 * The client will not apply any kind of adjustments to the
4499 InsertTextMode.asIs = 1;
4501 * The editor adjusts leading whitespace of new lines so that
4502 * they match the indentation up to the cursor of the line for
4503 * which the item is accepted.
4505 * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
4506 * multi line completion item is indented using 2 tabs and all
4507 * following lines inserted will be indented using 2 tabs as well.
4509 InsertTextMode.adjustIndentation = 2;
4510 })(InsertTextMode || (InsertTextMode = {}));
4512 * The CompletionItem namespace provides functions to deal with
4516 (function (CompletionItem) {
4518 * Create a completion item and seed it with a label.
4519 * @param label The completion item's label
4521 function create(label) {
4522 return { label: label };
4524 CompletionItem.create = create;
4525 })(CompletionItem || (CompletionItem = {}));
4527 * The CompletionList namespace provides functions to deal with
4531 (function (CompletionList) {
4533 * Creates a new completion list.
4535 * @param items The completion items.
4536 * @param isIncomplete The list is not complete.
4538 function create(items, isIncomplete) {
4539 return { items: items ? items : [], isIncomplete: !!isIncomplete };
4541 CompletionList.create = create;
4542 })(CompletionList || (CompletionList = {}));
4544 (function (MarkedString) {
4546 * Creates a marked string from plain text.
4548 * @param plainText The plain text.
4550 function fromPlainText(plainText) {
4551 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
4553 MarkedString.fromPlainText = fromPlainText;
4555 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
4557 function is(value) {
4558 var candidate = value;
4559 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
4561 MarkedString.is = is;
4562 })(MarkedString || (MarkedString = {}));
4566 * Checks whether the given value conforms to the [Hover](#Hover) interface.
4568 function is(value) {
4569 var candidate = value;
4570 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
4571 MarkedString.is(candidate.contents) ||
4572 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
4575 })(Hover || (Hover = {}));
4577 * The ParameterInformation namespace provides helper functions to work with
4578 * [ParameterInformation](#ParameterInformation) literals.
4580 var ParameterInformation;
4581 (function (ParameterInformation) {
4583 * Creates a new parameter information literal.
4585 * @param label A label string.
4586 * @param documentation A doc string.
4588 function create(label, documentation) {
4589 return documentation ? { label: label, documentation: documentation } : { label: label };
4591 ParameterInformation.create = create;
4592 })(ParameterInformation || (ParameterInformation = {}));
4594 * The SignatureInformation namespace provides helper functions to work with
4595 * [SignatureInformation](#SignatureInformation) literals.
4597 var SignatureInformation;
4598 (function (SignatureInformation) {
4599 function create(label, documentation) {
4600 var parameters = [];
4601 for (var _i = 2; _i < arguments.length; _i++) {
4602 parameters[_i - 2] = arguments[_i];
4604 var result = { label: label };
4605 if (Is.defined(documentation)) {
4606 result.documentation = documentation;
4608 if (Is.defined(parameters)) {
4609 result.parameters = parameters;
4612 result.parameters = [];
4616 SignatureInformation.create = create;
4617 })(SignatureInformation || (SignatureInformation = {}));
4619 * A document highlight kind.
4621 var DocumentHighlightKind;
4622 (function (DocumentHighlightKind) {
4624 * A textual occurrence.
4626 DocumentHighlightKind.Text = 1;
4628 * Read-access of a symbol, like reading a variable.
4630 DocumentHighlightKind.Read = 2;
4632 * Write-access of a symbol, like writing to a variable.
4634 DocumentHighlightKind.Write = 3;
4635 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
4637 * DocumentHighlight namespace to provide helper functions to work with
4638 * [DocumentHighlight](#DocumentHighlight) literals.
4640 var DocumentHighlight;
4641 (function (DocumentHighlight) {
4643 * Create a DocumentHighlight object.
4644 * @param range The range the highlight applies to.
4646 function create(range, kind) {
4647 var result = { range: range };
4648 if (Is.number(kind)) {
4653 DocumentHighlight.create = create;
4654 })(DocumentHighlight || (DocumentHighlight = {}));
4659 (function (SymbolKind) {
4660 SymbolKind.File = 1;
4661 SymbolKind.Module = 2;
4662 SymbolKind.Namespace = 3;
4663 SymbolKind.Package = 4;
4664 SymbolKind.Class = 5;
4665 SymbolKind.Method = 6;
4666 SymbolKind.Property = 7;
4667 SymbolKind.Field = 8;
4668 SymbolKind.Constructor = 9;
4669 SymbolKind.Enum = 10;
4670 SymbolKind.Interface = 11;
4671 SymbolKind.Function = 12;
4672 SymbolKind.Variable = 13;
4673 SymbolKind.Constant = 14;
4674 SymbolKind.String = 15;
4675 SymbolKind.Number = 16;
4676 SymbolKind.Boolean = 17;
4677 SymbolKind.Array = 18;
4678 SymbolKind.Object = 19;
4679 SymbolKind.Key = 20;
4680 SymbolKind.Null = 21;
4681 SymbolKind.EnumMember = 22;
4682 SymbolKind.Struct = 23;
4683 SymbolKind.Event = 24;
4684 SymbolKind.Operator = 25;
4685 SymbolKind.TypeParameter = 26;
4686 })(SymbolKind || (SymbolKind = {}));
4688 * Symbol tags are extra annotations that tweak the rendering of a symbol.
4692 (function (SymbolTag) {
4694 * Render a symbol as obsolete, usually using a strike-out.
4696 SymbolTag.Deprecated = 1;
4697 })(SymbolTag || (SymbolTag = {}));
4698 var SymbolInformation;
4699 (function (SymbolInformation) {
4701 * Creates a new symbol information literal.
4703 * @param name The name of the symbol.
4704 * @param kind The kind of the symbol.
4705 * @param range The range of the location of the symbol.
4706 * @param uri The resource of the location of symbol, defaults to the current document.
4707 * @param containerName The name of the symbol containing the symbol.
4709 function create(name, kind, range, uri, containerName) {
4713 location: { uri: uri, range: range }
4715 if (containerName) {
4716 result.containerName = containerName;
4720 SymbolInformation.create = create;
4721 })(SymbolInformation || (SymbolInformation = {}));
4723 (function (DocumentSymbol) {
4725 * Creates a new symbol information literal.
4727 * @param name The name of the symbol.
4728 * @param detail The detail of the symbol.
4729 * @param kind The kind of the symbol.
4730 * @param range The range of the symbol.
4731 * @param selectionRange The selectionRange of the symbol.
4732 * @param children Children of the symbol.
4734 function create(name, detail, kind, range, selectionRange, children) {
4740 selectionRange: selectionRange
4742 if (children !== undefined) {
4743 result.children = children;
4747 DocumentSymbol.create = create;
4749 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
4751 function is(value) {
4752 var candidate = value;
4754 Is.string(candidate.name) && Is.number(candidate.kind) &&
4755 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
4756 (candidate.detail === undefined || Is.string(candidate.detail)) &&
4757 (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
4758 (candidate.children === undefined || Array.isArray(candidate.children)) &&
4759 (candidate.tags === undefined || Array.isArray(candidate.tags));
4761 DocumentSymbol.is = is;
4762 })(DocumentSymbol || (DocumentSymbol = {}));
4764 * A set of predefined code action kinds
4767 (function (CodeActionKind) {
4771 CodeActionKind.Empty = '';
4773 * Base kind for quickfix actions: 'quickfix'
4775 CodeActionKind.QuickFix = 'quickfix';
4777 * Base kind for refactoring actions: 'refactor'
4779 CodeActionKind.Refactor = 'refactor';
4781 * Base kind for refactoring extraction actions: 'refactor.extract'
4783 * Example extract actions:
4786 * - Extract function
4787 * - Extract variable
4788 * - Extract interface from class
4791 CodeActionKind.RefactorExtract = 'refactor.extract';
4793 * Base kind for refactoring inline actions: 'refactor.inline'
4795 * Example inline actions:
4802 CodeActionKind.RefactorInline = 'refactor.inline';
4804 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
4806 * Example rewrite actions:
4808 * - Convert JavaScript function to class
4809 * - Add or remove parameter
4810 * - Encapsulate field
4811 * - Make method static
4812 * - Move method to base class
4815 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
4817 * Base kind for source actions: `source`
4819 * Source code actions apply to the entire file.
4821 CodeActionKind.Source = 'source';
4823 * Base kind for an organize imports source action: `source.organizeImports`
4825 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
4827 * Base kind for auto-fix source actions: `source.fixAll`.
4829 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
4830 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
4834 CodeActionKind.SourceFixAll = 'source.fixAll';
4835 })(CodeActionKind || (CodeActionKind = {}));
4837 * The CodeActionContext namespace provides helper functions to work with
4838 * [CodeActionContext](#CodeActionContext) literals.
4840 var CodeActionContext;
4841 (function (CodeActionContext) {
4843 * Creates a new CodeActionContext literal.
4845 function create(diagnostics, only) {
4846 var result = { diagnostics: diagnostics };
4847 if (only !== undefined && only !== null) {
4852 CodeActionContext.create = create;
4854 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
4856 function is(value) {
4857 var candidate = value;
4858 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string));
4860 CodeActionContext.is = is;
4861 })(CodeActionContext || (CodeActionContext = {}));
4863 (function (CodeAction) {
4864 function create(title, kindOrCommandOrEdit, kind) {
4865 var result = { title: title };
4866 var checkKind = true;
4867 if (typeof kindOrCommandOrEdit === 'string') {
4869 result.kind = kindOrCommandOrEdit;
4871 else if (Command.is(kindOrCommandOrEdit)) {
4872 result.command = kindOrCommandOrEdit;
4875 result.edit = kindOrCommandOrEdit;
4877 if (checkKind && kind !== undefined) {
4882 CodeAction.create = create;
4883 function is(value) {
4884 var candidate = value;
4885 return candidate && Is.string(candidate.title) &&
4886 (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
4887 (candidate.kind === undefined || Is.string(candidate.kind)) &&
4888 (candidate.edit !== undefined || candidate.command !== undefined) &&
4889 (candidate.command === undefined || Command.is(candidate.command)) &&
4890 (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
4891 (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
4894 })(CodeAction || (CodeAction = {}));
4896 * The CodeLens namespace provides helper functions to work with
4897 * [CodeLens](#CodeLens) literals.
4900 (function (CodeLens) {
4902 * Creates a new CodeLens literal.
4904 function create(range, data) {
4905 var result = { range: range };
4906 if (Is.defined(data)) {
4911 CodeLens.create = create;
4913 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
4915 function is(value) {
4916 var candidate = value;
4917 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
4920 })(CodeLens || (CodeLens = {}));
4922 * The FormattingOptions namespace provides helper functions to work with
4923 * [FormattingOptions](#FormattingOptions) literals.
4925 var FormattingOptions;
4926 (function (FormattingOptions) {
4928 * Creates a new FormattingOptions literal.
4930 function create(tabSize, insertSpaces) {
4931 return { tabSize: tabSize, insertSpaces: insertSpaces };
4933 FormattingOptions.create = create;
4935 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
4937 function is(value) {
4938 var candidate = value;
4939 return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
4941 FormattingOptions.is = is;
4942 })(FormattingOptions || (FormattingOptions = {}));
4944 * The DocumentLink namespace provides helper functions to work with
4945 * [DocumentLink](#DocumentLink) literals.
4948 (function (DocumentLink) {
4950 * Creates a new DocumentLink literal.
4952 function create(range, target, data) {
4953 return { range: range, target: target, data: data };
4955 DocumentLink.create = create;
4957 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
4959 function is(value) {
4960 var candidate = value;
4961 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
4963 DocumentLink.is = is;
4964 })(DocumentLink || (DocumentLink = {}));
4966 * The SelectionRange namespace provides helper function to work with
4967 * SelectionRange literals.
4970 (function (SelectionRange) {
4972 * Creates a new SelectionRange
4973 * @param range the range.
4974 * @param parent an optional parent.
4976 function create(range, parent) {
4977 return { range: range, parent: parent };
4979 SelectionRange.create = create;
4980 function is(value) {
4981 var candidate = value;
4982 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
4984 SelectionRange.is = is;
4985 })(SelectionRange || (SelectionRange = {}));
4986 var EOL = ['\n', '\r\n', '\r'];
4988 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
4991 (function (TextDocument) {
4993 * Creates a new ITextDocument literal from the given uri and content.
4994 * @param uri The document's uri.
4995 * @param languageId The document's language Id.
4996 * @param content The document's content.
4998 function create(uri, languageId, version, content) {
4999 return new FullTextDocument(uri, languageId, version, content);
5001 TextDocument.create = create;
5003 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
5005 function is(value) {
5006 var candidate = value;
5007 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
5008 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
5010 TextDocument.is = is;
5011 function applyEdits(document, edits) {
5012 var text = document.getText();
5013 var sortedEdits = mergeSort(edits, function (a, b) {
5014 var diff = a.range.start.line - b.range.start.line;
5016 return a.range.start.character - b.range.start.character;
5020 var lastModifiedOffset = text.length;
5021 for (var i = sortedEdits.length - 1; i >= 0; i--) {
5022 var e = sortedEdits[i];
5023 var startOffset = document.offsetAt(e.range.start);
5024 var endOffset = document.offsetAt(e.range.end);
5025 if (endOffset <= lastModifiedOffset) {
5026 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
5029 throw new Error('Overlapping edit');
5031 lastModifiedOffset = startOffset;
5035 TextDocument.applyEdits = applyEdits;
5036 function mergeSort(data, compare) {
5037 if (data.length <= 1) {
5041 var p = (data.length / 2) | 0;
5042 var left = data.slice(0, p);
5043 var right = data.slice(p);
5044 mergeSort(left, compare);
5045 mergeSort(right, compare);
5049 while (leftIdx < left.length && rightIdx < right.length) {
5050 var ret = compare(left[leftIdx], right[rightIdx]);
5052 // smaller_equal -> take left to preserve order
5053 data[i++] = left[leftIdx++];
5056 // greater -> take right
5057 data[i++] = right[rightIdx++];
5060 while (leftIdx < left.length) {
5061 data[i++] = left[leftIdx++];
5063 while (rightIdx < right.length) {
5064 data[i++] = right[rightIdx++];
5068 })(TextDocument || (TextDocument = {}));
5070 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
5072 var FullTextDocument = /** @class */ (function () {
5073 function FullTextDocument(uri, languageId, version, content) {
5075 this._languageId = languageId;
5076 this._version = version;
5077 this._content = content;
5078 this._lineOffsets = undefined;
5080 Object.defineProperty(FullTextDocument.prototype, "uri", {
5087 Object.defineProperty(FullTextDocument.prototype, "languageId", {
5089 return this._languageId;
5094 Object.defineProperty(FullTextDocument.prototype, "version", {
5096 return this._version;
5101 FullTextDocument.prototype.getText = function (range) {
5103 var start = this.offsetAt(range.start);
5104 var end = this.offsetAt(range.end);
5105 return this._content.substring(start, end);
5107 return this._content;
5109 FullTextDocument.prototype.update = function (event, version) {
5110 this._content = event.text;
5111 this._version = version;
5112 this._lineOffsets = undefined;
5114 FullTextDocument.prototype.getLineOffsets = function () {
5115 if (this._lineOffsets === undefined) {
5116 var lineOffsets = [];
5117 var text = this._content;
5118 var isLineStart = true;
5119 for (var i = 0; i < text.length; i++) {
5121 lineOffsets.push(i);
5122 isLineStart = false;
5124 var ch = text.charAt(i);
5125 isLineStart = (ch === '\r' || ch === '\n');
5126 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
5130 if (isLineStart && text.length > 0) {
5131 lineOffsets.push(text.length);
5133 this._lineOffsets = lineOffsets;
5135 return this._lineOffsets;
5137 FullTextDocument.prototype.positionAt = function (offset) {
5138 offset = Math.max(Math.min(offset, this._content.length), 0);
5139 var lineOffsets = this.getLineOffsets();
5140 var low = 0, high = lineOffsets.length;
5142 return Position.create(0, offset);
5144 while (low < high) {
5145 var mid = Math.floor((low + high) / 2);
5146 if (lineOffsets[mid] > offset) {
5153 // low is the least x for which the line offset is larger than the current offset
5154 // or array.length if no line offset is larger than the current offset
5156 return Position.create(line, offset - lineOffsets[line]);
5158 FullTextDocument.prototype.offsetAt = function (position) {
5159 var lineOffsets = this.getLineOffsets();
5160 if (position.line >= lineOffsets.length) {
5161 return this._content.length;
5163 else if (position.line < 0) {
5166 var lineOffset = lineOffsets[position.line];
5167 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
5168 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
5170 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
5172 return this.getLineOffsets().length;
5177 return FullTextDocument;
5181 var toString = Object.prototype.toString;
5182 function defined(value) {
5183 return typeof value !== 'undefined';
5185 Is.defined = defined;
5186 function undefined(value) {
5187 return typeof value === 'undefined';
5189 Is.undefined = undefined;
5190 function boolean(value) {
5191 return value === true || value === false;
5193 Is.boolean = boolean;
5194 function string(value) {
5195 return toString.call(value) === '[object String]';
5198 function number(value) {
5199 return toString.call(value) === '[object Number]';
5202 function numberRange(value, min, max) {
5203 return toString.call(value) === '[object Number]' && min <= value && value <= max;
5205 Is.numberRange = numberRange;
5206 function integer(value) {
5207 return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
5209 Is.integer = integer;
5210 function uinteger(value) {
5211 return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
5213 Is.uinteger = uinteger;
5214 function func(value) {
5215 return toString.call(value) === '[object Function]';
5218 function objectLiteral(value) {
5219 // Strictly speaking class instances pass this check as well. Since the LSP
5220 // doesn't use classes we ignore this for now. If we do we need to add something
5221 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5222 return value !== null && typeof value === 'object';
5224 Is.objectLiteral = objectLiteral;
5225 function typedArray(value, check) {
5226 return Array.isArray(value) && value.every(check);
5228 Is.typedArray = typedArray;
5229 })(Is || (Is = {}));
5234 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5237 /* --------------------------------------------------------------------------------------------
5238 * Copyright (c) Microsoft Corporation. All rights reserved.
5239 * Licensed under the MIT License. See License.txt in the project root for license information.
5240 * ------------------------------------------------------------------------------------------ */
5241 Object.defineProperty(exports, "__esModule", ({ value: true }));
5242 exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = void 0;
5243 const vscode_jsonrpc_1 = __webpack_require__(6);
5244 class RegistrationType {
5245 constructor(method) {
5246 this.method = method;
5249 exports.RegistrationType = RegistrationType;
5250 class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
5251 constructor(method) {
5255 exports.ProtocolRequestType0 = ProtocolRequestType0;
5256 class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
5257 constructor(method) {
5258 super(method, vscode_jsonrpc_1.ParameterStructures.byName);
5261 exports.ProtocolRequestType = ProtocolRequestType;
5262 class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
5263 constructor(method) {
5267 exports.ProtocolNotificationType0 = ProtocolNotificationType0;
5268 class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
5269 constructor(method) {
5270 super(method, vscode_jsonrpc_1.ParameterStructures.byName);
5273 exports.ProtocolNotificationType = ProtocolNotificationType;
5274 // let x: ProtocolNotificationType<number, { value: number}>;
5275 // let y: ProtocolNotificationType<string, { value: number}>;
5277 //# sourceMappingURL=messages.js.map
5281 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5284 /* --------------------------------------------------------------------------------------------
5285 * Copyright (c) Microsoft Corporation. All rights reserved.
5286 * Licensed under the MIT License. See License.txt in the project root for license information.
5287 * ------------------------------------------------------------------------------------------ */
5288 Object.defineProperty(exports, "__esModule", ({ value: true }));
5289 exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeError = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.DocumentFilter = void 0;
5290 exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = void 0;
5291 const Is = __webpack_require__(29);
5292 const messages_1 = __webpack_require__(27);
5293 const protocol_implementation_1 = __webpack_require__(30);
5294 Object.defineProperty(exports, "ImplementationRequest", ({ enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } }));
5295 const protocol_typeDefinition_1 = __webpack_require__(31);
5296 Object.defineProperty(exports, "TypeDefinitionRequest", ({ enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } }));
5297 const protocol_workspaceFolders_1 = __webpack_require__(32);
5298 Object.defineProperty(exports, "WorkspaceFoldersRequest", ({ enumerable: true, get: function () { return protocol_workspaceFolders_1.WorkspaceFoldersRequest; } }));
5299 Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", ({ enumerable: true, get: function () { return protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification; } }));
5300 const protocol_configuration_1 = __webpack_require__(33);
5301 Object.defineProperty(exports, "ConfigurationRequest", ({ enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } }));
5302 const protocol_colorProvider_1 = __webpack_require__(34);
5303 Object.defineProperty(exports, "DocumentColorRequest", ({ enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } }));
5304 Object.defineProperty(exports, "ColorPresentationRequest", ({ enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } }));
5305 const protocol_foldingRange_1 = __webpack_require__(35);
5306 Object.defineProperty(exports, "FoldingRangeRequest", ({ enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } }));
5307 const protocol_declaration_1 = __webpack_require__(36);
5308 Object.defineProperty(exports, "DeclarationRequest", ({ enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } }));
5309 const protocol_selectionRange_1 = __webpack_require__(37);
5310 Object.defineProperty(exports, "SelectionRangeRequest", ({ enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } }));
5311 const protocol_progress_1 = __webpack_require__(38);
5312 Object.defineProperty(exports, "WorkDoneProgress", ({ enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } }));
5313 Object.defineProperty(exports, "WorkDoneProgressCreateRequest", ({ enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } }));
5314 Object.defineProperty(exports, "WorkDoneProgressCancelNotification", ({ enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } }));
5315 const protocol_callHierarchy_1 = __webpack_require__(39);
5316 Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", ({ enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } }));
5317 Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", ({ enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } }));
5318 Object.defineProperty(exports, "CallHierarchyPrepareRequest", ({ enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } }));
5319 const protocol_semanticTokens_1 = __webpack_require__(40);
5320 Object.defineProperty(exports, "SemanticTokenTypes", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenTypes; } }));
5321 Object.defineProperty(exports, "SemanticTokenModifiers", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokenModifiers; } }));
5322 Object.defineProperty(exports, "SemanticTokens", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokens; } }));
5323 Object.defineProperty(exports, "TokenFormat", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } }));
5324 Object.defineProperty(exports, "SemanticTokensRequest", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } }));
5325 Object.defineProperty(exports, "SemanticTokensDeltaRequest", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } }));
5326 Object.defineProperty(exports, "SemanticTokensRangeRequest", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } }));
5327 Object.defineProperty(exports, "SemanticTokensRefreshRequest", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } }));
5328 Object.defineProperty(exports, "SemanticTokensRegistrationType", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } }));
5329 const protocol_showDocument_1 = __webpack_require__(41);
5330 Object.defineProperty(exports, "ShowDocumentRequest", ({ enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } }));
5331 const protocol_linkedEditingRange_1 = __webpack_require__(42);
5332 Object.defineProperty(exports, "LinkedEditingRangeRequest", ({ enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } }));
5333 const protocol_fileOperations_1 = __webpack_require__(43);
5334 Object.defineProperty(exports, "FileOperationPatternKind", ({ enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } }));
5335 Object.defineProperty(exports, "DidCreateFilesNotification", ({ enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } }));
5336 Object.defineProperty(exports, "WillCreateFilesRequest", ({ enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } }));
5337 Object.defineProperty(exports, "DidRenameFilesNotification", ({ enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } }));
5338 Object.defineProperty(exports, "WillRenameFilesRequest", ({ enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } }));
5339 Object.defineProperty(exports, "DidDeleteFilesNotification", ({ enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } }));
5340 Object.defineProperty(exports, "WillDeleteFilesRequest", ({ enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } }));
5341 const protocol_moniker_1 = __webpack_require__(44);
5342 Object.defineProperty(exports, "UniquenessLevel", ({ enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } }));
5343 Object.defineProperty(exports, "MonikerKind", ({ enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } }));
5344 Object.defineProperty(exports, "MonikerRequest", ({ enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } }));
5345 // @ts-ignore: to avoid inlining LocationLink as dynamic import
5346 let __noDynamicImport;
5348 * The DocumentFilter namespace provides helper functions to work with
5349 * [DocumentFilter](#DocumentFilter) literals.
5352 (function (DocumentFilter) {
5353 function is(value) {
5354 const candidate = value;
5355 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
5357 DocumentFilter.is = is;
5358 })(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
5360 * The DocumentSelector namespace provides helper functions to work with
5361 * [DocumentSelector](#DocumentSelector)s.
5363 var DocumentSelector;
5364 (function (DocumentSelector) {
5365 function is(value) {
5366 if (!Array.isArray(value)) {
5369 for (let elem of value) {
5370 if (!Is.string(elem) && !DocumentFilter.is(elem)) {
5376 DocumentSelector.is = is;
5377 })(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
5379 * The `client/registerCapability` request is sent from the server to the client to register a new capability
5380 * handler on the client side.
5382 var RegistrationRequest;
5383 (function (RegistrationRequest) {
5384 RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
5385 })(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
5387 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
5388 * handler on the client side.
5390 var UnregistrationRequest;
5391 (function (UnregistrationRequest) {
5392 UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
5393 })(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
5394 var ResourceOperationKind;
5395 (function (ResourceOperationKind) {
5397 * Supports creating new files and folders.
5399 ResourceOperationKind.Create = 'create';
5401 * Supports renaming existing files and folders.
5403 ResourceOperationKind.Rename = 'rename';
5405 * Supports deleting existing files and folders.
5407 ResourceOperationKind.Delete = 'delete';
5408 })(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
5409 var FailureHandlingKind;
5410 (function (FailureHandlingKind) {
5412 * Applying the workspace change is simply aborted if one of the changes provided
5413 * fails. All operations executed before the failing operation stay executed.
5415 FailureHandlingKind.Abort = 'abort';
5417 * All operations are executed transactional. That means they either all
5418 * succeed or no changes at all are applied to the workspace.
5420 FailureHandlingKind.Transactional = 'transactional';
5422 * If the workspace edit contains only textual file changes they are executed transactional.
5423 * If resource changes (create, rename or delete file) are part of the change the failure
5424 * handling strategy is abort.
5426 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
5428 * The client tries to undo the operations already executed. But there is no
5429 * guarantee that this is succeeding.
5431 FailureHandlingKind.Undo = 'undo';
5432 })(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
5434 * The StaticRegistrationOptions namespace provides helper functions to work with
5435 * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
5437 var StaticRegistrationOptions;
5438 (function (StaticRegistrationOptions) {
5439 function hasId(value) {
5440 const candidate = value;
5441 return candidate && Is.string(candidate.id) && candidate.id.length > 0;
5443 StaticRegistrationOptions.hasId = hasId;
5444 })(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
5446 * The TextDocumentRegistrationOptions namespace provides helper functions to work with
5447 * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
5449 var TextDocumentRegistrationOptions;
5450 (function (TextDocumentRegistrationOptions) {
5451 function is(value) {
5452 const candidate = value;
5453 return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
5455 TextDocumentRegistrationOptions.is = is;
5456 })(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
5458 * The WorkDoneProgressOptions namespace provides helper functions to work with
5459 * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
5461 var WorkDoneProgressOptions;
5462 (function (WorkDoneProgressOptions) {
5463 function is(value) {
5464 const candidate = value;
5465 return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
5467 WorkDoneProgressOptions.is = is;
5468 function hasWorkDoneProgress(value) {
5469 const candidate = value;
5470 return candidate && Is.boolean(candidate.workDoneProgress);
5472 WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
5473 })(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
5475 * The initialize request is sent from the client to the server.
5476 * It is sent once as the request after starting up the server.
5477 * The requests parameter is of type [InitializeParams](#InitializeParams)
5478 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
5481 var InitializeRequest;
5482 (function (InitializeRequest) {
5483 InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
5484 })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
5486 * Known error codes for an `InitializeError`;
5488 var InitializeError;
5489 (function (InitializeError) {
5491 * If the protocol version provided by the client can't be handled by the server.
5492 * @deprecated This initialize error got replaced by client capabilities. There is
5493 * no version handshake in version 3.0x
5495 InitializeError.unknownProtocolVersion = 1;
5496 })(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
5498 * The initialized notification is sent from the client to the
5499 * server after the client is fully initialized and the server
5500 * is allowed to send requests from the server to the client.
5502 var InitializedNotification;
5503 (function (InitializedNotification) {
5504 InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
5505 })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
5506 //---- Shutdown Method ----
5508 * A shutdown request is sent from the client to the server.
5509 * It is sent once when the client decides to shutdown the
5510 * server. The only notification that is sent after a shutdown request
5511 * is the exit event.
5513 var ShutdownRequest;
5514 (function (ShutdownRequest) {
5515 ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
5516 })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
5517 //---- Exit Notification ----
5519 * The exit event is sent from the client to the server to
5520 * ask the server to exit its process.
5522 var ExitNotification;
5523 (function (ExitNotification) {
5524 ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
5525 })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
5527 * The configuration change notification is sent from the client to the server
5528 * when the client's configuration has changed. The notification contains
5529 * the changed configuration as defined by the language client.
5531 var DidChangeConfigurationNotification;
5532 (function (DidChangeConfigurationNotification) {
5533 DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
5534 })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
5535 //---- Message show and log notifications ----
5540 (function (MessageType) {
5544 MessageType.Error = 1;
5546 * A warning message.
5548 MessageType.Warning = 2;
5550 * An information message.
5552 MessageType.Info = 3;
5556 MessageType.Log = 4;
5557 })(MessageType = exports.MessageType || (exports.MessageType = {}));
5559 * The show message notification is sent from a server to a client to ask
5560 * the client to display a particular message in the user interface.
5562 var ShowMessageNotification;
5563 (function (ShowMessageNotification) {
5564 ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
5565 })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
5567 * The show message request is sent from the server to the client to show a message
5568 * and a set of options actions to the user.
5570 var ShowMessageRequest;
5571 (function (ShowMessageRequest) {
5572 ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
5573 })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
5575 * The log message notification is sent from the server to the client to ask
5576 * the client to log a particular message.
5578 var LogMessageNotification;
5579 (function (LogMessageNotification) {
5580 LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
5581 })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
5582 //---- Telemetry notification
5584 * The telemetry event notification is sent from the server to the client to ask
5585 * the client to log telemetry data.
5587 var TelemetryEventNotification;
5588 (function (TelemetryEventNotification) {
5589 TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
5590 })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
5592 * Defines how the host (editor) should sync
5593 * document changes to the language server.
5595 var TextDocumentSyncKind;
5596 (function (TextDocumentSyncKind) {
5598 * Documents should not be synced at all.
5600 TextDocumentSyncKind.None = 0;
5602 * Documents are synced by always sending the full content
5605 TextDocumentSyncKind.Full = 1;
5607 * Documents are synced by sending the full content on open.
5608 * After that only incremental updates to the document are
5611 TextDocumentSyncKind.Incremental = 2;
5612 })(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
5614 * The document open notification is sent from the client to the server to signal
5615 * newly opened text documents. The document's truth is now managed by the client
5616 * and the server must not try to read the document's truth using the document's
5617 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
5618 * mean that its content is presented in an editor. An open notification must not
5619 * be sent more than once without a corresponding close notification send before.
5620 * This means open and close notification must be balanced and the max open count
5623 var DidOpenTextDocumentNotification;
5624 (function (DidOpenTextDocumentNotification) {
5625 DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
5626 DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
5627 })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
5628 var TextDocumentContentChangeEvent;
5629 (function (TextDocumentContentChangeEvent) {
5631 * Checks whether the information describes a delta event.
5633 function isIncremental(event) {
5634 let candidate = event;
5635 return candidate !== undefined && candidate !== null &&
5636 typeof candidate.text === 'string' && candidate.range !== undefined &&
5637 (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
5639 TextDocumentContentChangeEvent.isIncremental = isIncremental;
5641 * Checks whether the information describes a full replacement event.
5643 function isFull(event) {
5644 let candidate = event;
5645 return candidate !== undefined && candidate !== null &&
5646 typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
5648 TextDocumentContentChangeEvent.isFull = isFull;
5649 })(TextDocumentContentChangeEvent = exports.TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = {}));
5651 * The document change notification is sent from the client to the server to signal
5652 * changes to a text document.
5654 var DidChangeTextDocumentNotification;
5655 (function (DidChangeTextDocumentNotification) {
5656 DidChangeTextDocumentNotification.method = 'textDocument/didChange';
5657 DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
5658 })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
5660 * The document close notification is sent from the client to the server when
5661 * the document got closed in the client. The document's truth now exists where
5662 * the document's uri points to (e.g. if the document's uri is a file uri the
5663 * truth now exists on disk). As with the open notification the close notification
5664 * is about managing the document's content. Receiving a close notification
5665 * doesn't mean that the document was open in an editor before. A close
5666 * notification requires a previous open notification to be sent.
5668 var DidCloseTextDocumentNotification;
5669 (function (DidCloseTextDocumentNotification) {
5670 DidCloseTextDocumentNotification.method = 'textDocument/didClose';
5671 DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
5672 })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
5674 * The document save notification is sent from the client to the server when
5675 * the document got saved in the client.
5677 var DidSaveTextDocumentNotification;
5678 (function (DidSaveTextDocumentNotification) {
5679 DidSaveTextDocumentNotification.method = 'textDocument/didSave';
5680 DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
5681 })(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
5683 * Represents reasons why a text document is saved.
5685 var TextDocumentSaveReason;
5686 (function (TextDocumentSaveReason) {
5688 * Manually triggered, e.g. by the user pressing save, by starting debugging,
5689 * or by an API call.
5691 TextDocumentSaveReason.Manual = 1;
5693 * Automatic after a delay.
5695 TextDocumentSaveReason.AfterDelay = 2;
5697 * When the editor lost focus.
5699 TextDocumentSaveReason.FocusOut = 3;
5700 })(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
5702 * A document will save notification is sent from the client to the server before
5703 * the document is actually saved.
5705 var WillSaveTextDocumentNotification;
5706 (function (WillSaveTextDocumentNotification) {
5707 WillSaveTextDocumentNotification.method = 'textDocument/willSave';
5708 WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
5709 })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
5711 * A document will save request is sent from the client to the server before
5712 * the document is actually saved. The request can return an array of TextEdits
5713 * which will be applied to the text document before it is saved. Please note that
5714 * clients might drop results if computing the text edits took too long or if a
5715 * server constantly fails on this request. This is done to keep the save fast and
5718 var WillSaveTextDocumentWaitUntilRequest;
5719 (function (WillSaveTextDocumentWaitUntilRequest) {
5720 WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
5721 WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
5722 })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
5724 * The watched files notification is sent from the client to the server when
5725 * the client detects changes to file watched by the language client.
5727 var DidChangeWatchedFilesNotification;
5728 (function (DidChangeWatchedFilesNotification) {
5729 DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
5730 })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
5732 * The file event type
5735 (function (FileChangeType) {
5737 * The file got created.
5739 FileChangeType.Created = 1;
5741 * The file got changed.
5743 FileChangeType.Changed = 2;
5745 * The file got deleted.
5747 FileChangeType.Deleted = 3;
5748 })(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
5750 (function (WatchKind) {
5752 * Interested in create events.
5754 WatchKind.Create = 1;
5756 * Interested in change events
5758 WatchKind.Change = 2;
5760 * Interested in delete events
5762 WatchKind.Delete = 4;
5763 })(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
5765 * Diagnostics notification are sent from the server to the client to signal
5766 * results of validation runs.
5768 var PublishDiagnosticsNotification;
5769 (function (PublishDiagnosticsNotification) {
5770 PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
5771 })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
5773 * How a completion was triggered
5775 var CompletionTriggerKind;
5776 (function (CompletionTriggerKind) {
5778 * Completion was triggered by typing an identifier (24x7 code
5779 * complete), manual invocation (e.g Ctrl+Space) or via API.
5781 CompletionTriggerKind.Invoked = 1;
5783 * Completion was triggered by a trigger character specified by
5784 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
5786 CompletionTriggerKind.TriggerCharacter = 2;
5788 * Completion was re-triggered as current completion list is incomplete
5790 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
5791 })(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
5793 * Request to request completion at a given text document position. The request's
5794 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
5795 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
5796 * or a Thenable that resolves to such.
5798 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
5799 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
5800 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
5801 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
5803 var CompletionRequest;
5804 (function (CompletionRequest) {
5805 CompletionRequest.method = 'textDocument/completion';
5806 CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
5807 })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
5809 * Request to resolve additional information for a given completion item.The request's
5810 * parameter is of type [CompletionItem](#CompletionItem) the response
5811 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
5813 var CompletionResolveRequest;
5814 (function (CompletionResolveRequest) {
5815 CompletionResolveRequest.method = 'completionItem/resolve';
5816 CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
5817 })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
5819 * Request to request hover information at a given text document position. The request's
5820 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
5821 * type [Hover](#Hover) or a Thenable that resolves to such.
5824 (function (HoverRequest) {
5825 HoverRequest.method = 'textDocument/hover';
5826 HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
5827 })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
5829 * How a signature help was triggered.
5833 var SignatureHelpTriggerKind;
5834 (function (SignatureHelpTriggerKind) {
5836 * Signature help was invoked manually by the user or by a command.
5838 SignatureHelpTriggerKind.Invoked = 1;
5840 * Signature help was triggered by a trigger character.
5842 SignatureHelpTriggerKind.TriggerCharacter = 2;
5844 * Signature help was triggered by the cursor moving or by the document content changing.
5846 SignatureHelpTriggerKind.ContentChange = 3;
5847 })(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
5848 var SignatureHelpRequest;
5849 (function (SignatureHelpRequest) {
5850 SignatureHelpRequest.method = 'textDocument/signatureHelp';
5851 SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
5852 })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
5854 * A request to resolve the definition location of a symbol at a given text
5855 * document position. The request's parameter is of type [TextDocumentPosition]
5856 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
5857 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
5860 var DefinitionRequest;
5861 (function (DefinitionRequest) {
5862 DefinitionRequest.method = 'textDocument/definition';
5863 DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
5864 })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
5866 * A request to resolve project-wide references for the symbol denoted
5867 * by the given text document position. The request's parameter is of
5868 * type [ReferenceParams](#ReferenceParams) the response is of type
5869 * [Location[]](#Location) or a Thenable that resolves to such.
5871 var ReferencesRequest;
5872 (function (ReferencesRequest) {
5873 ReferencesRequest.method = 'textDocument/references';
5874 ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
5875 })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
5877 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
5878 * text document position. The request's parameter is of type [TextDocumentPosition]
5879 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
5880 * (#DocumentHighlight) or a Thenable that resolves to such.
5882 var DocumentHighlightRequest;
5883 (function (DocumentHighlightRequest) {
5884 DocumentHighlightRequest.method = 'textDocument/documentHighlight';
5885 DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
5886 })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
5888 * A request to list all symbols found in a given text document. The request's
5889 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
5890 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
5891 * that resolves to such.
5893 var DocumentSymbolRequest;
5894 (function (DocumentSymbolRequest) {
5895 DocumentSymbolRequest.method = 'textDocument/documentSymbol';
5896 DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
5897 })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
5899 * A request to provide commands for the given text document and range.
5901 var CodeActionRequest;
5902 (function (CodeActionRequest) {
5903 CodeActionRequest.method = 'textDocument/codeAction';
5904 CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
5905 })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
5907 * Request to resolve additional information for a given code action.The request's
5908 * parameter is of type [CodeAction](#CodeAction) the response
5909 * is of type [CodeAction](#CodeAction) or a Thenable that resolves to such.
5911 var CodeActionResolveRequest;
5912 (function (CodeActionResolveRequest) {
5913 CodeActionResolveRequest.method = 'codeAction/resolve';
5914 CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method);
5915 })(CodeActionResolveRequest = exports.CodeActionResolveRequest || (exports.CodeActionResolveRequest = {}));
5917 * A request to list project-wide symbols matching the query string given
5918 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
5919 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
5922 var WorkspaceSymbolRequest;
5923 (function (WorkspaceSymbolRequest) {
5924 WorkspaceSymbolRequest.method = 'workspace/symbol';
5925 WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
5926 })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
5928 * A request to provide code lens for the given text document.
5930 var CodeLensRequest;
5931 (function (CodeLensRequest) {
5932 CodeLensRequest.method = 'textDocument/codeLens';
5933 CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method);
5934 })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
5936 * A request to resolve a command for a given code lens.
5938 var CodeLensResolveRequest;
5939 (function (CodeLensResolveRequest) {
5940 CodeLensResolveRequest.method = 'codeLens/resolve';
5941 CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method);
5942 })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
5944 * A request to refresh all code actions
5948 var CodeLensRefreshRequest;
5949 (function (CodeLensRefreshRequest) {
5950 CodeLensRefreshRequest.method = `workspace/codeLens/refresh`;
5951 CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method);
5952 })(CodeLensRefreshRequest = exports.CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = {}));
5954 * A request to provide document links
5956 var DocumentLinkRequest;
5957 (function (DocumentLinkRequest) {
5958 DocumentLinkRequest.method = 'textDocument/documentLink';
5959 DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
5960 })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
5962 * Request to resolve additional information for a given document link. The request's
5963 * parameter is of type [DocumentLink](#DocumentLink) the response
5964 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
5966 var DocumentLinkResolveRequest;
5967 (function (DocumentLinkResolveRequest) {
5968 DocumentLinkResolveRequest.method = 'documentLink/resolve';
5969 DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method);
5970 })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
5972 * A request to to format a whole document.
5974 var DocumentFormattingRequest;
5975 (function (DocumentFormattingRequest) {
5976 DocumentFormattingRequest.method = 'textDocument/formatting';
5977 DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
5978 })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
5980 * A request to to format a range in a document.
5982 var DocumentRangeFormattingRequest;
5983 (function (DocumentRangeFormattingRequest) {
5984 DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
5985 DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
5986 })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
5988 * A request to format a document on type.
5990 var DocumentOnTypeFormattingRequest;
5991 (function (DocumentOnTypeFormattingRequest) {
5992 DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
5993 DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
5994 })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
5995 //---- Rename ----------------------------------------------
5996 var PrepareSupportDefaultBehavior;
5997 (function (PrepareSupportDefaultBehavior) {
5999 * The client's default behavior is to select the identifier
6000 * according the to language's syntax rule.
6002 PrepareSupportDefaultBehavior.Identifier = 1;
6003 })(PrepareSupportDefaultBehavior = exports.PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = {}));
6005 * A request to rename a symbol.
6008 (function (RenameRequest) {
6009 RenameRequest.method = 'textDocument/rename';
6010 RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
6011 })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
6013 * A request to test and perform the setup necessary for a rename.
6015 * @since 3.16 - support for default behavior
6017 var PrepareRenameRequest;
6018 (function (PrepareRenameRequest) {
6019 PrepareRenameRequest.method = 'textDocument/prepareRename';
6020 PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
6021 })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
6023 * A request send from the client to the server to execute a command. The request might return
6024 * a workspace edit which the client will apply to the workspace.
6026 var ExecuteCommandRequest;
6027 (function (ExecuteCommandRequest) {
6028 ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
6029 })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
6031 * A request sent from the server to the client to modified certain resources.
6033 var ApplyWorkspaceEditRequest;
6034 (function (ApplyWorkspaceEditRequest) {
6035 ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
6036 })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
6037 //# sourceMappingURL=protocol.js.map
6041 /***/ ((__unused_webpack_module, exports) => {
6043 /* --------------------------------------------------------------------------------------------
6044 * Copyright (c) Microsoft Corporation. All rights reserved.
6045 * Licensed under the MIT License. See License.txt in the project root for license information.
6046 * ------------------------------------------------------------------------------------------ */
6048 Object.defineProperty(exports, "__esModule", ({ value: true }));
6049 exports.objectLiteral = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;
6050 function boolean(value) {
6051 return value === true || value === false;
6053 exports.boolean = boolean;
6054 function string(value) {
6055 return typeof value === 'string' || value instanceof String;
6057 exports.string = string;
6058 function number(value) {
6059 return typeof value === 'number' || value instanceof Number;
6061 exports.number = number;
6062 function error(value) {
6063 return value instanceof Error;
6065 exports.error = error;
6066 function func(value) {
6067 return typeof value === 'function';
6069 exports.func = func;
6070 function array(value) {
6071 return Array.isArray(value);
6073 exports.array = array;
6074 function stringArray(value) {
6075 return array(value) && value.every(elem => string(elem));
6077 exports.stringArray = stringArray;
6078 function typedArray(value, check) {
6079 return Array.isArray(value) && value.every(check);
6081 exports.typedArray = typedArray;
6082 function objectLiteral(value) {
6083 // Strictly speaking class instances pass this check as well. Since the LSP
6084 // doesn't use classes we ignore this for now. If we do we need to add something
6085 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
6086 return value !== null && typeof value === 'object';
6088 exports.objectLiteral = objectLiteral;
6089 //# sourceMappingURL=is.js.map
6093 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6096 /* --------------------------------------------------------------------------------------------
6097 * Copyright (c) Microsoft Corporation. All rights reserved.
6098 * Licensed under the MIT License. See License.txt in the project root for license information.
6099 * ------------------------------------------------------------------------------------------ */
6100 Object.defineProperty(exports, "__esModule", ({ value: true }));
6101 exports.ImplementationRequest = void 0;
6102 const messages_1 = __webpack_require__(27);
6103 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6104 let __noDynamicImport;
6106 * A request to resolve the implementation locations of a symbol at a given text
6107 * document position. The request's parameter is of type [TextDocumentPositioParams]
6108 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
6109 * Thenable that resolves to such.
6111 var ImplementationRequest;
6112 (function (ImplementationRequest) {
6113 ImplementationRequest.method = 'textDocument/implementation';
6114 ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
6115 })(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
6116 //# sourceMappingURL=protocol.implementation.js.map
6120 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6123 /* --------------------------------------------------------------------------------------------
6124 * Copyright (c) Microsoft Corporation. All rights reserved.
6125 * Licensed under the MIT License. See License.txt in the project root for license information.
6126 * ------------------------------------------------------------------------------------------ */
6127 Object.defineProperty(exports, "__esModule", ({ value: true }));
6128 exports.TypeDefinitionRequest = void 0;
6129 const messages_1 = __webpack_require__(27);
6130 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6131 let __noDynamicImport;
6133 * A request to resolve the type definition locations of a symbol at a given text
6134 * document position. The request's parameter is of type [TextDocumentPositioParams]
6135 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
6136 * Thenable that resolves to such.
6138 var TypeDefinitionRequest;
6139 (function (TypeDefinitionRequest) {
6140 TypeDefinitionRequest.method = 'textDocument/typeDefinition';
6141 TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
6142 })(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
6143 //# sourceMappingURL=protocol.typeDefinition.js.map
6147 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6150 /* --------------------------------------------------------------------------------------------
6151 * Copyright (c) Microsoft Corporation. All rights reserved.
6152 * Licensed under the MIT License. See License.txt in the project root for license information.
6153 * ------------------------------------------------------------------------------------------ */
6154 Object.defineProperty(exports, "__esModule", ({ value: true }));
6155 exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0;
6156 const messages_1 = __webpack_require__(27);
6158 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
6160 var WorkspaceFoldersRequest;
6161 (function (WorkspaceFoldersRequest) {
6162 WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
6163 })(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
6165 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
6166 * folder configuration changes.
6168 var DidChangeWorkspaceFoldersNotification;
6169 (function (DidChangeWorkspaceFoldersNotification) {
6170 DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
6171 })(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
6172 //# sourceMappingURL=protocol.workspaceFolders.js.map
6176 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6179 /* --------------------------------------------------------------------------------------------
6180 * Copyright (c) Microsoft Corporation. All rights reserved.
6181 * Licensed under the MIT License. See License.txt in the project root for license information.
6182 * ------------------------------------------------------------------------------------------ */
6183 Object.defineProperty(exports, "__esModule", ({ value: true }));
6184 exports.ConfigurationRequest = void 0;
6185 const messages_1 = __webpack_require__(27);
6187 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
6188 * configuration setting.
6190 * This pull model replaces the old push model were the client signaled configuration change via an
6191 * event. If the server still needs to react to configuration changes (since the server caches the
6192 * result of `workspace/configuration` requests) the server should register for an empty configuration
6193 * change event and empty the cache if such an event is received.
6195 var ConfigurationRequest;
6196 (function (ConfigurationRequest) {
6197 ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
6198 })(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
6199 //# sourceMappingURL=protocol.configuration.js.map
6203 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6206 /* --------------------------------------------------------------------------------------------
6207 * Copyright (c) Microsoft Corporation. All rights reserved.
6208 * Licensed under the MIT License. See License.txt in the project root for license information.
6209 * ------------------------------------------------------------------------------------------ */
6210 Object.defineProperty(exports, "__esModule", ({ value: true }));
6211 exports.ColorPresentationRequest = exports.DocumentColorRequest = void 0;
6212 const messages_1 = __webpack_require__(27);
6214 * A request to list all color symbols found in a given text document. The request's
6215 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
6216 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6217 * that resolves to such.
6219 var DocumentColorRequest;
6220 (function (DocumentColorRequest) {
6221 DocumentColorRequest.method = 'textDocument/documentColor';
6222 DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
6223 })(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
6225 * A request to list all presentation for a color. The request's
6226 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
6227 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
6228 * that resolves to such.
6230 var ColorPresentationRequest;
6231 (function (ColorPresentationRequest) {
6232 ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
6233 })(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
6234 //# sourceMappingURL=protocol.colorProvider.js.map
6238 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6241 /*---------------------------------------------------------------------------------------------
6242 * Copyright (c) Microsoft Corporation. All rights reserved.
6243 * Licensed under the MIT License. See License.txt in the project root for license information.
6244 *--------------------------------------------------------------------------------------------*/
6245 Object.defineProperty(exports, "__esModule", ({ value: true }));
6246 exports.FoldingRangeRequest = exports.FoldingRangeKind = void 0;
6247 const messages_1 = __webpack_require__(27);
6249 * Enum of known range kinds
6251 var FoldingRangeKind;
6252 (function (FoldingRangeKind) {
6254 * Folding range for a comment
6256 FoldingRangeKind["Comment"] = "comment";
6258 * Folding range for a imports or includes
6260 FoldingRangeKind["Imports"] = "imports";
6262 * Folding range for a region (e.g. `#region`)
6264 FoldingRangeKind["Region"] = "region";
6265 })(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
6267 * A request to provide folding ranges in a document. The request's
6268 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
6269 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
6270 * that resolves to such.
6272 var FoldingRangeRequest;
6273 (function (FoldingRangeRequest) {
6274 FoldingRangeRequest.method = 'textDocument/foldingRange';
6275 FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
6276 })(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
6277 //# sourceMappingURL=protocol.foldingRange.js.map
6281 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6284 /* --------------------------------------------------------------------------------------------
6285 * Copyright (c) Microsoft Corporation. All rights reserved.
6286 * Licensed under the MIT License. See License.txt in the project root for license information.
6287 * ------------------------------------------------------------------------------------------ */
6288 Object.defineProperty(exports, "__esModule", ({ value: true }));
6289 exports.DeclarationRequest = void 0;
6290 const messages_1 = __webpack_require__(27);
6291 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
6292 let __noDynamicImport;
6294 * A request to resolve the type definition locations of a symbol at a given text
6295 * document position. The request's parameter is of type [TextDocumentPositioParams]
6296 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
6297 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
6300 var DeclarationRequest;
6301 (function (DeclarationRequest) {
6302 DeclarationRequest.method = 'textDocument/declaration';
6303 DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
6304 })(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
6305 //# sourceMappingURL=protocol.declaration.js.map
6309 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6312 /*---------------------------------------------------------------------------------------------
6313 * Copyright (c) Microsoft Corporation. All rights reserved.
6314 * Licensed under the MIT License. See License.txt in the project root for license information.
6315 *--------------------------------------------------------------------------------------------*/
6316 Object.defineProperty(exports, "__esModule", ({ value: true }));
6317 exports.SelectionRangeRequest = void 0;
6318 const messages_1 = __webpack_require__(27);
6320 * A request to provide selection ranges in a document. The request's
6321 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
6322 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
6323 * that resolves to such.
6325 var SelectionRangeRequest;
6326 (function (SelectionRangeRequest) {
6327 SelectionRangeRequest.method = 'textDocument/selectionRange';
6328 SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
6329 })(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
6330 //# sourceMappingURL=protocol.selectionRange.js.map
6334 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6337 /* --------------------------------------------------------------------------------------------
6338 * Copyright (c) Microsoft Corporation. All rights reserved.
6339 * Licensed under the MIT License. See License.txt in the project root for license information.
6340 * ------------------------------------------------------------------------------------------ */
6341 Object.defineProperty(exports, "__esModule", ({ value: true }));
6342 exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0;
6343 const vscode_jsonrpc_1 = __webpack_require__(6);
6344 const messages_1 = __webpack_require__(27);
6345 var WorkDoneProgress;
6346 (function (WorkDoneProgress) {
6347 WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
6348 function is(value) {
6349 return value === WorkDoneProgress.type;
6351 WorkDoneProgress.is = is;
6352 })(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
6354 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
6355 * reporting from the server.
6357 var WorkDoneProgressCreateRequest;
6358 (function (WorkDoneProgressCreateRequest) {
6359 WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
6360 })(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
6362 * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
6363 * initiated on the server side.
6365 var WorkDoneProgressCancelNotification;
6366 (function (WorkDoneProgressCancelNotification) {
6367 WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
6368 })(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
6369 //# sourceMappingURL=protocol.progress.js.map
6373 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6376 /* --------------------------------------------------------------------------------------------
6377 * Copyright (c) TypeFox and others. All rights reserved.
6378 * Licensed under the MIT License. See License.txt in the project root for license information.
6379 * ------------------------------------------------------------------------------------------ */
6380 Object.defineProperty(exports, "__esModule", ({ value: true }));
6381 exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0;
6382 const messages_1 = __webpack_require__(27);
6384 * A request to result a `CallHierarchyItem` in a document at a given position.
6385 * Can be used as an input to a incoming or outgoing call hierarchy.
6389 var CallHierarchyPrepareRequest;
6390 (function (CallHierarchyPrepareRequest) {
6391 CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
6392 CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
6393 })(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
6395 * A request to resolve the incoming calls for a given `CallHierarchyItem`.
6399 var CallHierarchyIncomingCallsRequest;
6400 (function (CallHierarchyIncomingCallsRequest) {
6401 CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
6402 CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
6403 })(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
6405 * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
6409 var CallHierarchyOutgoingCallsRequest;
6410 (function (CallHierarchyOutgoingCallsRequest) {
6411 CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
6412 CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
6413 })(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
6414 //# sourceMappingURL=protocol.callHierarchy.js.map
6418 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6421 /* --------------------------------------------------------------------------------------------
6422 * Copyright (c) Microsoft Corporation. All rights reserved.
6423 * Licensed under the MIT License. See License.txt in the project root for license information.
6424 * ------------------------------------------------------------------------------------------ */
6425 Object.defineProperty(exports, "__esModule", ({ value: true }));
6426 exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = void 0;
6427 const messages_1 = __webpack_require__(27);
6429 * A set of predefined token types. This set is not fixed
6430 * an clients can specify additional token types via the
6431 * corresponding client capabilities.
6435 var SemanticTokenTypes;
6436 (function (SemanticTokenTypes) {
6437 SemanticTokenTypes["namespace"] = "namespace";
6439 * Represents a generic type. Acts as a fallback for types which can't be mapped to
6440 * a specific type like class or enum.
6442 SemanticTokenTypes["type"] = "type";
6443 SemanticTokenTypes["class"] = "class";
6444 SemanticTokenTypes["enum"] = "enum";
6445 SemanticTokenTypes["interface"] = "interface";
6446 SemanticTokenTypes["struct"] = "struct";
6447 SemanticTokenTypes["typeParameter"] = "typeParameter";
6448 SemanticTokenTypes["parameter"] = "parameter";
6449 SemanticTokenTypes["variable"] = "variable";
6450 SemanticTokenTypes["property"] = "property";
6451 SemanticTokenTypes["enumMember"] = "enumMember";
6452 SemanticTokenTypes["event"] = "event";
6453 SemanticTokenTypes["function"] = "function";
6454 SemanticTokenTypes["method"] = "method";
6455 SemanticTokenTypes["macro"] = "macro";
6456 SemanticTokenTypes["keyword"] = "keyword";
6457 SemanticTokenTypes["modifier"] = "modifier";
6458 SemanticTokenTypes["comment"] = "comment";
6459 SemanticTokenTypes["string"] = "string";
6460 SemanticTokenTypes["number"] = "number";
6461 SemanticTokenTypes["regexp"] = "regexp";
6462 SemanticTokenTypes["operator"] = "operator";
6463 })(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
6465 * A set of predefined token modifiers. This set is not fixed
6466 * an clients can specify additional token types via the
6467 * corresponding client capabilities.
6471 var SemanticTokenModifiers;
6472 (function (SemanticTokenModifiers) {
6473 SemanticTokenModifiers["declaration"] = "declaration";
6474 SemanticTokenModifiers["definition"] = "definition";
6475 SemanticTokenModifiers["readonly"] = "readonly";
6476 SemanticTokenModifiers["static"] = "static";
6477 SemanticTokenModifiers["deprecated"] = "deprecated";
6478 SemanticTokenModifiers["abstract"] = "abstract";
6479 SemanticTokenModifiers["async"] = "async";
6480 SemanticTokenModifiers["modification"] = "modification";
6481 SemanticTokenModifiers["documentation"] = "documentation";
6482 SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
6483 })(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
6488 (function (SemanticTokens) {
6489 function is(value) {
6490 const candidate = value;
6491 return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
6492 Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
6494 SemanticTokens.is = is;
6495 })(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
6496 //------- 'textDocument/semanticTokens' -----
6498 (function (TokenFormat) {
6499 TokenFormat.Relative = 'relative';
6500 })(TokenFormat = exports.TokenFormat || (exports.TokenFormat = {}));
6501 var SemanticTokensRegistrationType;
6502 (function (SemanticTokensRegistrationType) {
6503 SemanticTokensRegistrationType.method = 'textDocument/semanticTokens';
6504 SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method);
6505 })(SemanticTokensRegistrationType = exports.SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = {}));
6509 var SemanticTokensRequest;
6510 (function (SemanticTokensRequest) {
6511 SemanticTokensRequest.method = 'textDocument/semanticTokens/full';
6512 SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
6513 })(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
6517 var SemanticTokensDeltaRequest;
6518 (function (SemanticTokensDeltaRequest) {
6519 SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta';
6520 SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method);
6521 })(SemanticTokensDeltaRequest = exports.SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = {}));
6525 var SemanticTokensRangeRequest;
6526 (function (SemanticTokensRangeRequest) {
6527 SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
6528 SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
6529 })(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
6533 var SemanticTokensRefreshRequest;
6534 (function (SemanticTokensRefreshRequest) {
6535 SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`;
6536 SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method);
6537 })(SemanticTokensRefreshRequest = exports.SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = {}));
6538 //# sourceMappingURL=protocol.semanticTokens.js.map
6542 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6545 /* --------------------------------------------------------------------------------------------
6546 * Copyright (c) Microsoft Corporation. All rights reserved.
6547 * Licensed under the MIT License. See License.txt in the project root for license information.
6548 * ------------------------------------------------------------------------------------------ */
6549 Object.defineProperty(exports, "__esModule", ({ value: true }));
6550 exports.ShowDocumentRequest = void 0;
6551 const messages_1 = __webpack_require__(27);
6553 * A request to show a document. This request might open an
6554 * external program depending on the value of the URI to open.
6555 * For example a request to open `https://code.visualstudio.com/`
6556 * will very likely open the URI in a WEB browser.
6560 var ShowDocumentRequest;
6561 (function (ShowDocumentRequest) {
6562 ShowDocumentRequest.method = 'window/showDocument';
6563 ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method);
6564 })(ShowDocumentRequest = exports.ShowDocumentRequest || (exports.ShowDocumentRequest = {}));
6565 //# sourceMappingURL=protocol.showDocument.js.map
6569 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6572 /*---------------------------------------------------------------------------------------------
6573 * Copyright (c) Microsoft Corporation. All rights reserved.
6574 * Licensed under the MIT License. See License.txt in the project root for license information.
6575 *--------------------------------------------------------------------------------------------*/
6576 Object.defineProperty(exports, "__esModule", ({ value: true }));
6577 exports.LinkedEditingRangeRequest = void 0;
6578 const messages_1 = __webpack_require__(27);
6580 * A request to provide ranges that can be edited together.
6584 var LinkedEditingRangeRequest;
6585 (function (LinkedEditingRangeRequest) {
6586 LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange';
6587 LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method);
6588 })(LinkedEditingRangeRequest = exports.LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = {}));
6589 //# sourceMappingURL=protocol.linkedEditingRange.js.map
6593 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6596 /* --------------------------------------------------------------------------------------------
6597 * Copyright (c) Microsoft Corporation. All rights reserved.
6598 * Licensed under the MIT License. See License.txt in the project root for license information.
6599 * ------------------------------------------------------------------------------------------ */
6600 Object.defineProperty(exports, "__esModule", ({ value: true }));
6601 exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0;
6602 const messages_1 = __webpack_require__(27);
6604 * A pattern kind describing if a glob pattern matches a file a folder or
6609 var FileOperationPatternKind;
6610 (function (FileOperationPatternKind) {
6612 * The pattern matches a file only.
6614 FileOperationPatternKind.file = 'file';
6616 * The pattern matches a folder only.
6618 FileOperationPatternKind.folder = 'folder';
6619 })(FileOperationPatternKind = exports.FileOperationPatternKind || (exports.FileOperationPatternKind = {}));
6621 * The will create files request is sent from the client to the server before files are actually
6622 * created as long as the creation is triggered from within the client.
6626 var WillCreateFilesRequest;
6627 (function (WillCreateFilesRequest) {
6628 WillCreateFilesRequest.method = 'workspace/willCreateFiles';
6629 WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method);
6630 })(WillCreateFilesRequest = exports.WillCreateFilesRequest || (exports.WillCreateFilesRequest = {}));
6632 * The did create files notification is sent from the client to the server when
6633 * files were created from within the client.
6637 var DidCreateFilesNotification;
6638 (function (DidCreateFilesNotification) {
6639 DidCreateFilesNotification.method = 'workspace/didCreateFiles';
6640 DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method);
6641 })(DidCreateFilesNotification = exports.DidCreateFilesNotification || (exports.DidCreateFilesNotification = {}));
6643 * The will rename files request is sent from the client to the server before files are actually
6644 * renamed as long as the rename is triggered from within the client.
6648 var WillRenameFilesRequest;
6649 (function (WillRenameFilesRequest) {
6650 WillRenameFilesRequest.method = 'workspace/willRenameFiles';
6651 WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method);
6652 })(WillRenameFilesRequest = exports.WillRenameFilesRequest || (exports.WillRenameFilesRequest = {}));
6654 * The did rename files notification is sent from the client to the server when
6655 * files were renamed from within the client.
6659 var DidRenameFilesNotification;
6660 (function (DidRenameFilesNotification) {
6661 DidRenameFilesNotification.method = 'workspace/didRenameFiles';
6662 DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method);
6663 })(DidRenameFilesNotification = exports.DidRenameFilesNotification || (exports.DidRenameFilesNotification = {}));
6665 * The will delete files request is sent from the client to the server before files are actually
6666 * deleted as long as the deletion is triggered from within the client.
6670 var DidDeleteFilesNotification;
6671 (function (DidDeleteFilesNotification) {
6672 DidDeleteFilesNotification.method = 'workspace/didDeleteFiles';
6673 DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method);
6674 })(DidDeleteFilesNotification = exports.DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = {}));
6676 * The did delete files notification is sent from the client to the server when
6677 * files were deleted from within the client.
6681 var WillDeleteFilesRequest;
6682 (function (WillDeleteFilesRequest) {
6683 WillDeleteFilesRequest.method = 'workspace/willDeleteFiles';
6684 WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method);
6685 })(WillDeleteFilesRequest = exports.WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = {}));
6686 //# sourceMappingURL=protocol.fileOperations.js.map
6690 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6693 /* --------------------------------------------------------------------------------------------
6694 * Copyright (c) Microsoft Corporation. All rights reserved.
6695 * Licensed under the MIT License. See License.txt in the project root for license information.
6696 * ------------------------------------------------------------------------------------------ */
6697 Object.defineProperty(exports, "__esModule", ({ value: true }));
6698 exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0;
6699 const messages_1 = __webpack_require__(27);
6701 * Moniker uniqueness level to define scope of the moniker.
6705 var UniquenessLevel;
6706 (function (UniquenessLevel) {
6708 * The moniker is only unique inside a document
6710 UniquenessLevel["document"] = "document";
6712 * The moniker is unique inside a project for which a dump got created
6714 UniquenessLevel["project"] = "project";
6716 * The moniker is unique inside the group to which a project belongs
6718 UniquenessLevel["group"] = "group";
6720 * The moniker is unique inside the moniker scheme.
6722 UniquenessLevel["scheme"] = "scheme";
6724 * The moniker is globally unique
6726 UniquenessLevel["global"] = "global";
6727 })(UniquenessLevel = exports.UniquenessLevel || (exports.UniquenessLevel = {}));
6734 (function (MonikerKind) {
6736 * The moniker represent a symbol that is imported into a project
6738 MonikerKind["import"] = "import";
6740 * The moniker represents a symbol that is exported from a project
6742 MonikerKind["export"] = "export";
6744 * The moniker represents a symbol that is local to a project (e.g. a local
6745 * variable of a function, a class not visible outside the project, ...)
6747 MonikerKind["local"] = "local";
6748 })(MonikerKind = exports.MonikerKind || (exports.MonikerKind = {}));
6750 * A request to get the moniker of a symbol at a given text document position.
6751 * The request parameter is of type [TextDocumentPositionParams](#TextDocumentPositionParams).
6752 * The response is of type [Moniker[]](#Moniker[]) or `null`.
6755 (function (MonikerRequest) {
6756 MonikerRequest.method = 'textDocument/moniker';
6757 MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method);
6758 })(MonikerRequest = exports.MonikerRequest || (exports.MonikerRequest = {}));
6759 //# sourceMappingURL=protocol.moniker.js.map
6763 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6766 /* --------------------------------------------------------------------------------------------
6767 * Copyright (c) Microsoft Corporation. All rights reserved.
6768 * Licensed under the MIT License. See License.txt in the project root for license information.
6769 * ------------------------------------------------------------------------------------------ */
6770 Object.defineProperty(exports, "__esModule", ({ value: true }));
6771 exports.createProtocolConnection = void 0;
6772 const vscode_jsonrpc_1 = __webpack_require__(6);
6773 function createProtocolConnection(input, output, logger, options) {
6774 if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
6775 options = { connectionStrategy: options };
6777 return vscode_jsonrpc_1.createMessageConnection(input, output, logger, options);
6779 exports.createProtocolConnection = createProtocolConnection;
6780 //# sourceMappingURL=connection.js.map
6785 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6788 /*---------------------------------------------------------------------------------------------
6789 * Copyright (c) Microsoft Corporation. All rights reserved.
6790 * Licensed under the MIT License. See License.txt in the project root for license information.
6791 *--------------------------------------------------------------------------------------------*/
6792 Object.defineProperty(exports, "__esModule", ({ value: true }));
6793 const node_1 = __webpack_require__(48);
6794 const runner_1 = __webpack_require__(68);
6795 const htmlServer_1 = __webpack_require__(69);
6796 const nodeFs_1 = __webpack_require__(163);
6797 // Create a connection for the server.
6798 const connection = node_1.createConnection();
6799 console.log = connection.console.log.bind(connection.console);
6800 console.error = connection.console.error.bind(connection.console);
6801 process.on('unhandledRejection', (e) => {
6802 connection.console.error(runner_1.formatError(`Unhandled exception`, e));
6804 htmlServer_1.startServer(connection, { file: nodeFs_1.getNodeFSRequestService() });
6809 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6811 /* --------------------------------------------------------------------------------------------
6812 * Copyright (c) Microsoft Corporation. All rights reserved.
6813 * Licensed under the MIT License. See License.txt in the project root for license information.
6814 * ----------------------------------------------------------------------------------------- */
6817 module.exports = __webpack_require__(49);
6821 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6824 /* --------------------------------------------------------------------------------------------
6825 * Copyright (c) Microsoft Corporation. All rights reserved.
6826 * Licensed under the MIT License. See License.txt in the project root for license information.
6827 * ------------------------------------------------------------------------------------------ */
6828 /// <reference path="../../typings/thenable.d.ts" />
6829 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6830 if (k2 === undefined) k2 = k;
6831 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6832 }) : (function(o, m, k, k2) {
6833 if (k2 === undefined) k2 = k;
6836 var __exportStar = (this && this.__exportStar) || function(m, exports) {
6837 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
6839 Object.defineProperty(exports, "__esModule", ({ value: true }));
6840 exports.createConnection = exports.Files = void 0;
6841 const Is = __webpack_require__(50);
6842 const server_1 = __webpack_require__(51);
6843 const fm = __webpack_require__(62);
6844 const node_1 = __webpack_require__(66);
6845 __exportStar(__webpack_require__(66), exports);
6846 __exportStar(__webpack_require__(67), exports);
6849 Files.uriToFilePath = fm.uriToFilePath;
6850 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
6851 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
6852 Files.resolve = fm.resolve;
6853 Files.resolveModulePath = fm.resolveModulePath;
6854 })(Files = exports.Files || (exports.Files = {}));
6855 let _protocolConnection;
6856 function endProtocolConnection() {
6857 if (_protocolConnection === undefined) {
6861 _protocolConnection.end();
6864 // Ignore. The client process could have already
6865 // did and we can't send an end into the connection.
6868 let _shutdownReceived = false;
6869 let exitTimer = undefined;
6870 function setupExitTimer() {
6871 const argName = '--clientProcessId';
6872 function runTimer(value) {
6874 let processId = parseInt(value);
6875 if (!isNaN(processId)) {
6876 exitTimer = setInterval(() => {
6878 process.kill(processId, 0);
6881 // Parent process doesn't exist anymore. Exit the server.
6882 endProtocolConnection();
6883 process.exit(_shutdownReceived ? 0 : 1);
6892 for (let i = 2; i < process.argv.length; i++) {
6893 let arg = process.argv[i];
6894 if (arg === argName && i + 1 < process.argv.length) {
6895 runTimer(process.argv[i + 1]);
6899 let args = arg.split('=');
6900 if (args[0] === argName) {
6908 initialize: (params) => {
6909 const processId = params.processId;
6910 if (Is.number(processId) && exitTimer === undefined) {
6911 // We received a parent process id. Set up a timer to periodically check
6912 // if the parent is still alive.
6915 process.kill(processId, 0);
6918 // Parent process doesn't exist anymore. Exit the server.
6919 process.exit(_shutdownReceived ? 0 : 1);
6924 get shutdownReceived() {
6925 return _shutdownReceived;
6927 set shutdownReceived(value) {
6928 _shutdownReceived = value;
6931 endProtocolConnection();
6935 function createConnection(arg1, arg2, arg3, arg4) {
6940 if (arg1 !== void 0 && arg1.__brand === 'features') {
6946 if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {
6954 return _createConnection(input, output, options, factories);
6956 exports.createConnection = createConnection;
6957 function _createConnection(input, output, options, factories) {
6958 if (!input && !output && process.argv.length > 2) {
6960 let pipeName = void 0;
6961 let argv = process.argv.slice(2);
6962 for (let i = 0; i < argv.length; i++) {
6964 if (arg === '--node-ipc') {
6965 input = new node_1.IPCMessageReader(process);
6966 output = new node_1.IPCMessageWriter(process);
6969 else if (arg === '--stdio') {
6970 input = process.stdin;
6971 output = process.stdout;
6974 else if (arg === '--socket') {
6975 port = parseInt(argv[i + 1]);
6978 else if (arg === '--pipe') {
6979 pipeName = argv[i + 1];
6983 var args = arg.split('=');
6984 if (args[0] === '--socket') {
6985 port = parseInt(args[1]);
6988 else if (args[0] === '--pipe') {
6995 let transport = node_1.createServerSocketTransport(port);
6996 input = transport[0];
6997 output = transport[1];
6999 else if (pipeName) {
7000 let transport = node_1.createServerPipeTransport(pipeName);
7001 input = transport[0];
7002 output = transport[1];
7005 var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
7007 throw new Error('Connection input stream is not set. ' + commandLineMessage);
7010 throw new Error('Connection output stream is not set. ' + commandLineMessage);
7012 // Backwards compatibility
7013 if (Is.func(input.read) && Is.func(input.on)) {
7014 let inputStream = input;
7015 inputStream.on('end', () => {
7016 endProtocolConnection();
7017 process.exit(_shutdownReceived ? 0 : 1);
7019 inputStream.on('close', () => {
7020 endProtocolConnection();
7021 process.exit(_shutdownReceived ? 0 : 1);
7024 const connectionFactory = (logger) => {
7025 const result = node_1.createProtocolConnection(input, output, logger, options);
7028 return server_1.createConnection(connectionFactory, watchDog, factories);
7030 //# sourceMappingURL=main.js.map
7034 /***/ ((__unused_webpack_module, exports) => {
7037 /* --------------------------------------------------------------------------------------------
7038 * Copyright (c) Microsoft Corporation. All rights reserved.
7039 * Licensed under the MIT License. See License.txt in the project root for license information.
7040 * ------------------------------------------------------------------------------------------ */
7041 Object.defineProperty(exports, "__esModule", ({ value: true }));
7042 exports.thenable = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;
7043 function boolean(value) {
7044 return value === true || value === false;
7046 exports.boolean = boolean;
7047 function string(value) {
7048 return typeof value === 'string' || value instanceof String;
7050 exports.string = string;
7051 function number(value) {
7052 return typeof value === 'number' || value instanceof Number;
7054 exports.number = number;
7055 function error(value) {
7056 return value instanceof Error;
7058 exports.error = error;
7059 function func(value) {
7060 return typeof value === 'function';
7062 exports.func = func;
7063 function array(value) {
7064 return Array.isArray(value);
7066 exports.array = array;
7067 function stringArray(value) {
7068 return array(value) && value.every(elem => string(elem));
7070 exports.stringArray = stringArray;
7071 function typedArray(value, check) {
7072 return Array.isArray(value) && value.every(check);
7074 exports.typedArray = typedArray;
7075 function thenable(value) {
7076 return value && func(value.then);
7078 exports.thenable = thenable;
7079 //# sourceMappingURL=is.js.map
7083 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7086 /* --------------------------------------------------------------------------------------------
7087 * Copyright (c) Microsoft Corporation. All rights reserved.
7088 * Licensed under the MIT License. See License.txt in the project root for license information.
7089 * ------------------------------------------------------------------------------------------ */
7090 Object.defineProperty(exports, "__esModule", ({ value: true }));
7091 exports.createConnection = exports.combineFeatures = exports.combineLanguagesFeatures = exports.combineWorkspaceFeatures = exports.combineWindowFeatures = exports.combineClientFeatures = exports.combineTracerFeatures = exports.combineTelemetryFeatures = exports.combineConsoleFeatures = exports._LanguagesImpl = exports.BulkUnregistration = exports.BulkRegistration = exports.ErrorMessageTracker = exports.TextDocuments = void 0;
7092 const vscode_languageserver_protocol_1 = __webpack_require__(4);
7093 const Is = __webpack_require__(50);
7094 const UUID = __webpack_require__(52);
7095 const progress_1 = __webpack_require__(53);
7096 const configuration_1 = __webpack_require__(54);
7097 const workspaceFolders_1 = __webpack_require__(55);
7098 const callHierarchy_1 = __webpack_require__(56);
7099 const semanticTokens_1 = __webpack_require__(57);
7100 const showDocument_1 = __webpack_require__(58);
7101 const fileOperations_1 = __webpack_require__(59);
7102 const linkedEditingRange_1 = __webpack_require__(60);
7103 const moniker_1 = __webpack_require__(61);
7104 function null2Undefined(value) {
7105 if (value === null) {
7111 * A manager for simple text documents
7113 class TextDocuments {
7115 * Create a new text document manager.
7117 constructor(configuration) {
7118 this._documents = Object.create(null);
7119 this._configuration = configuration;
7120 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
7121 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
7122 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
7123 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
7124 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
7127 * An event that fires when a text document managed by this manager
7128 * has been opened or the content changes.
7130 get onDidChangeContent() {
7131 return this._onDidChangeContent.event;
7134 * An event that fires when a text document managed by this manager
7138 return this._onDidOpen.event;
7141 * An event that fires when a text document managed by this manager
7145 return this._onWillSave.event;
7148 * Sets a handler that will be called if a participant wants to provide
7149 * edits during a text document save.
7151 onWillSaveWaitUntil(handler) {
7152 this._willSaveWaitUntil = handler;
7155 * An event that fires when a text document managed by this manager
7159 return this._onDidSave.event;
7162 * An event that fires when a text document managed by this manager
7166 return this._onDidClose.event;
7169 * Returns the document for the given URI. Returns undefined if
7170 * the document is not managed by this instance.
7172 * @param uri The text document's URI to retrieve.
7173 * @return the text document or `undefined`.
7176 return this._documents[uri];
7179 * Returns all text documents managed by this instance.
7181 * @return all text documents.
7184 return Object.keys(this._documents).map(key => this._documents[key]);
7187 * Returns the URIs of all text documents managed by this instance.
7189 * @return the URI's of all text documents.
7192 return Object.keys(this._documents);
7195 * Listens for `low level` notification on the given connection to
7196 * update the text documents managed by this instance.
7198 * Please note that the connection only provides handlers not an event model. Therefore
7199 * listening on a connection will overwrite the following handlers on a connection:
7200 * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,
7201 * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.
7203 * Use the corresponding events on the TextDocuments instance instead.
7205 * @param connection The connection to listen on.
7207 listen(connection) {
7208 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
7209 connection.onDidOpenTextDocument((event) => {
7210 let td = event.textDocument;
7211 let document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
7212 this._documents[td.uri] = document;
7213 let toFire = Object.freeze({ document });
7214 this._onDidOpen.fire(toFire);
7215 this._onDidChangeContent.fire(toFire);
7217 connection.onDidChangeTextDocument((event) => {
7218 let td = event.textDocument;
7219 let changes = event.contentChanges;
7220 if (changes.length === 0) {
7223 let document = this._documents[td.uri];
7224 const { version } = td;
7225 if (version === null || version === undefined) {
7226 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
7228 document = this._configuration.update(document, changes, version);
7229 this._documents[td.uri] = document;
7230 this._onDidChangeContent.fire(Object.freeze({ document }));
7232 connection.onDidCloseTextDocument((event) => {
7233 let document = this._documents[event.textDocument.uri];
7235 delete this._documents[event.textDocument.uri];
7236 this._onDidClose.fire(Object.freeze({ document }));
7239 connection.onWillSaveTextDocument((event) => {
7240 let document = this._documents[event.textDocument.uri];
7242 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
7245 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
7246 let document = this._documents[event.textDocument.uri];
7247 if (document && this._willSaveWaitUntil) {
7248 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
7254 connection.onDidSaveTextDocument((event) => {
7255 let document = this._documents[event.textDocument.uri];
7257 this._onDidSave.fire(Object.freeze({ document }));
7262 exports.TextDocuments = TextDocuments;
7264 * Helps tracking error message. Equal occurrences of the same
7265 * message are only stored once. This class is for example
7266 * useful if text documents are validated in a loop and equal
7267 * error message should be folded into one.
7269 class ErrorMessageTracker {
7271 this._messages = Object.create(null);
7274 * Add a message to the tracker.
7276 * @param message The message to add.
7279 let count = this._messages[message];
7284 this._messages[message] = count;
7287 * Send all tracked messages to the connection's window.
7289 * @param connection The connection established between client and server.
7291 sendErrors(connection) {
7292 Object.keys(this._messages).forEach(message => {
7293 connection.window.showErrorMessage(message);
7297 exports.ErrorMessageTracker = ErrorMessageTracker;
7298 class RemoteConsoleImpl {
7301 rawAttach(connection) {
7302 this._rawConnection = connection;
7304 attach(connection) {
7305 this._connection = connection;
7308 if (!this._connection) {
7309 throw new Error('Remote is not attached to a connection yet.');
7311 return this._connection;
7313 fillServerCapabilities(_capabilities) {
7315 initialize(_capabilities) {
7318 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
7321 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
7324 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
7327 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
7329 send(type, message) {
7330 if (this._rawConnection) {
7331 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
7335 class _RemoteWindowImpl {
7338 attach(connection) {
7339 this._connection = connection;
7342 if (!this._connection) {
7343 throw new Error('Remote is not attached to a connection yet.');
7345 return this._connection;
7347 initialize(_capabilities) {
7349 fillServerCapabilities(_capabilities) {
7351 showErrorMessage(message, ...actions) {
7352 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
7353 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
7355 showWarningMessage(message, ...actions) {
7356 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
7357 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
7359 showInformationMessage(message, ...actions) {
7360 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
7361 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
7364 const RemoteWindowImpl = showDocument_1.ShowDocumentFeature(progress_1.ProgressFeature(_RemoteWindowImpl));
7365 var BulkRegistration;
7366 (function (BulkRegistration) {
7368 * Creates a new bulk registration.
7369 * @return an empty bulk registration.
7372 return new BulkRegistrationImpl();
7374 BulkRegistration.create = create;
7375 })(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
7376 class BulkRegistrationImpl {
7378 this._registrations = [];
7379 this._registered = new Set();
7381 add(type, registerOptions) {
7382 const method = Is.string(type) ? type : type.method;
7383 if (this._registered.has(method)) {
7384 throw new Error(`${method} is already added to this registration`);
7386 const id = UUID.generateUuid();
7387 this._registrations.push({
7390 registerOptions: registerOptions || {}
7392 this._registered.add(method);
7394 asRegistrationParams() {
7396 registrations: this._registrations
7400 var BulkUnregistration;
7401 (function (BulkUnregistration) {
7403 return new BulkUnregistrationImpl(undefined, []);
7405 BulkUnregistration.create = create;
7406 })(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
7407 class BulkUnregistrationImpl {
7408 constructor(_connection, unregistrations) {
7409 this._connection = _connection;
7410 this._unregistrations = new Map();
7411 unregistrations.forEach(unregistration => {
7412 this._unregistrations.set(unregistration.method, unregistration);
7416 return !!this._connection;
7418 attach(connection) {
7419 this._connection = connection;
7421 add(unregistration) {
7422 this._unregistrations.set(unregistration.method, unregistration);
7425 let unregistrations = [];
7426 for (let unregistration of this._unregistrations.values()) {
7427 unregistrations.push(unregistration);
7430 unregisterations: unregistrations
7432 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
7433 this._connection.console.info(`Bulk unregistration failed.`);
7436 disposeSingle(arg) {
7437 const method = Is.string(arg) ? arg : arg.method;
7438 const unregistration = this._unregistrations.get(method);
7439 if (!unregistration) {
7443 unregisterations: [unregistration]
7445 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
7446 this._unregistrations.delete(method);
7448 this._connection.console.info(`Un-registering request handler for ${unregistration.id} failed.`);
7453 class RemoteClientImpl {
7454 attach(connection) {
7455 this._connection = connection;
7458 if (!this._connection) {
7459 throw new Error('Remote is not attached to a connection yet.');
7461 return this._connection;
7463 initialize(_capabilities) {
7465 fillServerCapabilities(_capabilities) {
7467 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
7468 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
7469 return this.registerMany(typeOrRegistrations);
7471 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
7472 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
7475 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
7478 registerSingle1(unregistration, type, registerOptions) {
7479 const method = Is.string(type) ? type : type.method;
7480 const id = UUID.generateUuid();
7482 registrations: [{ id, method, registerOptions: registerOptions || {} }]
7484 if (!unregistration.isAttached) {
7485 unregistration.attach(this.connection);
7487 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
7488 unregistration.add({ id: id, method: method });
7489 return unregistration;
7491 this.connection.console.info(`Registering request handler for ${method} failed.`);
7492 return Promise.reject(_error);
7495 registerSingle2(type, registerOptions) {
7496 const method = Is.string(type) ? type : type.method;
7497 const id = UUID.generateUuid();
7499 registrations: [{ id, method, registerOptions: registerOptions || {} }]
7501 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
7502 return vscode_languageserver_protocol_1.Disposable.create(() => {
7503 this.unregisterSingle(id, method);
7506 this.connection.console.info(`Registering request handler for ${method} failed.`);
7507 return Promise.reject(_error);
7510 unregisterSingle(id, method) {
7512 unregisterations: [{ id, method }]
7514 return this.connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
7515 this.connection.console.info(`Un-registering request handler for ${id} failed.`);
7518 registerMany(registrations) {
7519 let params = registrations.asRegistrationParams();
7520 return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
7521 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
7523 this.connection.console.info(`Bulk registration failed.`);
7524 return Promise.reject(_error);
7528 class _RemoteWorkspaceImpl {
7531 attach(connection) {
7532 this._connection = connection;
7535 if (!this._connection) {
7536 throw new Error('Remote is not attached to a connection yet.');
7538 return this._connection;
7540 initialize(_capabilities) {
7542 fillServerCapabilities(_capabilities) {
7544 applyEdit(paramOrEdit) {
7545 function isApplyWorkspaceEditParams(value) {
7546 return value && !!value.edit;
7548 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
7549 return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
7552 const RemoteWorkspaceImpl = fileOperations_1.FileOperationsFeature(workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl)));
7555 this._trace = vscode_languageserver_protocol_1.Trace.Off;
7557 attach(connection) {
7558 this._connection = connection;
7561 if (!this._connection) {
7562 throw new Error('Remote is not attached to a connection yet.');
7564 return this._connection;
7566 initialize(_capabilities) {
7568 fillServerCapabilities(_capabilities) {
7571 this._trace = value;
7573 log(message, verbose) {
7574 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
7577 this.connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
7579 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
7583 class TelemetryImpl {
7586 attach(connection) {
7587 this._connection = connection;
7590 if (!this._connection) {
7591 throw new Error('Remote is not attached to a connection yet.');
7593 return this._connection;
7595 initialize(_capabilities) {
7597 fillServerCapabilities(_capabilities) {
7600 this.connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
7603 class _LanguagesImpl {
7606 attach(connection) {
7607 this._connection = connection;
7610 if (!this._connection) {
7611 throw new Error('Remote is not attached to a connection yet.');
7613 return this._connection;
7615 initialize(_capabilities) {
7617 fillServerCapabilities(_capabilities) {
7619 attachWorkDoneProgress(params) {
7620 return progress_1.attachWorkDone(this.connection, params);
7622 attachPartialResultProgress(_type, params) {
7623 return progress_1.attachPartialResult(this.connection, params);
7626 exports._LanguagesImpl = _LanguagesImpl;
7627 const LanguagesImpl = moniker_1.MonikerFeature(linkedEditingRange_1.LinkedEditingRangeFeature(semanticTokens_1.SemanticTokensFeature(callHierarchy_1.CallHierarchyFeature(_LanguagesImpl))));
7628 function combineConsoleFeatures(one, two) {
7629 return function (Base) {
7630 return two(one(Base));
7633 exports.combineConsoleFeatures = combineConsoleFeatures;
7634 function combineTelemetryFeatures(one, two) {
7635 return function (Base) {
7636 return two(one(Base));
7639 exports.combineTelemetryFeatures = combineTelemetryFeatures;
7640 function combineTracerFeatures(one, two) {
7641 return function (Base) {
7642 return two(one(Base));
7645 exports.combineTracerFeatures = combineTracerFeatures;
7646 function combineClientFeatures(one, two) {
7647 return function (Base) {
7648 return two(one(Base));
7651 exports.combineClientFeatures = combineClientFeatures;
7652 function combineWindowFeatures(one, two) {
7653 return function (Base) {
7654 return two(one(Base));
7657 exports.combineWindowFeatures = combineWindowFeatures;
7658 function combineWorkspaceFeatures(one, two) {
7659 return function (Base) {
7660 return two(one(Base));
7663 exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
7664 function combineLanguagesFeatures(one, two) {
7665 return function (Base) {
7666 return two(one(Base));
7669 exports.combineLanguagesFeatures = combineLanguagesFeatures;
7670 function combineFeatures(one, two) {
7671 function combine(one, two, func) {
7673 return func(one, two);
7683 __brand: 'features',
7684 console: combine(one.console, two.console, combineConsoleFeatures),
7685 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
7686 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
7687 client: combine(one.client, two.client, combineClientFeatures),
7688 window: combine(one.window, two.window, combineWindowFeatures),
7689 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
7693 exports.combineFeatures = combineFeatures;
7694 function createConnection(connectionFactory, watchDog, factories) {
7695 const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
7696 const connection = connectionFactory(logger);
7697 logger.rawAttach(connection);
7698 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
7699 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
7700 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
7701 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
7702 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
7703 const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
7704 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages];
7705 function asPromise(value) {
7706 if (value instanceof Promise) {
7709 else if (Is.thenable(value)) {
7710 return new Promise((resolve, reject) => {
7711 value.then((resolved) => resolve(resolved), (error) => reject(error));
7715 return Promise.resolve(value);
7718 let shutdownHandler = undefined;
7719 let initializeHandler = undefined;
7720 let exitHandler = undefined;
7721 let protocolConnection = {
7722 listen: () => connection.listen(),
7723 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
7724 onRequest: (type, handler) => connection.onRequest(type, handler),
7725 sendNotification: (type, param) => {
7726 const method = Is.string(type) ? type : type.method;
7727 if (arguments.length === 1) {
7728 connection.sendNotification(method);
7731 connection.sendNotification(method, param);
7734 onNotification: (type, handler) => connection.onNotification(type, handler),
7735 onProgress: connection.onProgress,
7736 sendProgress: connection.sendProgress,
7737 onInitialize: (handler) => initializeHandler = handler,
7738 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
7739 onShutdown: (handler) => shutdownHandler = handler,
7740 onExit: (handler) => exitHandler = handler,
7741 get console() { return logger; },
7742 get telemetry() { return telemetry; },
7743 get tracer() { return tracer; },
7744 get client() { return client; },
7745 get window() { return remoteWindow; },
7746 get workspace() { return workspace; },
7747 get languages() { return languages; },
7748 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
7749 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
7750 __textDocumentSync: undefined,
7751 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
7752 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
7753 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
7754 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
7755 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
7756 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
7757 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
7758 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
7759 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
7761 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
7762 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7764 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
7765 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
7766 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
7768 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
7769 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7771 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
7772 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7774 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
7775 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7777 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
7778 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7780 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
7781 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7783 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
7784 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7786 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
7787 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7789 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
7790 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7792 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
7793 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7795 onCodeActionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionResolveRequest.type, (params, cancel) => {
7796 return handler(params, cancel);
7798 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
7799 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7801 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
7802 return handler(params, cancel);
7804 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
7805 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
7807 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
7808 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
7810 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
7811 return handler(params, cancel);
7813 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
7814 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
7816 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
7817 return handler(params, cancel);
7819 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
7820 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7822 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
7823 return handler(params, cancel);
7825 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
7826 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7828 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
7829 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7831 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
7832 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7834 onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
7835 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
7837 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
7838 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
7840 dispose: () => connection.dispose()
7842 for (let remote of allRemotes) {
7843 remote.attach(protocolConnection);
7845 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
7846 watchDog.initialize(params);
7847 if (Is.string(params.trace)) {
7848 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
7850 for (let remote of allRemotes) {
7851 remote.initialize(params.capabilities);
7853 if (initializeHandler) {
7854 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined);
7855 return asPromise(result).then((value) => {
7856 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
7861 result = { capabilities: {} };
7863 let capabilities = result.capabilities;
7864 if (!capabilities) {
7866 result.capabilities = capabilities;
7868 if (capabilities.textDocumentSync === undefined || capabilities.textDocumentSync === null) {
7869 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
7871 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
7872 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
7874 for (let remote of allRemotes) {
7875 remote.fillServerCapabilities(capabilities);
7881 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
7882 for (let remote of allRemotes) {
7883 remote.fillServerCapabilities(result.capabilities);
7888 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
7889 watchDog.shutdownReceived = true;
7890 if (shutdownHandler) {
7891 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
7897 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
7904 if (watchDog.shutdownReceived) {
7912 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
7913 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
7915 return protocolConnection;
7917 exports.createConnection = createConnection;
7918 //# sourceMappingURL=server.js.map
7922 /***/ ((__unused_webpack_module, exports) => {
7925 /*---------------------------------------------------------------------------------------------
7926 * Copyright (c) Microsoft Corporation. All rights reserved.
7927 * Licensed under the MIT License. See License.txt in the project root for license information.
7928 *--------------------------------------------------------------------------------------------*/
7929 Object.defineProperty(exports, "__esModule", ({ value: true }));
7930 exports.generateUuid = exports.parse = exports.isUUID = exports.v4 = exports.empty = void 0;
7932 constructor(_value) {
7933 this._value = _value;
7940 return this.asHex() === other.asHex();
7943 class V4UUID extends ValueUUID {
7946 V4UUID._randomHex(),
7947 V4UUID._randomHex(),
7948 V4UUID._randomHex(),
7949 V4UUID._randomHex(),
7950 V4UUID._randomHex(),
7951 V4UUID._randomHex(),
7952 V4UUID._randomHex(),
7953 V4UUID._randomHex(),
7955 V4UUID._randomHex(),
7956 V4UUID._randomHex(),
7957 V4UUID._randomHex(),
7958 V4UUID._randomHex(),
7961 V4UUID._randomHex(),
7962 V4UUID._randomHex(),
7963 V4UUID._randomHex(),
7965 V4UUID._oneOf(V4UUID._timeHighBits),
7966 V4UUID._randomHex(),
7967 V4UUID._randomHex(),
7968 V4UUID._randomHex(),
7970 V4UUID._randomHex(),
7971 V4UUID._randomHex(),
7972 V4UUID._randomHex(),
7973 V4UUID._randomHex(),
7974 V4UUID._randomHex(),
7975 V4UUID._randomHex(),
7976 V4UUID._randomHex(),
7977 V4UUID._randomHex(),
7978 V4UUID._randomHex(),
7979 V4UUID._randomHex(),
7980 V4UUID._randomHex(),
7981 V4UUID._randomHex(),
7984 static _oneOf(array) {
7985 return array[Math.floor(array.length * Math.random())];
7987 static _randomHex() {
7988 return V4UUID._oneOf(V4UUID._chars);
7991 V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
7992 V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
7994 * An empty UUID that contains only zeros.
7996 exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
7998 return new V4UUID();
8001 const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
8002 function isUUID(value) {
8003 return _UUIDPattern.test(value);
8005 exports.isUUID = isUUID;
8007 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
8008 * @param value A uuid string.
8010 function parse(value) {
8011 if (!isUUID(value)) {
8012 throw new Error('invalid uuid');
8014 return new ValueUUID(value);
8016 exports.parse = parse;
8017 function generateUuid() {
8018 return v4().asHex();
8020 exports.generateUuid = generateUuid;
8021 //# sourceMappingURL=uuid.js.map
8025 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8028 /* --------------------------------------------------------------------------------------------
8029 * Copyright (c) Microsoft Corporation. All rights reserved.
8030 * Licensed under the MIT License. See License.txt in the project root for license information.
8031 * ------------------------------------------------------------------------------------------ */
8032 Object.defineProperty(exports, "__esModule", ({ value: true }));
8033 exports.attachPartialResult = exports.ProgressFeature = exports.attachWorkDone = void 0;
8034 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8035 const uuid_1 = __webpack_require__(52);
8036 class WorkDoneProgressReporterImpl {
8037 constructor(_connection, _token) {
8038 this._connection = _connection;
8039 this._token = _token;
8040 WorkDoneProgressReporterImpl.Instances.set(this._token, this);
8042 begin(title, percentage, message, cancellable) {
8050 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
8052 report(arg0, arg1) {
8056 if (typeof arg0 === 'number') {
8057 param.percentage = arg0;
8058 if (arg1 !== undefined) {
8059 param.message = arg1;
8063 param.message = arg0;
8065 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
8068 WorkDoneProgressReporterImpl.Instances.delete(this._token);
8069 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });
8072 WorkDoneProgressReporterImpl.Instances = new Map();
8073 class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl {
8074 constructor(connection, token) {
8075 super(connection, token);
8076 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
8079 return this._source.token;
8082 this._source.dispose();
8086 this._source.cancel();
8089 class NullProgressReporter {
8099 class NullProgressServerReporter extends NullProgressReporter {
8102 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
8105 return this._source.token;
8108 this._source.dispose();
8111 this._source.cancel();
8114 function attachWorkDone(connection, params) {
8115 if (params === undefined || params.workDoneToken === undefined) {
8116 return new NullProgressReporter();
8118 const token = params.workDoneToken;
8119 delete params.workDoneToken;
8120 return new WorkDoneProgressReporterImpl(connection, token);
8122 exports.attachWorkDone = attachWorkDone;
8123 const ProgressFeature = (Base) => {
8124 return class extends Base {
8127 this._progressSupported = false;
8129 initialize(capabilities) {
8131 if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) {
8132 this._progressSupported = true;
8133 this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
8134 let progress = WorkDoneProgressReporterImpl.Instances.get(params.token);
8135 if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) {
8141 attachWorkDoneProgress(token) {
8142 if (token === undefined) {
8143 return new NullProgressReporter();
8146 return new WorkDoneProgressReporterImpl(this.connection, token);
8149 createWorkDoneProgress() {
8150 if (this._progressSupported) {
8151 const token = uuid_1.generateUuid();
8152 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
8153 const result = new WorkDoneProgressServerReporterImpl(this.connection, token);
8158 return Promise.resolve(new NullProgressServerReporter());
8163 exports.ProgressFeature = ProgressFeature;
8165 (function (ResultProgress) {
8166 ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();
8167 })(ResultProgress || (ResultProgress = {}));
8168 class ResultProgressReporterImpl {
8169 constructor(_connection, _token) {
8170 this._connection = _connection;
8171 this._token = _token;
8174 this._connection.sendProgress(ResultProgress.type, this._token, data);
8177 function attachPartialResult(connection, params) {
8178 if (params === undefined || params.partialResultToken === undefined) {
8181 const token = params.partialResultToken;
8182 delete params.partialResultToken;
8183 return new ResultProgressReporterImpl(connection, token);
8185 exports.attachPartialResult = attachPartialResult;
8186 //# sourceMappingURL=progress.js.map
8190 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8193 /* --------------------------------------------------------------------------------------------
8194 * Copyright (c) Microsoft Corporation. All rights reserved.
8195 * Licensed under the MIT License. See License.txt in the project root for license information.
8196 * ------------------------------------------------------------------------------------------ */
8197 Object.defineProperty(exports, "__esModule", ({ value: true }));
8198 exports.ConfigurationFeature = void 0;
8199 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8200 const Is = __webpack_require__(50);
8201 const ConfigurationFeature = (Base) => {
8202 return class extends Base {
8203 getConfiguration(arg) {
8205 return this._getConfiguration({});
8207 else if (Is.string(arg)) {
8208 return this._getConfiguration({ section: arg });
8211 return this._getConfiguration(arg);
8214 _getConfiguration(arg) {
8216 items: Array.isArray(arg) ? arg : [arg]
8218 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
8219 return Array.isArray(arg) ? result : result[0];
8224 exports.ConfigurationFeature = ConfigurationFeature;
8225 //# sourceMappingURL=configuration.js.map
8229 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8231 /* --------------------------------------------------------------------------------------------
8232 * Copyright (c) Microsoft Corporation. All rights reserved.
8233 * Licensed under the MIT License. See License.txt in the project root for license information.
8234 * ------------------------------------------------------------------------------------------ */
8236 Object.defineProperty(exports, "__esModule", ({ value: true }));
8237 exports.WorkspaceFoldersFeature = void 0;
8238 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8239 const WorkspaceFoldersFeature = (Base) => {
8240 return class extends Base {
8241 initialize(capabilities) {
8242 let workspaceCapabilities = capabilities.workspace;
8243 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
8244 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
8245 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
8246 this._onDidChangeWorkspaceFolders.fire(params.event);
8250 getWorkspaceFolders() {
8251 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
8253 get onDidChangeWorkspaceFolders() {
8254 if (!this._onDidChangeWorkspaceFolders) {
8255 throw new Error('Client doesn\'t support sending workspace folder change events.');
8257 if (!this._unregistration) {
8258 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
8260 return this._onDidChangeWorkspaceFolders.event;
8264 exports.WorkspaceFoldersFeature = WorkspaceFoldersFeature;
8265 //# sourceMappingURL=workspaceFolders.js.map
8269 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8271 /* --------------------------------------------------------------------------------------------
8272 * Copyright (c) Microsoft Corporation. All rights reserved.
8273 * Licensed under the MIT License. See License.txt in the project root for license information.
8274 * ------------------------------------------------------------------------------------------ */
8276 Object.defineProperty(exports, "__esModule", ({ value: true }));
8277 exports.CallHierarchyFeature = void 0;
8278 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8279 const CallHierarchyFeature = (Base) => {
8280 return class extends Base {
8281 get callHierarchy() {
8283 onPrepare: (handler) => {
8284 this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => {
8285 return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
8288 onIncomingCalls: (handler) => {
8289 const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type;
8290 this.connection.onRequest(type, (params, cancel) => {
8291 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
8294 onOutgoingCalls: (handler) => {
8295 const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type;
8296 this.connection.onRequest(type, (params, cancel) => {
8297 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
8304 exports.CallHierarchyFeature = CallHierarchyFeature;
8305 //# sourceMappingURL=callHierarchy.js.map
8309 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8312 /* --------------------------------------------------------------------------------------------
8313 * Copyright (c) Microsoft Corporation. All rights reserved.
8314 * Licensed under the MIT License. See License.txt in the project root for license information.
8315 * ------------------------------------------------------------------------------------------ */
8316 Object.defineProperty(exports, "__esModule", ({ value: true }));
8317 exports.SemanticTokensBuilder = exports.SemanticTokensFeature = void 0;
8318 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8319 const SemanticTokensFeature = (Base) => {
8320 return class extends Base {
8321 get semanticTokens() {
8324 const type = vscode_languageserver_protocol_1.SemanticTokensRequest.type;
8325 this.connection.onRequest(type, (params, cancel) => {
8326 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
8329 onDelta: (handler) => {
8330 const type = vscode_languageserver_protocol_1.SemanticTokensDeltaRequest.type;
8331 this.connection.onRequest(type, (params, cancel) => {
8332 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
8335 onRange: (handler) => {
8336 const type = vscode_languageserver_protocol_1.SemanticTokensRangeRequest.type;
8337 this.connection.onRequest(type, (params, cancel) => {
8338 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
8345 exports.SemanticTokensFeature = SemanticTokensFeature;
8346 class SemanticTokensBuilder {
8348 this._prevData = undefined;
8352 this._id = Date.now();
8358 push(line, char, length, tokenType, tokenModifiers) {
8359 let pushLine = line;
8360 let pushChar = char;
8361 if (this._dataLen > 0) {
8362 pushLine -= this._prevLine;
8363 if (pushLine === 0) {
8364 pushChar -= this._prevChar;
8367 this._data[this._dataLen++] = pushLine;
8368 this._data[this._dataLen++] = pushChar;
8369 this._data[this._dataLen++] = length;
8370 this._data[this._dataLen++] = tokenType;
8371 this._data[this._dataLen++] = tokenModifiers;
8372 this._prevLine = line;
8373 this._prevChar = char;
8376 return this._id.toString();
8378 previousResult(id) {
8379 if (this.id === id) {
8380 this._prevData = this._data;
8385 this._prevData = undefined;
8392 return this._prevData !== undefined;
8395 if (this._prevData !== undefined) {
8396 const prevDataLength = this._prevData.length;
8397 const dataLength = this._data.length;
8399 while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) {
8402 if (startIndex < dataLength && startIndex < prevDataLength) {
8405 while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) {
8408 const newData = this._data.slice(startIndex, dataLength - endIndex);
8412 { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData }
8417 else if (startIndex < dataLength) {
8418 return { resultId: this.id, edits: [
8419 { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) }
8422 else if (startIndex < prevDataLength) {
8423 return { resultId: this.id, edits: [
8424 { start: startIndex, deleteCount: prevDataLength - startIndex }
8428 return { resultId: this.id, edits: [] };
8432 return this.build();
8436 exports.SemanticTokensBuilder = SemanticTokensBuilder;
8437 //# sourceMappingURL=semanticTokens.js.map
8441 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8444 /* --------------------------------------------------------------------------------------------
8445 * Copyright (c) Microsoft Corporation. All rights reserved.
8446 * Licensed under the MIT License. See License.txt in the project root for license information.
8447 * ------------------------------------------------------------------------------------------ */
8448 Object.defineProperty(exports, "__esModule", ({ value: true }));
8449 exports.ShowDocumentFeature = void 0;
8450 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8451 const ShowDocumentFeature = (Base) => {
8452 return class extends Base {
8453 showDocument(params) {
8454 return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowDocumentRequest.type, params);
8458 exports.ShowDocumentFeature = ShowDocumentFeature;
8459 //# sourceMappingURL=showDocument.js.map
8463 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8466 /* --------------------------------------------------------------------------------------------
8467 * Copyright (c) Microsoft Corporation. All rights reserved.
8468 * Licensed under the MIT License. See License.txt in the project root for license information.
8469 * ------------------------------------------------------------------------------------------ */
8470 Object.defineProperty(exports, "__esModule", ({ value: true }));
8471 exports.FileOperationsFeature = void 0;
8472 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8473 const FileOperationsFeature = (Base) => {
8474 return class extends Base {
8475 onDidCreateFiles(handler) {
8476 this.connection.onNotification(vscode_languageserver_protocol_1.DidCreateFilesNotification.type, (params) => {
8480 onDidRenameFiles(handler) {
8481 this.connection.onNotification(vscode_languageserver_protocol_1.DidRenameFilesNotification.type, (params) => {
8485 onDidDeleteFiles(handler) {
8486 this.connection.onNotification(vscode_languageserver_protocol_1.DidDeleteFilesNotification.type, (params) => {
8490 onWillCreateFiles(handler) {
8491 return this.connection.onRequest(vscode_languageserver_protocol_1.WillCreateFilesRequest.type, (params, cancel) => {
8492 return handler(params, cancel);
8495 onWillRenameFiles(handler) {
8496 return this.connection.onRequest(vscode_languageserver_protocol_1.WillRenameFilesRequest.type, (params, cancel) => {
8497 return handler(params, cancel);
8500 onWillDeleteFiles(handler) {
8501 return this.connection.onRequest(vscode_languageserver_protocol_1.WillDeleteFilesRequest.type, (params, cancel) => {
8502 return handler(params, cancel);
8507 exports.FileOperationsFeature = FileOperationsFeature;
8508 //# sourceMappingURL=fileOperations.js.map
8512 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8515 /* --------------------------------------------------------------------------------------------
8516 * Copyright (c) Microsoft Corporation. All rights reserved.
8517 * Licensed under the MIT License. See License.txt in the project root for license information.
8518 * ------------------------------------------------------------------------------------------ */
8519 Object.defineProperty(exports, "__esModule", ({ value: true }));
8520 exports.LinkedEditingRangeFeature = void 0;
8521 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8522 const LinkedEditingRangeFeature = (Base) => {
8523 return class extends Base {
8524 onLinkedEditingRange(handler) {
8525 this.connection.onRequest(vscode_languageserver_protocol_1.LinkedEditingRangeRequest.type, (params, cancel) => {
8526 return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
8531 exports.LinkedEditingRangeFeature = LinkedEditingRangeFeature;
8532 //# sourceMappingURL=linkedEditingRange.js.map
8536 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8538 /* --------------------------------------------------------------------------------------------
8539 * Copyright (c) Microsoft Corporation. All rights reserved.
8540 * Licensed under the MIT License. See License.txt in the project root for license information.
8541 * ------------------------------------------------------------------------------------------ */
8543 Object.defineProperty(exports, "__esModule", ({ value: true }));
8544 exports.MonikerFeature = void 0;
8545 const vscode_languageserver_protocol_1 = __webpack_require__(4);
8546 const MonikerFeature = (Base) => {
8547 return class extends Base {
8551 const type = vscode_languageserver_protocol_1.MonikerRequest.type;
8552 this.connection.onRequest(type, (params, cancel) => {
8553 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
8560 exports.MonikerFeature = MonikerFeature;
8561 //# sourceMappingURL=moniker.js.map
8565 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8568 /* --------------------------------------------------------------------------------------------
8569 * Copyright (c) Microsoft Corporation. All rights reserved.
8570 * Licensed under the MIT License. See License.txt in the project root for license information.
8571 * ------------------------------------------------------------------------------------------ */
8572 Object.defineProperty(exports, "__esModule", ({ value: true }));
8573 exports.resolveModulePath = exports.FileSystem = exports.resolveGlobalYarnPath = exports.resolveGlobalNodePath = exports.resolve = exports.uriToFilePath = void 0;
8574 const url = __webpack_require__(63);
8575 const path = __webpack_require__(3);
8576 const fs = __webpack_require__(64);
8577 const child_process_1 = __webpack_require__(65);
8579 * @deprecated Use the `vscode-uri` npm module which provides a more
8580 * complete implementation of handling VS Code URIs.
8582 function uriToFilePath(uri) {
8583 let parsed = url.parse(uri);
8584 if (parsed.protocol !== 'file:' || !parsed.path) {
8587 let segments = parsed.path.split('/');
8588 for (var i = 0, len = segments.length; i < len; i++) {
8589 segments[i] = decodeURIComponent(segments[i]);
8591 if (process.platform === 'win32' && segments.length > 1) {
8592 let first = segments[0];
8593 let second = segments[1];
8594 // Do we have a drive letter and we started with a / which is the
8595 // case if the first segement is empty (see split above)
8596 if (first.length === 0 && second.length > 1 && second[1] === ':') {
8597 // Remove first slash
8601 return path.normalize(segments.join('/'));
8603 exports.uriToFilePath = uriToFilePath;
8604 function isWindows() {
8605 return process.platform === 'win32';
8607 function resolve(moduleName, nodePath, cwd, tracer) {
8608 const nodePathKey = 'NODE_PATH';
8611 'p.on(\'message\',function(m){',
8615 'else if(m.c===\'rs\'){',
8617 'var r=require.resolve(m.a);',
8618 'p.send({c:\'r\',s:true,r:r});',
8621 'p.send({c:\'r\',s:false});',
8626 return new Promise((resolve, reject) => {
8627 let env = process.env;
8628 let newEnv = Object.create(null);
8629 Object.keys(env).forEach(key => newEnv[key] = env[key]);
8630 if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {
8631 if (newEnv[nodePathKey]) {
8632 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
8635 newEnv[nodePathKey] = nodePath;
8638 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
8641 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
8643 let cp = child_process_1.fork('', [], {
8646 execArgv: ['-e', app]
8648 if (cp.pid === void 0) {
8649 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
8652 cp.on('error', (error) => {
8655 cp.on('message', (message) => {
8656 if (message.c === 'r') {
8657 cp.send({ c: 'e' });
8662 reject(new Error(`Failed to resolve module: ${moduleName}`));
8677 exports.resolve = resolve;
8679 * Resolve the global npm package path.
8680 * @deprecated Since this depends on the used package manager and their version the best is that servers
8681 * implement this themselves since they know best what kind of package managers to support.
8682 * @param tracer the tracer to use
8684 function resolveGlobalNodePath(tracer) {
8685 let npmCommand = 'npm';
8686 const env = Object.create(null);
8687 Object.keys(process.env).forEach(key => env[key] = process.env[key]);
8688 env['NO_UPDATE_NOTIFIER'] = 'true';
8694 npmCommand = 'npm.cmd';
8695 options.shell = true;
8697 let handler = () => { };
8699 process.on('SIGPIPE', handler);
8700 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
8703 tracer(`'npm config get prefix' didn't return a value.`);
8707 let prefix = stdout.trim();
8709 tracer(`'npm config get prefix' value is: ${prefix}`);
8711 if (prefix.length > 0) {
8713 return path.join(prefix, 'node_modules');
8716 return path.join(prefix, 'lib', 'node_modules');
8725 process.removeListener('SIGPIPE', handler);
8728 exports.resolveGlobalNodePath = resolveGlobalNodePath;
8730 * Resolve the global yarn pakage path.
8731 * @deprecated Since this depends on the used package manager and their version the best is that servers
8732 * implement this themselves since they know best what kind of package managers to support.
8733 * @param tracer the tracer to use
8735 function resolveGlobalYarnPath(tracer) {
8736 let yarnCommand = 'yarn';
8741 yarnCommand = 'yarn.cmd';
8742 options.shell = true;
8744 let handler = () => { };
8746 process.on('SIGPIPE', handler);
8747 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
8748 let stdout = results.stdout;
8751 tracer(`'yarn global dir' didn't return a value.`);
8752 if (results.stderr) {
8753 tracer(results.stderr);
8758 let lines = stdout.trim().split(/\r?\n/);
8759 for (let line of lines) {
8761 let yarn = JSON.parse(line);
8762 if (yarn.type === 'log') {
8763 return path.join(yarn.data, 'node_modules');
8767 // Do nothing. Ignore the line
8776 process.removeListener('SIGPIPE', handler);
8779 exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
8781 (function (FileSystem) {
8782 let _isCaseSensitive = undefined;
8783 function isCaseSensitive() {
8784 if (_isCaseSensitive !== void 0) {
8785 return _isCaseSensitive;
8787 if (process.platform === 'win32') {
8788 _isCaseSensitive = false;
8791 // convert current file name to upper case / lower case and check if file exists
8792 // (guards against cases when name is already all uppercase or lowercase)
8793 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
8795 return _isCaseSensitive;
8797 FileSystem.isCaseSensitive = isCaseSensitive;
8798 function isParent(parent, child) {
8799 if (isCaseSensitive()) {
8800 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
8803 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
8806 FileSystem.isParent = isParent;
8807 })(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
8808 function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
8810 if (!path.isAbsolute(nodePath)) {
8811 nodePath = path.join(workspaceRoot, nodePath);
8813 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
8814 if (FileSystem.isParent(nodePath, value)) {
8818 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
8820 }).then(undefined, (_error) => {
8821 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
8825 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
8828 exports.resolveModulePath = resolveModulePath;
8829 //# sourceMappingURL=files.js.map
8833 /***/ ((module) => {
8835 module.exports = require("url");;
8839 /***/ ((module) => {
8841 module.exports = require("fs");;
8845 /***/ ((module) => {
8847 module.exports = require("child_process");;
8851 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8853 /* --------------------------------------------------------------------------------------------
8854 * Copyright (c) Microsoft Corporation. All rights reserved.
8855 * Licensed under the MIT License. See License.txt in the project root for license information.
8856 * ----------------------------------------------------------------------------------------- */
8859 module.exports = __webpack_require__(4);
8863 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8866 /* --------------------------------------------------------------------------------------------
8867 * Copyright (c) Microsoft Corporation. All rights reserved.
8868 * Licensed under the MIT License. See License.txt in the project root for license information.
8869 * ------------------------------------------------------------------------------------------ */
8870 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8871 if (k2 === undefined) k2 = k;
8872 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
8873 }) : (function(o, m, k, k2) {
8874 if (k2 === undefined) k2 = k;
8877 var __exportStar = (this && this.__exportStar) || function(m, exports) {
8878 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
8880 Object.defineProperty(exports, "__esModule", ({ value: true }));
8881 exports.ProposedFeatures = exports.SemanticTokensBuilder = void 0;
8882 const semanticTokens_1 = __webpack_require__(57);
8883 Object.defineProperty(exports, "SemanticTokensBuilder", ({ enumerable: true, get: function () { return semanticTokens_1.SemanticTokensBuilder; } }));
8884 __exportStar(__webpack_require__(4), exports);
8885 __exportStar(__webpack_require__(51), exports);
8886 var ProposedFeatures;
8887 (function (ProposedFeatures) {
8888 ProposedFeatures.all = {
8891 })(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
8892 //# sourceMappingURL=api.js.map
8896 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8899 /*---------------------------------------------------------------------------------------------
8900 * Copyright (c) Microsoft Corporation. All rights reserved.
8901 * Licensed under the MIT License. See License.txt in the project root for license information.
8902 *--------------------------------------------------------------------------------------------*/
8903 Object.defineProperty(exports, "__esModule", ({ value: true }));
8904 exports.runSafe = exports.formatError = void 0;
8905 const vscode_languageserver_1 = __webpack_require__(49);
8906 function formatError(message, err) {
8907 if (err instanceof Error) {
8909 return `${message}: ${error.message}\n${error.stack}`;
8911 else if (typeof err === 'string') {
8912 return `${message}: ${err}`;
8915 return `${message}: ${err.toString()}`;
8919 exports.formatError = formatError;
8920 function runSafe(func, errorVal, errorMessage, token) {
8921 return new Promise((resolve) => {
8922 setImmediate(() => {
8923 if (token.isCancellationRequested) {
8924 resolve(cancelValue());
8926 return func().then(result => {
8927 if (token.isCancellationRequested) {
8928 resolve(cancelValue());
8935 console.error(formatError(errorMessage, e));
8941 exports.runSafe = runSafe;
8942 function cancelValue() {
8943 return new vscode_languageserver_1.ResponseError(vscode_languageserver_1.LSPErrorCodes.RequestCancelled, 'Request cancelled');
8949 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8952 /*---------------------------------------------------------------------------------------------
8953 * Copyright (c) Microsoft Corporation. All rights reserved.
8954 * Licensed under the MIT License. See License.txt in the project root for license information.
8955 *--------------------------------------------------------------------------------------------*/
8956 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8957 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8958 return new (P || (P = Promise))(function (resolve, reject) {
8959 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8960 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8961 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8962 step((generator = generator.apply(thisArg, _arguments || [])).next());
8965 Object.defineProperty(exports, "__esModule", ({ value: true }));
8966 exports.startServer = void 0;
8967 const vscode_languageserver_1 = __webpack_require__(49);
8968 const languageModes_1 = __webpack_require__(70);
8969 const formatting_1 = __webpack_require__(154);
8970 const arrays_1 = __webpack_require__(155);
8971 const documentContext_1 = __webpack_require__(156);
8972 const vscode_uri_1 = __webpack_require__(135);
8973 const runner_1 = __webpack_require__(68);
8974 const htmlFolding_1 = __webpack_require__(158);
8975 const customData_1 = __webpack_require__(159);
8976 const selectionRanges_1 = __webpack_require__(160);
8977 const semanticTokens_1 = __webpack_require__(162);
8978 const requests_1 = __webpack_require__(157);
8979 var CustomDataChangedNotification;
8980 (function (CustomDataChangedNotification) {
8981 CustomDataChangedNotification.type = new vscode_languageserver_1.NotificationType('html/customDataChanged');
8982 })(CustomDataChangedNotification || (CustomDataChangedNotification = {}));
8983 var TagCloseRequest;
8984 (function (TagCloseRequest) {
8985 TagCloseRequest.type = new vscode_languageserver_1.RequestType('html/tag');
8986 })(TagCloseRequest || (TagCloseRequest = {}));
8987 var SemanticTokenRequest;
8988 (function (SemanticTokenRequest) {
8989 SemanticTokenRequest.type = new vscode_languageserver_1.RequestType('html/semanticTokens');
8990 })(SemanticTokenRequest || (SemanticTokenRequest = {}));
8991 var SemanticTokenLegendRequest;
8992 (function (SemanticTokenLegendRequest) {
8993 SemanticTokenLegendRequest.type = new vscode_languageserver_1.RequestType0('html/semanticTokenLegend');
8994 })(SemanticTokenLegendRequest || (SemanticTokenLegendRequest = {}));
8995 function startServer(connection, runtime) {
8996 // Create a text document manager.
8997 const documents = new vscode_languageserver_1.TextDocuments(languageModes_1.TextDocument);
8998 // Make the text document manager listen on the connection
8999 // for open, change and close text document events
9000 documents.listen(connection);
9001 let workspaceFolders = [];
9003 let clientSnippetSupport = false;
9004 let dynamicFormatterRegistration = false;
9005 let scopedSettingsSupport = false;
9006 let workspaceFoldersSupport = false;
9007 let foldingRangeLimit = Number.MAX_VALUE;
9008 const notReady = () => Promise.reject('Not Ready');
9009 let requestService = { getContent: notReady, stat: notReady, readDirectory: notReady };
9010 let globalSettings = {};
9011 let documentSettings = {};
9012 // remove document settings on close
9013 documents.onDidClose(e => {
9014 delete documentSettings[e.document.uri];
9016 function getDocumentSettings(textDocument, needsDocumentSettings) {
9017 if (scopedSettingsSupport && needsDocumentSettings()) {
9018 let promise = documentSettings[textDocument.uri];
9020 const scopeUri = textDocument.uri;
9021 const configRequestParam = { items: [{ scopeUri, section: 'css' }, { scopeUri, section: 'html' }, { scopeUri, section: 'javascript' }] };
9022 promise = connection.sendRequest(vscode_languageserver_1.ConfigurationRequest.type, configRequestParam).then(s => ({ css: s[0], html: s[1], javascript: s[2] }));
9023 documentSettings[textDocument.uri] = promise;
9027 return Promise.resolve(undefined);
9029 // After the server has started the client sends an initialize request. The server receives
9030 // in the passed params the rootPath of the workspace plus the client capabilities
9031 connection.onInitialize((params) => {
9032 const initializationOptions = params.initializationOptions;
9033 workspaceFolders = params.workspaceFolders;
9034 if (!Array.isArray(workspaceFolders)) {
9035 workspaceFolders = [];
9036 if (params.rootPath) {
9037 workspaceFolders.push({ name: '', uri: vscode_uri_1.URI.file(params.rootPath).toString() });
9040 requestService = requests_1.getRequestService((initializationOptions === null || initializationOptions === void 0 ? void 0 : initializationOptions.handledSchemas) || ['file'], connection, runtime);
9042 get settings() { return globalSettings; },
9043 get folders() { return workspaceFolders; }
9045 languageModes = languageModes_1.getLanguageModes((initializationOptions === null || initializationOptions === void 0 ? void 0 : initializationOptions.embeddedLanguages) || { css: true, javascript: true }, workspace, params.capabilities, requestService);
9046 const dataPaths = (initializationOptions === null || initializationOptions === void 0 ? void 0 : initializationOptions.dataPaths) || [];
9047 customData_1.fetchHTMLDataProviders(dataPaths, requestService).then(dataProviders => {
9048 languageModes.updateDataProviders(dataProviders);
9050 documents.onDidClose(e => {
9051 languageModes.onDocumentRemoved(e.document);
9053 connection.onShutdown(() => {
9054 languageModes.dispose();
9056 function getClientCapability(name, def) {
9057 const keys = name.split('.');
9058 let c = params.capabilities;
9059 for (let i = 0; c && i < keys.length; i++) {
9060 if (!c.hasOwnProperty(keys[i])) {
9067 clientSnippetSupport = getClientCapability('textDocument.completion.completionItem.snippetSupport', false);
9068 dynamicFormatterRegistration = getClientCapability('textDocument.rangeFormatting.dynamicRegistration', false) && (typeof (initializationOptions === null || initializationOptions === void 0 ? void 0 : initializationOptions.provideFormatter) !== 'boolean');
9069 scopedSettingsSupport = getClientCapability('workspace.configuration', false);
9070 workspaceFoldersSupport = getClientCapability('workspace.workspaceFolders', false);
9071 foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
9072 const capabilities = {
9073 textDocumentSync: vscode_languageserver_1.TextDocumentSyncKind.Incremental,
9074 completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['.', ':', '<', '"', '=', '/'] } : undefined,
9075 hoverProvider: true,
9076 documentHighlightProvider: true,
9077 documentRangeFormattingProvider: (initializationOptions === null || initializationOptions === void 0 ? void 0 : initializationOptions.provideFormatter) === true,
9078 documentLinkProvider: { resolveProvider: false },
9079 documentSymbolProvider: true,
9080 definitionProvider: true,
9081 signatureHelpProvider: { triggerCharacters: ['('] },
9082 referencesProvider: true,
9084 foldingRangeProvider: true,
9085 selectionRangeProvider: true,
9086 renameProvider: true,
9087 linkedEditingRangeProvider: true
9089 return { capabilities };
9091 connection.onInitialized(() => {
9092 if (workspaceFoldersSupport) {
9093 connection.client.register(vscode_languageserver_1.DidChangeWorkspaceFoldersNotification.type);
9094 connection.onNotification(vscode_languageserver_1.DidChangeWorkspaceFoldersNotification.type, e => {
9095 const toAdd = e.event.added;
9096 const toRemove = e.event.removed;
9097 const updatedFolders = [];
9098 if (workspaceFolders) {
9099 for (const folder of workspaceFolders) {
9100 if (!toRemove.some(r => r.uri === folder.uri) && !toAdd.some(r => r.uri === folder.uri)) {
9101 updatedFolders.push(folder);
9105 workspaceFolders = updatedFolders.concat(toAdd);
9106 documents.all().forEach(triggerValidation);
9110 let formatterRegistration = null;
9111 // The settings have changed. Is send on server activation as well.
9112 connection.onDidChangeConfiguration((change) => {
9113 globalSettings = change.settings;
9114 documentSettings = {}; // reset all document settings
9115 documents.all().forEach(triggerValidation);
9116 // dynamically enable & disable the formatter
9117 if (dynamicFormatterRegistration) {
9118 const enableFormatter = globalSettings && globalSettings.html && globalSettings.html.format && globalSettings.html.format.enable;
9119 if (enableFormatter) {
9120 if (!formatterRegistration) {
9121 const documentSelector = [{ language: 'html' }, { language: 'handlebars' }];
9122 formatterRegistration = connection.client.register(vscode_languageserver_1.DocumentRangeFormattingRequest.type, { documentSelector });
9125 else if (formatterRegistration) {
9126 formatterRegistration.then(r => r.dispose());
9127 formatterRegistration = null;
9131 const pendingValidationRequests = {};
9132 const validationDelayMs = 500;
9133 // The content of a text document has changed. This event is emitted
9134 // when the text document first opened or when its content has changed.
9135 documents.onDidChangeContent(change => {
9136 triggerValidation(change.document);
9138 // a document has closed: clear all diagnostics
9139 documents.onDidClose(event => {
9140 cleanPendingValidation(event.document);
9141 connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
9143 function cleanPendingValidation(textDocument) {
9144 const request = pendingValidationRequests[textDocument.uri];
9146 clearTimeout(request);
9147 delete pendingValidationRequests[textDocument.uri];
9150 function triggerValidation(textDocument) {
9151 cleanPendingValidation(textDocument);
9152 pendingValidationRequests[textDocument.uri] = setTimeout(() => {
9153 delete pendingValidationRequests[textDocument.uri];
9154 validateTextDocument(textDocument);
9155 }, validationDelayMs);
9157 function isValidationEnabled(languageId, settings = globalSettings) {
9158 const validationSettings = settings && settings.html && settings.html.validate;
9159 if (validationSettings) {
9160 return languageId === 'css' && validationSettings.styles !== false || languageId === 'javascript' && validationSettings.scripts !== false;
9164 function validateTextDocument(textDocument) {
9165 return __awaiter(this, void 0, void 0, function* () {
9167 const version = textDocument.version;
9168 const diagnostics = [];
9169 if (textDocument.languageId === 'html') {
9170 const modes = languageModes.getAllModesInDocument(textDocument);
9171 const settings = yield getDocumentSettings(textDocument, () => modes.some(m => !!m.doValidation));
9172 const latestTextDocument = documents.get(textDocument.uri);
9173 if (latestTextDocument && latestTextDocument.version === version) { // check no new version has come in after in after the async op
9174 for (const mode of modes) {
9175 if (mode.doValidation && isValidationEnabled(mode.getId(), settings)) {
9176 arrays_1.pushAll(diagnostics, yield mode.doValidation(latestTextDocument, settings));
9179 connection.sendDiagnostics({ uri: latestTextDocument.uri, diagnostics });
9184 connection.console.error(runner_1.formatError(`Error while validating ${textDocument.uri}`, e));
9188 connection.onCompletion((textDocumentPosition, token) => __awaiter(this, void 0, void 0, function* () {
9189 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9190 const document = documents.get(textDocumentPosition.textDocument.uri);
9194 const mode = languageModes.getModeAtPosition(document, textDocumentPosition.position);
9195 if (!mode || !mode.doComplete) {
9196 return { isIncomplete: true, items: [] };
9198 const doComplete = mode.doComplete;
9199 if (mode.getId() !== 'html') {
9201 "html.embbedded.complete" : {
9202 "languageId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
9205 connection.telemetry.logEvent({ key: 'html.embbedded.complete', value: { languageId: mode.getId() } });
9207 const settings = yield getDocumentSettings(document, () => doComplete.length > 2);
9208 const documentContext = documentContext_1.getDocumentContext(document.uri, workspaceFolders);
9209 return doComplete(document, textDocumentPosition.position, documentContext, settings);
9210 }), null, `Error while computing completions for ${textDocumentPosition.textDocument.uri}`, token);
9212 connection.onCompletionResolve((item, token) => {
9213 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9214 const data = item.data;
9215 if (data && data.languageId && data.uri) {
9216 const mode = languageModes.getMode(data.languageId);
9217 const document = documents.get(data.uri);
9218 if (mode && mode.doResolve && document) {
9219 return mode.doResolve(document, item);
9223 }), item, `Error while resolving completion proposal`, token);
9225 connection.onHover((textDocumentPosition, token) => {
9226 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9227 const document = documents.get(textDocumentPosition.textDocument.uri);
9229 const mode = languageModes.getModeAtPosition(document, textDocumentPosition.position);
9230 const doHover = mode === null || mode === void 0 ? void 0 : mode.doHover;
9232 const settings = yield getDocumentSettings(document, () => doHover.length > 2);
9233 return doHover(document, textDocumentPosition.position, settings);
9237 }), null, `Error while computing hover for ${textDocumentPosition.textDocument.uri}`, token);
9239 connection.onDocumentHighlight((documentHighlightParams, token) => {
9240 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9241 const document = documents.get(documentHighlightParams.textDocument.uri);
9243 const mode = languageModes.getModeAtPosition(document, documentHighlightParams.position);
9244 if (mode && mode.findDocumentHighlight) {
9245 return mode.findDocumentHighlight(document, documentHighlightParams.position);
9249 }), [], `Error while computing document highlights for ${documentHighlightParams.textDocument.uri}`, token);
9251 connection.onDefinition((definitionParams, token) => {
9252 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9253 const document = documents.get(definitionParams.textDocument.uri);
9255 const mode = languageModes.getModeAtPosition(document, definitionParams.position);
9256 if (mode && mode.findDefinition) {
9257 return mode.findDefinition(document, definitionParams.position);
9261 }), null, `Error while computing definitions for ${definitionParams.textDocument.uri}`, token);
9263 connection.onReferences((referenceParams, token) => {
9264 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9265 const document = documents.get(referenceParams.textDocument.uri);
9267 const mode = languageModes.getModeAtPosition(document, referenceParams.position);
9268 if (mode && mode.findReferences) {
9269 return mode.findReferences(document, referenceParams.position);
9273 }), [], `Error while computing references for ${referenceParams.textDocument.uri}`, token);
9275 connection.onSignatureHelp((signatureHelpParms, token) => {
9276 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9277 const document = documents.get(signatureHelpParms.textDocument.uri);
9279 const mode = languageModes.getModeAtPosition(document, signatureHelpParms.position);
9280 if (mode && mode.doSignatureHelp) {
9281 return mode.doSignatureHelp(document, signatureHelpParms.position);
9285 }), null, `Error while computing signature help for ${signatureHelpParms.textDocument.uri}`, token);
9287 connection.onDocumentRangeFormatting((formatParams, token) => __awaiter(this, void 0, void 0, function* () {
9288 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9289 const document = documents.get(formatParams.textDocument.uri);
9291 let settings = yield getDocumentSettings(document, () => true);
9293 settings = globalSettings;
9295 const unformattedTags = settings && settings.html && settings.html.format && settings.html.format.unformatted || '';
9296 const enabledModes = { css: !unformattedTags.match(/\bstyle\b/), javascript: !unformattedTags.match(/\bscript\b/) };
9297 return formatting_1.format(languageModes, document, formatParams.range, formatParams.options, settings, enabledModes);
9300 }), [], `Error while formatting range for ${formatParams.textDocument.uri}`, token);
9302 connection.onDocumentLinks((documentLinkParam, token) => {
9303 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9304 const document = documents.get(documentLinkParam.textDocument.uri);
9307 const documentContext = documentContext_1.getDocumentContext(document.uri, workspaceFolders);
9308 for (const m of languageModes.getAllModesInDocument(document)) {
9309 if (m.findDocumentLinks) {
9310 arrays_1.pushAll(links, yield m.findDocumentLinks(document, documentContext));
9315 }), [], `Error while document links for ${documentLinkParam.textDocument.uri}`, token);
9317 connection.onDocumentSymbol((documentSymbolParms, token) => {
9318 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9319 const document = documents.get(documentSymbolParms.textDocument.uri);
9322 for (const m of languageModes.getAllModesInDocument(document)) {
9323 if (m.findDocumentSymbols) {
9324 arrays_1.pushAll(symbols, yield m.findDocumentSymbols(document));
9329 }), [], `Error while computing document symbols for ${documentSymbolParms.textDocument.uri}`, token);
9331 connection.onRequest(vscode_languageserver_1.DocumentColorRequest.type, (params, token) => {
9332 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9334 const document = documents.get(params.textDocument.uri);
9336 for (const m of languageModes.getAllModesInDocument(document)) {
9337 if (m.findDocumentColors) {
9338 arrays_1.pushAll(infos, yield m.findDocumentColors(document));
9343 }), [], `Error while computing document colors for ${params.textDocument.uri}`, token);
9345 connection.onRequest(vscode_languageserver_1.ColorPresentationRequest.type, (params, token) => {
9346 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9347 const document = documents.get(params.textDocument.uri);
9349 const mode = languageModes.getModeAtPosition(document, params.range.start);
9350 if (mode && mode.getColorPresentations) {
9351 return mode.getColorPresentations(document, params.color, params.range);
9355 }), [], `Error while computing color presentations for ${params.textDocument.uri}`, token);
9357 connection.onRequest(TagCloseRequest.type, (params, token) => {
9358 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9359 const document = documents.get(params.textDocument.uri);
9361 const pos = params.position;
9362 if (pos.character > 0) {
9363 const mode = languageModes.getModeAtPosition(document, languageModes_1.Position.create(pos.line, pos.character - 1));
9364 if (mode && mode.doAutoClose) {
9365 return mode.doAutoClose(document, pos);
9370 }), null, `Error while computing tag close actions for ${params.textDocument.uri}`, token);
9372 connection.onFoldingRanges((params, token) => {
9373 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9374 const document = documents.get(params.textDocument.uri);
9376 return htmlFolding_1.getFoldingRanges(languageModes, document, foldingRangeLimit, token);
9379 }), null, `Error while computing folding regions for ${params.textDocument.uri}`, token);
9381 connection.onSelectionRanges((params, token) => {
9382 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9383 const document = documents.get(params.textDocument.uri);
9385 return selectionRanges_1.getSelectionRanges(languageModes, document, params.positions);
9388 }), [], `Error while computing selection ranges for ${params.textDocument.uri}`, token);
9390 connection.onRenameRequest((params, token) => {
9391 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9392 const document = documents.get(params.textDocument.uri);
9393 const position = params.position;
9395 const mode = languageModes.getModeAtPosition(document, params.position);
9396 if (mode && mode.doRename) {
9397 return mode.doRename(document, position, params.newName);
9401 }), null, `Error while computing rename for ${params.textDocument.uri}`, token);
9403 connection.languages.onLinkedEditingRange((params, token) => {
9404 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9405 const document = documents.get(params.textDocument.uri);
9407 const pos = params.position;
9408 if (pos.character > 0) {
9409 const mode = languageModes.getModeAtPosition(document, languageModes_1.Position.create(pos.line, pos.character - 1));
9410 if (mode && mode.doLinkedEditing) {
9411 const ranges = yield mode.doLinkedEditing(document, pos);
9419 }), null, `Error while computing synced regions for ${params.textDocument.uri}`, token);
9421 let semanticTokensProvider;
9422 function getSemanticTokenProvider() {
9423 if (!semanticTokensProvider) {
9424 semanticTokensProvider = semanticTokens_1.newSemanticTokenProvider(languageModes);
9426 return semanticTokensProvider;
9428 connection.onRequest(SemanticTokenRequest.type, (params, token) => {
9429 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9430 const document = documents.get(params.textDocument.uri);
9432 return getSemanticTokenProvider().getSemanticTokens(document, params.ranges);
9435 }), null, `Error while computing semantic tokens for ${params.textDocument.uri}`, token);
9437 connection.onRequest(SemanticTokenLegendRequest.type, token => {
9438 return runner_1.runSafe(() => __awaiter(this, void 0, void 0, function* () {
9439 return getSemanticTokenProvider().legend;
9440 }), null, `Error while computing semantic tokens legend`, token);
9442 connection.onNotification(CustomDataChangedNotification.type, dataPaths => {
9443 customData_1.fetchHTMLDataProviders(dataPaths, requestService).then(dataProviders => {
9444 languageModes.updateDataProviders(dataProviders);
9447 // Listen on the connection
9448 connection.listen();
9450 exports.startServer = startServer;
9455 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9458 /*---------------------------------------------------------------------------------------------
9459 * Copyright (c) Microsoft Corporation. All rights reserved.
9460 * Licensed under the MIT License. See License.txt in the project root for license information.
9461 *--------------------------------------------------------------------------------------------*/
9462 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9463 if (k2 === undefined) k2 = k;
9464 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9465 }) : (function(o, m, k, k2) {
9466 if (k2 === undefined) k2 = k;
9469 var __exportStar = (this && this.__exportStar) || function(m, exports) {
9470 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
9472 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9473 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9474 return new (P || (P = Promise))(function (resolve, reject) {
9475 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
9476 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9477 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9478 step((generator = generator.apply(thisArg, _arguments || [])).next());
9481 Object.defineProperty(exports, "__esModule", ({ value: true }));
9482 exports.getLanguageModes = void 0;
9483 const vscode_css_languageservice_1 = __webpack_require__(71);
9484 const vscode_html_languageservice_1 = __webpack_require__(115);
9485 const languageModelCache_1 = __webpack_require__(145);
9486 const cssMode_1 = __webpack_require__(146);
9487 const embeddedSupport_1 = __webpack_require__(147);
9488 const htmlMode_1 = __webpack_require__(148);
9489 const javascriptMode_1 = __webpack_require__(149);
9490 __exportStar(__webpack_require__(115), exports);
9491 function getLanguageModes(supportedLanguages, workspace, clientCapabilities, requestService) {
9492 const htmlLanguageService = vscode_html_languageservice_1.getLanguageService({ clientCapabilities, fileSystemProvider: requestService });
9493 const cssLanguageService = vscode_css_languageservice_1.getCSSLanguageService({ clientCapabilities, fileSystemProvider: requestService });
9494 let documentRegions = languageModelCache_1.getLanguageModelCache(10, 60, document => embeddedSupport_1.getDocumentRegions(htmlLanguageService, document));
9495 let modelCaches = [];
9496 modelCaches.push(documentRegions);
9497 let modes = Object.create(null);
9498 modes['html'] = htmlMode_1.getHTMLMode(htmlLanguageService, workspace);
9499 if (supportedLanguages['css']) {
9500 modes['css'] = cssMode_1.getCSSMode(cssLanguageService, documentRegions, workspace);
9502 if (supportedLanguages['javascript']) {
9503 modes['javascript'] = javascriptMode_1.getJavaScriptMode(documentRegions, 'javascript', workspace);
9504 modes['typescript'] = javascriptMode_1.getJavaScriptMode(documentRegions, 'typescript', workspace);
9507 updateDataProviders(dataProviders) {
9508 return __awaiter(this, void 0, void 0, function* () {
9509 htmlLanguageService.setDataProviders(true, dataProviders);
9512 getModeAtPosition(document, position) {
9513 let languageId = documentRegions.get(document).getLanguageAtPosition(position);
9515 return modes[languageId];
9519 getModesInRange(document, range) {
9520 return documentRegions.get(document).getLanguageRanges(range).map(r => {
9524 mode: r.languageId && modes[r.languageId],
9525 attributeValue: r.attributeValue
9529 getAllModesInDocument(document) {
9531 for (let languageId of documentRegions.get(document).getLanguagesInDocument()) {
9532 let mode = modes[languageId];
9541 for (let languageId in modes) {
9542 let mode = modes[languageId];
9549 getMode(languageId) {
9550 return modes[languageId];
9552 onDocumentRemoved(document) {
9553 modelCaches.forEach(mc => mc.onDocumentRemoved(document));
9554 for (let mode in modes) {
9555 modes[mode].onDocumentRemoved(document);
9559 modelCaches.forEach(mc => mc.dispose());
9561 for (let mode in modes) {
9562 modes[mode].dispose();
9568 exports.getLanguageModes = getLanguageModes;
9573 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9575 __webpack_require__.r(__webpack_exports__);
9576 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9577 /* harmony export */ "AnnotatedTextEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.AnnotatedTextEdit,
9578 /* harmony export */ "ChangeAnnotation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ChangeAnnotation,
9579 /* harmony export */ "ChangeAnnotationIdentifier": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ChangeAnnotationIdentifier,
9580 /* harmony export */ "ClientCapabilities": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ClientCapabilities,
9581 /* harmony export */ "CodeAction": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeAction,
9582 /* harmony export */ "CodeActionContext": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeActionContext,
9583 /* harmony export */ "CodeActionKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeActionKind,
9584 /* harmony export */ "CodeDescription": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeDescription,
9585 /* harmony export */ "CodeLens": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeLens,
9586 /* harmony export */ "Color": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Color,
9587 /* harmony export */ "ColorInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ColorInformation,
9588 /* harmony export */ "ColorPresentation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ColorPresentation,
9589 /* harmony export */ "Command": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Command,
9590 /* harmony export */ "CompletionItem": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItem,
9591 /* harmony export */ "CompletionItemKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItemKind,
9592 /* harmony export */ "CompletionItemTag": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItemTag,
9593 /* harmony export */ "CompletionList": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionList,
9594 /* harmony export */ "CreateFile": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CreateFile,
9595 /* harmony export */ "DeleteFile": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DeleteFile,
9596 /* harmony export */ "Diagnostic": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Diagnostic,
9597 /* harmony export */ "DiagnosticRelatedInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticRelatedInformation,
9598 /* harmony export */ "DiagnosticSeverity": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticSeverity,
9599 /* harmony export */ "DiagnosticTag": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticTag,
9600 /* harmony export */ "DocumentHighlight": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentHighlight,
9601 /* harmony export */ "DocumentHighlightKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentHighlightKind,
9602 /* harmony export */ "DocumentLink": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentLink,
9603 /* harmony export */ "DocumentSymbol": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentSymbol,
9604 /* harmony export */ "EOL": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.EOL,
9605 /* harmony export */ "FileType": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FileType,
9606 /* harmony export */ "FoldingRange": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FoldingRange,
9607 /* harmony export */ "FoldingRangeKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FoldingRangeKind,
9608 /* harmony export */ "FormattingOptions": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FormattingOptions,
9609 /* harmony export */ "Hover": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Hover,
9610 /* harmony export */ "InsertReplaceEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.InsertReplaceEdit,
9611 /* harmony export */ "InsertTextFormat": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.InsertTextFormat,
9612 /* harmony export */ "InsertTextMode": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.InsertTextMode,
9613 /* harmony export */ "Location": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Location,
9614 /* harmony export */ "LocationLink": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.LocationLink,
9615 /* harmony export */ "MarkedString": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkedString,
9616 /* harmony export */ "MarkupContent": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkupContent,
9617 /* harmony export */ "MarkupKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkupKind,
9618 /* harmony export */ "OptionalVersionedTextDocumentIdentifier": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.OptionalVersionedTextDocumentIdentifier,
9619 /* harmony export */ "ParameterInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ParameterInformation,
9620 /* harmony export */ "Position": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Position,
9621 /* harmony export */ "Range": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Range,
9622 /* harmony export */ "RenameFile": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.RenameFile,
9623 /* harmony export */ "SelectionRange": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SelectionRange,
9624 /* harmony export */ "SignatureInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SignatureInformation,
9625 /* harmony export */ "SymbolInformation": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolInformation,
9626 /* harmony export */ "SymbolKind": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolKind,
9627 /* harmony export */ "SymbolTag": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolTag,
9628 /* harmony export */ "TextDocument": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocument,
9629 /* harmony export */ "TextDocumentEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentEdit,
9630 /* harmony export */ "TextDocumentIdentifier": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentIdentifier,
9631 /* harmony export */ "TextDocumentItem": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentItem,
9632 /* harmony export */ "TextEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextEdit,
9633 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.VersionedTextDocumentIdentifier,
9634 /* harmony export */ "WorkspaceChange": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.WorkspaceChange,
9635 /* harmony export */ "WorkspaceEdit": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.WorkspaceEdit,
9636 /* harmony export */ "integer": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.integer,
9637 /* harmony export */ "uinteger": () => /* reexport safe */ _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.uinteger,
9638 /* harmony export */ "getDefaultCSSDataProvider": () => /* binding */ getDefaultCSSDataProvider,
9639 /* harmony export */ "newCSSDataProvider": () => /* binding */ newCSSDataProvider,
9640 /* harmony export */ "getCSSLanguageService": () => /* binding */ getCSSLanguageService,
9641 /* harmony export */ "getSCSSLanguageService": () => /* binding */ getSCSSLanguageService,
9642 /* harmony export */ "getLESSLanguageService": () => /* binding */ getLESSLanguageService
9643 /* harmony export */ });
9644 /* harmony import */ var _parser_cssParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72);
9645 /* harmony import */ var _services_cssCompletion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85);
9646 /* harmony import */ var _services_cssHover__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94);
9647 /* harmony import */ var _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96);
9648 /* harmony import */ var _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97);
9649 /* harmony import */ var _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99);
9650 /* harmony import */ var _parser_scssParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(102);
9651 /* harmony import */ var _services_scssCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(105);
9652 /* harmony import */ var _parser_lessParser__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(106);
9653 /* harmony import */ var _services_lessCompletion__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(108);
9654 /* harmony import */ var _services_cssFolding__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(109);
9655 /* harmony import */ var _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(110);
9656 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(112);
9657 /* harmony import */ var _services_cssSelectionRange__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(113);
9658 /* harmony import */ var _services_scssNavigation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(114);
9659 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(111);
9660 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(88);
9661 /*---------------------------------------------------------------------------------------------
9662 * Copyright (c) Microsoft Corporation. All rights reserved.
9663 * Licensed under the MIT License. See License.txt in the project root for license information.
9664 *--------------------------------------------------------------------------------------------*/
9683 function getDefaultCSSDataProvider() {
9684 return newCSSDataProvider(_data_webCustomData__WEBPACK_IMPORTED_MODULE_15__.cssData);
9686 function newCSSDataProvider(data) {
9687 return new _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_12__.CSSDataProvider(data);
9689 function createFacade(parser, completion, hover, navigation, codeActions, validation, cssDataManager) {
9691 configure: function (settings) {
9692 validation.configure(settings);
9693 completion.configure(settings);
9695 setDataProviders: cssDataManager.setDataProviders.bind(cssDataManager),
9696 doValidation: validation.doValidation.bind(validation),
9697 parseStylesheet: parser.parseStylesheet.bind(parser),
9698 doComplete: completion.doComplete.bind(completion),
9699 doComplete2: completion.doComplete2.bind(completion),
9700 setCompletionParticipants: completion.setCompletionParticipants.bind(completion),
9701 doHover: hover.doHover.bind(hover),
9702 findDefinition: navigation.findDefinition.bind(navigation),
9703 findReferences: navigation.findReferences.bind(navigation),
9704 findDocumentHighlights: navigation.findDocumentHighlights.bind(navigation),
9705 findDocumentLinks: navigation.findDocumentLinks.bind(navigation),
9706 findDocumentLinks2: navigation.findDocumentLinks2.bind(navigation),
9707 findDocumentSymbols: navigation.findDocumentSymbols.bind(navigation),
9708 doCodeActions: codeActions.doCodeActions.bind(codeActions),
9709 doCodeActions2: codeActions.doCodeActions2.bind(codeActions),
9710 findDocumentColors: navigation.findDocumentColors.bind(navigation),
9711 getColorPresentations: navigation.getColorPresentations.bind(navigation),
9712 doRename: navigation.doRename.bind(navigation),
9713 getFoldingRanges: _services_cssFolding__WEBPACK_IMPORTED_MODULE_10__.getFoldingRanges,
9714 getSelectionRanges: _services_cssSelectionRange__WEBPACK_IMPORTED_MODULE_13__.getSelectionRanges
9717 var defaultLanguageServiceOptions = {};
9718 function getCSSLanguageService(options) {
9719 if (options === void 0) { options = defaultLanguageServiceOptions; }
9720 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__.CSSDataManager(options);
9721 return createFacade(new _parser_cssParser__WEBPACK_IMPORTED_MODULE_0__.Parser(), new _services_cssCompletion__WEBPACK_IMPORTED_MODULE_1__.CSSCompletion(null, options, cssDataManager), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__.CSSHover(options && options.clientCapabilities, cssDataManager), new _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__.CSSNavigation(options && options.fileSystemProvider), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__.CSSCodeActions(cssDataManager), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__.CSSValidation(cssDataManager), cssDataManager);
9723 function getSCSSLanguageService(options) {
9724 if (options === void 0) { options = defaultLanguageServiceOptions; }
9725 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__.CSSDataManager(options);
9726 return createFacade(new _parser_scssParser__WEBPACK_IMPORTED_MODULE_6__.SCSSParser(), new _services_scssCompletion__WEBPACK_IMPORTED_MODULE_7__.SCSSCompletion(options, cssDataManager), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__.CSSHover(options && options.clientCapabilities, cssDataManager), new _services_scssNavigation__WEBPACK_IMPORTED_MODULE_14__.SCSSNavigation(options && options.fileSystemProvider), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__.CSSCodeActions(cssDataManager), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__.CSSValidation(cssDataManager), cssDataManager);
9728 function getLESSLanguageService(options) {
9729 if (options === void 0) { options = defaultLanguageServiceOptions; }
9730 var cssDataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_11__.CSSDataManager(options);
9731 return createFacade(new _parser_lessParser__WEBPACK_IMPORTED_MODULE_8__.LESSParser(), new _services_lessCompletion__WEBPACK_IMPORTED_MODULE_9__.LESSCompletion(options, cssDataManager), new _services_cssHover__WEBPACK_IMPORTED_MODULE_2__.CSSHover(options && options.clientCapabilities, cssDataManager), new _services_cssNavigation__WEBPACK_IMPORTED_MODULE_3__.CSSNavigation(options && options.fileSystemProvider), new _services_cssCodeActions__WEBPACK_IMPORTED_MODULE_4__.CSSCodeActions(cssDataManager), new _services_cssValidation__WEBPACK_IMPORTED_MODULE_5__.CSSValidation(cssDataManager), cssDataManager);
9737 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9739 __webpack_require__.r(__webpack_exports__);
9740 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9741 /* harmony export */ "Parser": () => /* binding */ Parser
9742 /* harmony export */ });
9743 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
9744 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
9745 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(76);
9746 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80);
9747 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84);
9748 /*---------------------------------------------------------------------------------------------
9749 * Copyright (c) Microsoft Corporation. All rights reserved.
9750 * Licensed under the MIT License. See License.txt in the project root for license information.
9751 *--------------------------------------------------------------------------------------------*/
9759 /// A parser for the css core specification. See for reference:
9760 /// https://www.w3.org/TR/CSS21/grammar.html
9761 /// http://www.w3.org/TR/CSS21/syndata.html#tokenization
9763 var Parser = /** @class */ (function () {
9764 function Parser(scnr) {
9765 if (scnr === void 0) { scnr = new _cssScanner__WEBPACK_IMPORTED_MODULE_0__.Scanner(); }
9766 this.keyframeRegex = /^@(\-(webkit|ms|moz|o)\-)?keyframes$/i;
9767 this.scanner = scnr;
9768 this.token = { type: _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF, offset: -1, len: 0, text: '' };
9769 this.prevToken = undefined;
9771 Parser.prototype.peekIdent = function (text) {
9772 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
9774 Parser.prototype.peekKeyword = function (text) {
9775 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword === this.token.type && text.length === this.token.text.length && text === this.token.text.toLowerCase();
9777 Parser.prototype.peekDelim = function (text) {
9778 return _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Delim === this.token.type && text === this.token.text;
9780 Parser.prototype.peek = function (type) {
9781 return type === this.token.type;
9783 Parser.prototype.peekOne = function (types) {
9784 return types.indexOf(this.token.type) !== -1;
9786 Parser.prototype.peekRegExp = function (type, regEx) {
9787 if (type !== this.token.type) {
9790 return regEx.test(this.token.text);
9792 Parser.prototype.hasWhitespace = function () {
9793 return !!this.prevToken && (this.prevToken.offset + this.prevToken.len !== this.token.offset);
9795 Parser.prototype.consumeToken = function () {
9796 this.prevToken = this.token;
9797 this.token = this.scanner.scan();
9799 Parser.prototype.mark = function () {
9801 prev: this.prevToken,
9803 pos: this.scanner.pos()
9806 Parser.prototype.restoreAtMark = function (mark) {
9807 this.prevToken = mark.prev;
9808 this.token = mark.curr;
9809 this.scanner.goBackTo(mark.pos);
9811 Parser.prototype.try = function (func) {
9812 var pos = this.mark();
9815 this.restoreAtMark(pos);
9820 Parser.prototype.acceptOneKeyword = function (keywords) {
9821 if (_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword === this.token.type) {
9822 for (var _i = 0, keywords_1 = keywords; _i < keywords_1.length; _i++) {
9823 var keyword = keywords_1[_i];
9824 if (keyword.length === this.token.text.length && keyword === this.token.text.toLowerCase()) {
9825 this.consumeToken();
9832 Parser.prototype.accept = function (type) {
9833 if (type === this.token.type) {
9834 this.consumeToken();
9839 Parser.prototype.acceptIdent = function (text) {
9840 if (this.peekIdent(text)) {
9841 this.consumeToken();
9846 Parser.prototype.acceptKeyword = function (text) {
9847 if (this.peekKeyword(text)) {
9848 this.consumeToken();
9853 Parser.prototype.acceptDelim = function (text) {
9854 if (this.peekDelim(text)) {
9855 this.consumeToken();
9860 Parser.prototype.acceptRegexp = function (regEx) {
9861 if (regEx.test(this.token.text)) {
9862 this.consumeToken();
9867 Parser.prototype._parseRegexp = function (regEx) {
9868 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Identifier);
9869 do { } while (this.acceptRegexp(regEx));
9870 return this.finish(node);
9872 Parser.prototype.acceptUnquotedString = function () {
9873 var pos = this.scanner.pos();
9874 this.scanner.goBackTo(this.token.offset);
9875 var unquoted = this.scanner.scanUnquotedString();
9877 this.token = unquoted;
9878 this.consumeToken();
9881 this.scanner.goBackTo(pos);
9884 Parser.prototype.resync = function (resyncTokens, resyncStopTokens) {
9886 if (resyncTokens && resyncTokens.indexOf(this.token.type) !== -1) {
9887 this.consumeToken();
9890 else if (resyncStopTokens && resyncStopTokens.indexOf(this.token.type) !== -1) {
9894 if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF) {
9897 this.token = this.scanner.scan();
9901 Parser.prototype.createNode = function (nodeType) {
9902 return new _cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node(this.token.offset, this.token.len, nodeType);
9904 Parser.prototype.create = function (ctor) {
9905 return new ctor(this.token.offset, this.token.len);
9907 Parser.prototype.finish = function (node, error, resyncTokens, resyncStopTokens) {
9908 // parseNumeric misuses error for boolean flagging (however the real error mustn't be a false)
9909 // + nodelist offsets mustn't be modified, because there is a offset hack in rulesets for smartselection
9910 if (!(node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_1__.Nodelist)) {
9912 this.markError(node, error, resyncTokens, resyncStopTokens);
9914 // set the node end position
9915 if (this.prevToken) {
9916 // length with more elements belonging together
9917 var prevEnd = this.prevToken.offset + this.prevToken.len;
9918 node.length = prevEnd > node.offset ? prevEnd - node.offset : 0; // offset is taken from current token, end from previous: Use 0 for empty nodes
9923 Parser.prototype.markError = function (node, error, resyncTokens, resyncStopTokens) {
9924 if (this.token !== this.lastErrorToken) { // do not report twice on the same token
9925 node.addIssue(new _cssNodes__WEBPACK_IMPORTED_MODULE_1__.Marker(node, error, _cssNodes__WEBPACK_IMPORTED_MODULE_1__.Level.Error, undefined, this.token.offset, this.token.len));
9926 this.lastErrorToken = this.token;
9928 if (resyncTokens || resyncStopTokens) {
9929 this.resync(resyncTokens, resyncStopTokens);
9932 Parser.prototype.parseStylesheet = function (textDocument) {
9933 var versionId = textDocument.version;
9934 var text = textDocument.getText();
9935 var textProvider = function (offset, length) {
9936 if (textDocument.version !== versionId) {
9937 throw new Error('Underlying model has changed, AST is no longer valid');
9939 return text.substr(offset, length);
9941 return this.internalParse(text, this._parseStylesheet, textProvider);
9943 Parser.prototype.internalParse = function (input, parseFunc, textProvider) {
9944 this.scanner.setSource(input);
9945 this.token = this.scanner.scan();
9946 var node = parseFunc.bind(this)();
9949 node.textProvider = textProvider;
9952 node.textProvider = function (offset, length) { return input.substr(offset, length); };
9957 Parser.prototype._parseStylesheet = function () {
9958 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Stylesheet);
9959 while (node.addChild(this._parseStylesheetStart())) {
9960 // Parse statements only valid at the beginning of stylesheets.
9962 var inRecovery = false;
9964 var hasMatch = false;
9967 var statement = this._parseStylesheetStatement();
9969 node.addChild(statement);
9972 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF) && this._needsSemicolonAfter(statement) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
9973 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SemiColonExpected);
9976 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CDO) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CDC)) {
9977 // accept empty statements
9982 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF)) {
9986 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
9987 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.UnknownAtRule);
9990 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RuleOrSelectorExpected);
9994 this.consumeToken();
9995 } while (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF));
9996 return this.finish(node);
9998 Parser.prototype._parseStylesheetStart = function () {
9999 return this._parseCharset();
10001 Parser.prototype._parseStylesheetStatement = function (isNested) {
10002 if (isNested === void 0) { isNested = false; }
10003 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
10004 return this._parseStylesheetAtStatement(isNested);
10006 return this._parseRuleset(isNested);
10008 Parser.prototype._parseStylesheetAtStatement = function (isNested) {
10009 if (isNested === void 0) { isNested = false; }
10010 return this._parseImport()
10011 || this._parseMedia(isNested)
10012 || this._parsePage()
10013 || this._parseFontFace()
10014 || this._parseKeyframe()
10015 || this._parseSupports(isNested)
10016 || this._parseViewPort()
10017 || this._parseNamespace()
10018 || this._parseDocument()
10019 || this._parseUnknownAtRule();
10021 Parser.prototype._tryParseRuleset = function (isNested) {
10022 var mark = this.mark();
10023 if (this._parseSelector(isNested)) {
10024 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma) && this._parseSelector(isNested)) {
10027 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL)) {
10028 this.restoreAtMark(mark);
10029 return this._parseRuleset(isNested);
10032 this.restoreAtMark(mark);
10035 Parser.prototype._parseRuleset = function (isNested) {
10036 if (isNested === void 0) { isNested = false; }
10037 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.RuleSet);
10038 var selectors = node.getSelectors();
10039 if (!selectors.addChild(this._parseSelector(isNested))) {
10042 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
10043 if (!selectors.addChild(this._parseSelector(isNested))) {
10044 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SelectorExpected);
10047 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
10049 Parser.prototype._parseRuleSetDeclarationAtStatement = function () {
10050 return this._parseAtApply()
10051 || this._parseUnknownAtRule();
10053 Parser.prototype._parseRuleSetDeclaration = function () {
10054 // https://www.w3.org/TR/css-syntax-3/#consume-a-list-of-declarations0
10055 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
10056 return this._parseRuleSetDeclarationAtStatement();
10058 return this._parseDeclaration();
10061 * Parses declarations like:
10062 * @apply --my-theme;
10064 * Follows https://tabatkins.github.io/specs/css-apply-rule/#using
10066 Parser.prototype._parseAtApply = function () {
10067 if (!this.peekKeyword('@apply')) {
10070 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.AtApplyRule);
10071 this.consumeToken();
10072 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ReferenceType.Variable]))) {
10073 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10075 return this.finish(node);
10077 Parser.prototype._needsSemicolonAfter = function (node) {
10078 switch (node.type) {
10079 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Keyframe:
10080 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ViewPort:
10081 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Media:
10082 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Ruleset:
10083 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Namespace:
10084 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.If:
10085 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.For:
10086 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Each:
10087 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.While:
10088 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MixinDeclaration:
10089 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.FunctionDeclaration:
10090 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MixinContentDeclaration:
10092 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ExtendsReference:
10093 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MixinContentReference:
10094 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ReturnStatement:
10095 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MediaQuery:
10096 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Debug:
10097 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Import:
10098 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.AtApplyRule:
10099 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.CustomPropertyDeclaration:
10101 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.VariableDeclaration:
10102 return node.needsSemicolon;
10103 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.MixinReference:
10104 return !node.getContent();
10105 case _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Declaration:
10106 return !node.getNestedProperties();
10110 Parser.prototype._parseDeclarations = function (parseDeclaration) {
10111 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Declarations);
10112 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL)) {
10115 var decl = parseDeclaration();
10116 while (node.addChild(decl)) {
10117 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR)) {
10120 if (this._needsSemicolonAfter(decl) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
10121 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SemiColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon, _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR]);
10123 // We accepted semicolon token. Link it to declaration.
10124 if (decl && this.prevToken && this.prevToken.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon) {
10125 decl.semicolonPosition = this.prevToken.offset;
10127 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
10128 // accept empty statements
10130 decl = parseDeclaration();
10132 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR)) {
10133 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightCurlyExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR, _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon]);
10135 return this.finish(node);
10137 Parser.prototype._parseBody = function (node, parseDeclaration) {
10138 if (!node.setDeclarations(this._parseDeclarations(parseDeclaration))) {
10139 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftCurlyExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR, _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon]);
10141 return this.finish(node);
10143 Parser.prototype._parseSelector = function (isNested) {
10144 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Selector);
10145 var hasContent = false;
10147 // nested selectors can start with a combinator
10148 hasContent = node.addChild(this._parseCombinator());
10150 while (node.addChild(this._parseSimpleSelector())) {
10152 node.addChild(this._parseCombinator()); // optional
10154 return hasContent ? this.finish(node) : null;
10156 Parser.prototype._parseDeclaration = function (stopTokens) {
10157 var custonProperty = this._tryParseCustomPropertyDeclaration(stopTokens);
10158 if (custonProperty) {
10159 return custonProperty;
10161 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Declaration);
10162 if (!node.setProperty(this._parseProperty())) {
10165 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10166 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon], stopTokens || [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon]);
10168 if (this.prevToken) {
10169 node.colonPosition = this.prevToken.offset;
10171 if (!node.setValue(this._parseExpr())) {
10172 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.PropertyValueExpected);
10174 node.addChild(this._parsePrio());
10175 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
10176 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
10178 return this.finish(node);
10180 Parser.prototype._tryParseCustomPropertyDeclaration = function (stopTokens) {
10181 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident, /^--/)) {
10184 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.CustomPropertyDeclaration);
10185 if (!node.setProperty(this._parseProperty())) {
10188 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10189 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon]);
10191 if (this.prevToken) {
10192 node.colonPosition = this.prevToken.offset;
10194 var mark = this.mark();
10195 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL)) {
10196 // try to parse it as nested declaration
10197 var propertySet = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.CustomPropertySet);
10198 var declarations = this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));
10199 if (propertySet.setDeclarations(declarations) && !declarations.isErroneous(true)) {
10200 propertySet.addChild(this._parsePrio());
10201 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
10202 this.finish(propertySet);
10203 node.setPropertySet(propertySet);
10204 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
10205 return this.finish(node);
10208 this.restoreAtMark(mark);
10210 // try tp parse as expression
10211 var expression = this._parseExpr();
10212 if (expression && !expression.isErroneous(true)) {
10214 if (this.peekOne(stopTokens || [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon])) {
10215 node.setValue(expression);
10216 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
10217 return this.finish(node);
10220 this.restoreAtMark(mark);
10221 node.addChild(this._parseCustomPropertyValue(stopTokens));
10222 node.addChild(this._parsePrio());
10223 if ((0,_utils_objects__WEBPACK_IMPORTED_MODULE_4__.isDefined)(node.colonPosition) && this.token.offset === node.colonPosition + 1) {
10224 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.PropertyValueExpected);
10226 return this.finish(node);
10229 * Parse custom property values.
10231 * Based on https://www.w3.org/TR/css-variables/#syntax
10233 * This code is somewhat unusual, as the allowed syntax is incredibly broad,
10234 * parsing almost any sequence of tokens, save for a small set of exceptions.
10235 * Unbalanced delimitors, invalid tokens, and declaration
10236 * terminators like semicolons and !important directives (when not inside
10239 Parser.prototype._parseCustomPropertyValue = function (stopTokens) {
10241 if (stopTokens === void 0) { stopTokens = [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR]; }
10242 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10243 var isTopLevel = function () { return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; };
10244 var onStopToken = function () { return stopTokens.indexOf(_this.token.type) !== -1; };
10245 var curlyDepth = 0;
10246 var parensDepth = 0;
10247 var bracketsDepth = 0;
10248 done: while (true) {
10249 switch (this.token.type) {
10250 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon:
10251 // A semicolon only ends things if we're not inside a delimitor.
10252 if (isTopLevel()) {
10256 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Exclamation:
10257 // An exclamation ends the value if we're not inside delims.
10258 if (isTopLevel()) {
10262 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL:
10265 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR:
10267 if (curlyDepth < 0) {
10268 // The property value has been terminated without a semicolon, and
10269 // this is the last declaration in the ruleset.
10270 if (onStopToken() && parensDepth === 0 && bracketsDepth === 0) {
10273 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftCurlyExpected);
10276 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL:
10279 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR:
10281 if (parensDepth < 0) {
10282 if (onStopToken() && bracketsDepth === 0 && curlyDepth === 0) {
10285 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftParenthesisExpected);
10288 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketL:
10291 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketR:
10293 if (bracketsDepth < 0) {
10294 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftSquareBracketExpected);
10297 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BadString: // fall through
10299 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF:
10300 // We shouldn't have reached the end of input, something is
10302 var error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightCurlyExpected;
10303 if (bracketsDepth > 0) {
10304 error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected;
10306 else if (parensDepth > 0) {
10307 error = _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected;
10309 return this.finish(node, error);
10311 this.consumeToken();
10313 return this.finish(node);
10315 Parser.prototype._tryToParseDeclaration = function (stopTokens) {
10316 var mark = this.mark();
10317 if (this._parseProperty() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10318 // looks like a declaration, go ahead
10319 this.restoreAtMark(mark);
10320 return this._parseDeclaration(stopTokens);
10322 this.restoreAtMark(mark);
10325 Parser.prototype._parseProperty = function () {
10326 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Property);
10327 var mark = this.mark();
10328 if (this.acceptDelim('*') || this.acceptDelim('_')) {
10329 // support for IE 5.x, 6 and 7 star hack: see http://en.wikipedia.org/wiki/CSS_filter#Star_hack
10330 if (this.hasWhitespace()) {
10331 this.restoreAtMark(mark);
10335 if (node.setIdentifier(this._parsePropertyIdentifier())) {
10336 return this.finish(node);
10340 Parser.prototype._parsePropertyIdentifier = function () {
10341 return this._parseIdent();
10343 Parser.prototype._parseCharset = function () {
10344 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Charset)) {
10347 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10348 this.consumeToken(); // charset
10349 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.String)) {
10350 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10352 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
10353 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SemiColonExpected);
10355 return this.finish(node);
10357 Parser.prototype._parseImport = function () {
10358 if (!this.peekKeyword('@import')) {
10361 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Import);
10362 this.consumeToken(); // @import
10363 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
10364 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.URIOrStringExpected);
10366 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF)) {
10367 node.setMedialist(this._parseMediaQueryList());
10369 return this.finish(node);
10371 Parser.prototype._parseNamespace = function () {
10372 // http://www.w3.org/TR/css3-namespace/
10373 // namespace : NAMESPACE_SYM S* [IDENT S*]? [STRING|URI] S* ';' S*
10374 if (!this.peekKeyword('@namespace')) {
10377 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Namespace);
10378 this.consumeToken(); // @namespace
10379 if (!node.addChild(this._parseURILiteral())) { // url literal also starts with ident
10380 node.addChild(this._parseIdent()); // optional prefix
10381 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
10382 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.URIExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon]);
10385 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon)) {
10386 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.SemiColonExpected);
10388 return this.finish(node);
10390 Parser.prototype._parseFontFace = function () {
10391 if (!this.peekKeyword('@font-face')) {
10394 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.FontFace);
10395 this.consumeToken(); // @font-face
10396 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
10398 Parser.prototype._parseViewPort = function () {
10399 if (!this.peekKeyword('@-ms-viewport') &&
10400 !this.peekKeyword('@-o-viewport') &&
10401 !this.peekKeyword('@viewport')) {
10404 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ViewPort);
10405 this.consumeToken(); // @-ms-viewport
10406 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
10408 Parser.prototype._parseKeyframe = function () {
10409 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword, this.keyframeRegex)) {
10412 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Keyframe);
10413 var atNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10414 this.consumeToken(); // atkeyword
10415 node.setKeyword(this.finish(atNode));
10416 if (atNode.matches('@-ms-keyframes')) { // -ms-keyframes never existed
10417 this.markError(atNode, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.UnknownKeyword);
10419 if (!node.setIdentifier(this._parseKeyframeIdent())) {
10420 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR]);
10422 return this._parseBody(node, this._parseKeyframeSelector.bind(this));
10424 Parser.prototype._parseKeyframeIdent = function () {
10425 return this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ReferenceType.Keyframe]);
10427 Parser.prototype._parseKeyframeSelector = function () {
10428 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.KeyframeSelector);
10429 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage)) {
10432 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
10433 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage)) {
10434 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.PercentageExpected);
10437 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
10439 Parser.prototype._tryParseKeyframeSelector = function () {
10440 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.KeyframeSelector);
10441 var pos = this.mark();
10442 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage)) {
10445 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
10446 if (!node.addChild(this._parseIdent()) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage)) {
10447 this.restoreAtMark(pos);
10451 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL)) {
10452 this.restoreAtMark(pos);
10455 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
10457 Parser.prototype._parseSupports = function (isNested) {
10458 if (isNested === void 0) { isNested = false; }
10459 // SUPPORTS_SYM S* supports_condition '{' S* ruleset* '}' S*
10460 if (!this.peekKeyword('@supports')) {
10463 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Supports);
10464 this.consumeToken(); // @supports
10465 node.addChild(this._parseSupportsCondition());
10466 return this._parseBody(node, this._parseSupportsDeclaration.bind(this, isNested));
10468 Parser.prototype._parseSupportsDeclaration = function (isNested) {
10469 if (isNested === void 0) { isNested = false; }
10471 // if nested, the body can contain rulesets, but also declarations
10472 return this._tryParseRuleset(true)
10473 || this._tryToParseDeclaration()
10474 || this._parseStylesheetStatement(true);
10476 return this._parseStylesheetStatement(false);
10478 Parser.prototype._parseSupportsCondition = function () {
10479 // supports_condition : supports_negation | supports_conjunction | supports_disjunction | supports_condition_in_parens ;
10480 // supports_condition_in_parens: ( '(' S* supports_condition S* ')' ) | supports_declaration_condition | general_enclosed ;
10481 // supports_negation: NOT S+ supports_condition_in_parens ;
10482 // supports_conjunction: supports_condition_in_parens ( S+ AND S+ supports_condition_in_parens )+;
10483 // supports_disjunction: supports_condition_in_parens ( S+ OR S+ supports_condition_in_parens )+;
10484 // supports_declaration_condition: '(' S* declaration ')';
10485 // general_enclosed: ( FUNCTION | '(' ) ( any | unused )* ')' ;
10486 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.SupportsCondition);
10487 if (this.acceptIdent('not')) {
10488 node.addChild(this._parseSupportsConditionInParens());
10491 node.addChild(this._parseSupportsConditionInParens());
10492 if (this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident, /^(and|or)$/i)) {
10493 var text = this.token.text.toLowerCase();
10494 while (this.acceptIdent(text)) {
10495 node.addChild(this._parseSupportsConditionInParens());
10499 return this.finish(node);
10501 Parser.prototype._parseSupportsConditionInParens = function () {
10502 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.SupportsCondition);
10503 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10504 if (this.prevToken) {
10505 node.lParent = this.prevToken.offset;
10507 if (!node.addChild(this._tryToParseDeclaration([_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR]))) {
10508 if (!this._parseSupportsCondition()) {
10509 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.ConditionExpected);
10512 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10513 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR], []);
10515 if (this.prevToken) {
10516 node.rParent = this.prevToken.offset;
10518 return this.finish(node);
10520 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident)) {
10521 var pos = this.mark();
10522 this.consumeToken();
10523 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10524 var openParentCount = 1;
10525 while (this.token.type !== _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF && openParentCount !== 0) {
10526 if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL) {
10529 else if (this.token.type === _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR) {
10532 this.consumeToken();
10534 return this.finish(node);
10537 this.restoreAtMark(pos);
10540 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftParenthesisExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL]);
10542 Parser.prototype._parseMediaDeclaration = function (isNested) {
10543 if (isNested === void 0) { isNested = false; }
10545 // if nested, the body can contain rulesets, but also declarations
10546 return this._tryParseRuleset(true)
10547 || this._tryToParseDeclaration()
10548 || this._parseStylesheetStatement(true);
10550 return this._parseStylesheetStatement(false);
10552 Parser.prototype._parseMedia = function (isNested) {
10553 if (isNested === void 0) { isNested = false; }
10554 // MEDIA_SYM S* media_query_list '{' S* ruleset* '}' S*
10555 // media_query_list : S* [media_query [ ',' S* media_query ]* ]?
10556 if (!this.peekKeyword('@media')) {
10559 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Media);
10560 this.consumeToken(); // @media
10561 if (!node.addChild(this._parseMediaQueryList())) {
10562 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.MediaQueryExpected);
10564 return this._parseBody(node, this._parseMediaDeclaration.bind(this, isNested));
10566 Parser.prototype._parseMediaQueryList = function () {
10567 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Medialist);
10568 if (!node.addChild(this._parseMediaQuery([_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL]))) {
10569 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.MediaQueryExpected);
10571 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
10572 if (!node.addChild(this._parseMediaQuery([_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL]))) {
10573 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.MediaQueryExpected);
10576 return this.finish(node);
10578 Parser.prototype._parseMediaQuery = function (resyncStopToken) {
10579 // http://www.w3.org/TR/css3-mediaqueries/
10580 // media_query : [ONLY | NOT]? S* IDENT S* [ AND S* expression ]* | expression [ AND S* expression ]*
10581 // expression : '(' S* IDENT S* [ ':' S* expr ]? ')' S*
10582 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.MediaQuery);
10583 var parseExpression = true;
10584 var hasContent = false;
10585 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10586 if (this.acceptIdent('only') || this.acceptIdent('not')) {
10589 if (!node.addChild(this._parseIdent())) {
10593 parseExpression = this.acceptIdent('and');
10595 while (parseExpression) {
10596 // Allow short-circuting for other language constructs.
10597 if (node.addChild(this._parseMediaContentStart())) {
10598 parseExpression = this.acceptIdent('and');
10601 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10603 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftParenthesisExpected, [], resyncStopToken);
10607 if (!node.addChild(this._parseMediaFeatureName())) {
10608 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected, [], resyncStopToken);
10610 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10611 if (!node.addChild(this._parseExpr())) {
10612 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.TermExpected, [], resyncStopToken);
10615 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10616 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected, [], resyncStopToken);
10618 parseExpression = this.acceptIdent('and');
10620 return this.finish(node);
10622 Parser.prototype._parseMediaContentStart = function () {
10625 Parser.prototype._parseMediaFeatureName = function () {
10626 return this._parseIdent();
10628 Parser.prototype._parseMedium = function () {
10629 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10630 if (node.addChild(this._parseIdent())) {
10631 return this.finish(node);
10637 Parser.prototype._parsePageDeclaration = function () {
10638 return this._parsePageMarginBox() || this._parseRuleSetDeclaration();
10640 Parser.prototype._parsePage = function () {
10641 // http://www.w3.org/TR/css3-page/
10642 // page_rule : PAGE_SYM S* page_selector_list '{' S* page_body '}' S*
10643 // page_body : /* Can be empty */ declaration? [ ';' S* page_body ]? | page_margin_box page_body
10644 if (!this.peekKeyword('@page')) {
10647 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Page);
10648 this.consumeToken();
10649 if (node.addChild(this._parsePageSelector())) {
10650 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
10651 if (!node.addChild(this._parsePageSelector())) {
10652 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10656 return this._parseBody(node, this._parsePageDeclaration.bind(this));
10658 Parser.prototype._parsePageMarginBox = function () {
10659 // page_margin_box : margin_sym S* '{' S* declaration? [ ';' S* declaration? ]* '}' S*
10660 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
10663 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.PageBoxMarginBox);
10664 if (!this.acceptOneKeyword(_languageFacts_facts__WEBPACK_IMPORTED_MODULE_3__.pageBoxDirectives)) {
10665 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.UnknownAtRule, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL]);
10667 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
10669 Parser.prototype._parsePageSelector = function () {
10670 // page_selector : pseudo_page+ | IDENT pseudo_page*
10671 // pseudo_page : ':' [ "left" | "right" | "first" | "blank" ];
10672 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10675 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10676 node.addChild(this._parseIdent()); // optional ident
10677 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10678 if (!node.addChild(this._parseIdent())) { // optional ident
10679 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10682 return this.finish(node);
10684 Parser.prototype._parseDocument = function () {
10685 // -moz-document is experimental but has been pushed to css4
10686 if (!this.peekKeyword('@-moz-document')) {
10689 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Document);
10690 this.consumeToken(); // @-moz-document
10691 this.resync([], [_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL]); // ignore all the rules
10692 return this._parseBody(node, this._parseStylesheetStatement.bind(this));
10694 // https://www.w3.org/TR/css-syntax-3/#consume-an-at-rule
10695 Parser.prototype._parseUnknownAtRule = function () {
10696 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
10699 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.UnknownAtRule);
10700 node.addChild(this._parseUnknownAtRuleName());
10701 var isTopLevel = function () { return curlyDepth === 0 && parensDepth === 0 && bracketsDepth === 0; };
10702 var curlyLCount = 0;
10703 var curlyDepth = 0;
10704 var parensDepth = 0;
10705 var bracketsDepth = 0;
10706 done: while (true) {
10707 switch (this.token.type) {
10708 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SemiColon:
10709 if (isTopLevel()) {
10713 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF:
10714 if (curlyDepth > 0) {
10715 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightCurlyExpected);
10717 else if (bracketsDepth > 0) {
10718 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected);
10720 else if (parensDepth > 0) {
10721 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
10724 return this.finish(node);
10726 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL:
10730 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR:
10732 // End of at-rule, consume CurlyR and return node
10733 if (curlyLCount > 0 && curlyDepth === 0) {
10734 this.consumeToken();
10735 if (bracketsDepth > 0) {
10736 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected);
10738 else if (parensDepth > 0) {
10739 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
10743 if (curlyDepth < 0) {
10744 // The property value has been terminated without a semicolon, and
10745 // this is the last declaration in the ruleset.
10746 if (parensDepth === 0 && bracketsDepth === 0) {
10749 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftCurlyExpected);
10752 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL:
10755 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR:
10757 if (parensDepth < 0) {
10758 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftParenthesisExpected);
10761 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketL:
10764 case _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketR:
10766 if (bracketsDepth < 0) {
10767 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.LeftSquareBracketExpected);
10771 this.consumeToken();
10775 Parser.prototype._parseUnknownAtRuleName = function () {
10776 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10777 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.AtKeyword)) {
10778 return this.finish(node);
10782 Parser.prototype._parseOperator = function () {
10783 // these are operators for binary expressions
10784 if (this.peekDelim('/') ||
10785 this.peekDelim('*') ||
10786 this.peekDelim('+') ||
10787 this.peekDelim('-') ||
10788 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Dashmatch) ||
10789 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Includes) ||
10790 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SubstringOperator) ||
10791 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.PrefixOperator) ||
10792 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.SuffixOperator) ||
10793 this.peekDelim('=')) { // doesn't stick to the standard here
10794 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Operator);
10795 this.consumeToken();
10796 return this.finish(node);
10802 Parser.prototype._parseUnaryOperator = function () {
10803 if (!this.peekDelim('+') && !this.peekDelim('-')) {
10806 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10807 this.consumeToken();
10808 return this.finish(node);
10810 Parser.prototype._parseCombinator = function () {
10811 if (this.peekDelim('>')) {
10812 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10813 this.consumeToken();
10814 var mark = this.mark();
10815 if (!this.hasWhitespace() && this.acceptDelim('>')) {
10816 if (!this.hasWhitespace() && this.acceptDelim('>')) {
10817 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorShadowPiercingDescendant;
10818 return this.finish(node);
10820 this.restoreAtMark(mark);
10822 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorParent;
10823 return this.finish(node);
10825 else if (this.peekDelim('+')) {
10826 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10827 this.consumeToken();
10828 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorSibling;
10829 return this.finish(node);
10831 else if (this.peekDelim('~')) {
10832 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10833 this.consumeToken();
10834 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorAllSiblings;
10835 return this.finish(node);
10837 else if (this.peekDelim('/')) {
10838 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10839 this.consumeToken();
10840 var mark = this.mark();
10841 if (!this.hasWhitespace() && this.acceptIdent('deep') && !this.hasWhitespace() && this.acceptDelim('/')) {
10842 node.type = _cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.SelectorCombinatorShadowPiercingDescendant;
10843 return this.finish(node);
10845 this.restoreAtMark(mark);
10849 Parser.prototype._parseSimpleSelector = function () {
10851 // : element_name [ HASH | class | attrib | pseudo ]* | [ HASH | class | attrib | pseudo ]+ ;
10852 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.SimpleSelector);
10854 if (node.addChild(this._parseElementName())) {
10857 while ((c === 0 || !this.hasWhitespace()) && node.addChild(this._parseSimpleSelectorBody())) {
10860 return c > 0 ? this.finish(node) : null;
10862 Parser.prototype._parseSimpleSelectorBody = function () {
10863 return this._parsePseudo() || this._parseHash() || this._parseClass() || this._parseAttrib();
10865 Parser.prototype._parseSelectorIdent = function () {
10866 return this._parseIdent();
10868 Parser.prototype._parseHash = function () {
10869 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Hash) && !this.peekDelim('#')) {
10872 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.IdentifierSelector);
10873 if (this.acceptDelim('#')) {
10874 if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
10875 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10879 this.consumeToken(); // TokenType.Hash
10881 return this.finish(node);
10883 Parser.prototype._parseClass = function () {
10884 // class: '.' IDENT ;
10885 if (!this.peekDelim('.')) {
10888 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ClassSelector);
10889 this.consumeToken(); // '.'
10890 if (this.hasWhitespace() || !node.addChild(this._parseSelectorIdent())) {
10891 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10893 return this.finish(node);
10895 Parser.prototype._parseElementName = function () {
10896 // element_name: (ns? '|')? IDENT | '*';
10897 var pos = this.mark();
10898 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.ElementNameSelector);
10899 node.addChild(this._parseNamespacePrefix());
10900 if (!node.addChild(this._parseSelectorIdent()) && !this.acceptDelim('*')) {
10901 this.restoreAtMark(pos);
10904 return this.finish(node);
10906 Parser.prototype._parseNamespacePrefix = function () {
10907 var pos = this.mark();
10908 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.NamespacePrefix);
10909 if (!node.addChild(this._parseIdent()) && !this.acceptDelim('*')) {
10912 if (!this.acceptDelim('|')) {
10913 this.restoreAtMark(pos);
10916 return this.finish(node);
10918 Parser.prototype._parseAttrib = function () {
10919 // attrib : '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* [ IDENT | STRING ] S* ]? ']'
10920 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketL)) {
10923 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.AttributeSelector);
10924 this.consumeToken(); // BracketL
10925 // Optional attrib namespace
10926 node.setNamespacePrefix(this._parseNamespacePrefix());
10927 if (!node.setIdentifier(this._parseIdent())) {
10928 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10930 if (node.setOperator(this._parseOperator())) {
10931 node.setValue(this._parseBinaryExpr());
10932 this.acceptIdent('i'); // case insensitive matching
10934 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketR)) {
10935 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected);
10937 return this.finish(node);
10939 Parser.prototype._parsePseudo = function () {
10941 // pseudo: ':' [ IDENT | FUNCTION S* [IDENT S*]? ')' ]
10942 var node = this._tryParsePseudoIdentifier();
10944 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
10945 var tryAsSelector = function () {
10946 var selectors = _this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
10947 if (!selectors.addChild(_this._parseSelector(false))) {
10950 while (_this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma) && selectors.addChild(_this._parseSelector(false))) {
10953 if (_this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10954 return _this.finish(selectors);
10958 node.addChild(this.try(tryAsSelector) || this._parseBinaryExpr());
10959 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
10960 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
10963 return this.finish(node);
10967 Parser.prototype._tryParsePseudoIdentifier = function () {
10968 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
10971 var pos = this.mark();
10972 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.PseudoSelector);
10973 this.consumeToken(); // Colon
10974 if (this.hasWhitespace()) {
10975 this.restoreAtMark(pos);
10978 // optional, support ::
10979 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon);
10980 if (this.hasWhitespace() || !node.addChild(this._parseIdent())) {
10981 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.IdentifierExpected);
10983 return this.finish(node);
10985 Parser.prototype._tryParsePrio = function () {
10986 var mark = this.mark();
10987 var prio = this._parsePrio();
10991 this.restoreAtMark(mark);
10994 Parser.prototype._parsePrio = function () {
10995 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Exclamation)) {
10998 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Prio);
10999 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Exclamation) && this.acceptIdent('important')) {
11000 return this.finish(node);
11004 Parser.prototype._parseExpr = function (stopOnComma) {
11005 if (stopOnComma === void 0) { stopOnComma = false; }
11006 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Expression);
11007 if (!node.addChild(this._parseBinaryExpr())) {
11011 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) { // optional
11013 return this.finish(node);
11015 this.consumeToken();
11017 if (!node.addChild(this._parseBinaryExpr())) {
11021 return this.finish(node);
11023 Parser.prototype._parseNamedLine = function () {
11024 // https://www.w3.org/TR/css-grid-1/#named-lines
11025 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketL)) {
11028 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.GridLine);
11029 this.consumeToken();
11030 while (node.addChild(this._parseIdent())) {
11033 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BracketR)) {
11034 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightSquareBracketExpected);
11036 return this.finish(node);
11038 Parser.prototype._parseBinaryExpr = function (preparsedLeft, preparsedOper) {
11039 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.BinaryExpression);
11040 if (!node.setLeft((preparsedLeft || this._parseTerm()))) {
11043 if (!node.setOperator(preparsedOper || this._parseOperator())) {
11044 return this.finish(node);
11046 if (!node.setRight(this._parseTerm())) {
11047 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.TermExpected);
11049 // things needed for multiple binary expressions
11050 node = this.finish(node);
11051 var operator = this._parseOperator();
11053 node = this._parseBinaryExpr(node, operator);
11055 return this.finish(node);
11057 Parser.prototype._parseTerm = function () {
11058 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Term);
11059 node.setOperator(this._parseUnaryOperator()); // optional
11060 if (node.setExpression(this._parseTermExpression())) {
11061 return this.finish(node);
11065 Parser.prototype._parseTermExpression = function () {
11066 return this._parseURILiteral() || // url before function
11067 this._parseFunction() || // function before ident
11068 this._parseIdent() ||
11069 this._parseStringLiteral() ||
11070 this._parseNumeric() ||
11071 this._parseHexColor() ||
11072 this._parseOperation() ||
11073 this._parseNamedLine();
11075 Parser.prototype._parseOperation = function () {
11076 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
11079 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
11080 this.consumeToken(); // ParenthesisL
11081 node.addChild(this._parseExpr());
11082 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
11083 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
11085 return this.finish(node);
11087 Parser.prototype._parseNumeric = function () {
11088 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Num) ||
11089 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Percentage) ||
11090 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Resolution) ||
11091 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Length) ||
11092 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EMS) ||
11093 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EXS) ||
11094 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Angle) ||
11095 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Time) ||
11096 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Dimension) ||
11097 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Freq)) {
11098 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NumericValue);
11099 this.consumeToken();
11100 return this.finish(node);
11104 Parser.prototype._parseStringLiteral = function () {
11105 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.String) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BadString)) {
11108 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.StringLiteral);
11109 this.consumeToken();
11110 return this.finish(node);
11112 Parser.prototype._parseURILiteral = function () {
11113 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident, /^url(-prefix)?$/i)) {
11116 var pos = this.mark();
11117 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.URILiteral);
11118 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident);
11119 if (this.hasWhitespace() || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
11120 this.restoreAtMark(pos);
11123 this.scanner.inURL = true;
11124 this.consumeToken(); // consume ()
11125 node.addChild(this._parseURLArgument()); // argument is optional
11126 this.scanner.inURL = false;
11127 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
11128 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
11130 return this.finish(node);
11132 Parser.prototype._parseURLArgument = function () {
11133 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Node);
11134 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.String) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BadString) && !this.acceptUnquotedString()) {
11137 return this.finish(node);
11139 Parser.prototype._parseIdent = function (referenceTypes) {
11140 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident)) {
11143 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Identifier);
11144 if (referenceTypes) {
11145 node.referenceTypes = referenceTypes;
11147 node.isCustomProperty = this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident, /^--/);
11148 this.consumeToken();
11149 return this.finish(node);
11151 Parser.prototype._parseFunction = function () {
11152 var pos = this.mark();
11153 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Function);
11154 if (!node.setIdentifier(this._parseFunctionIdentifier())) {
11157 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisL)) {
11158 this.restoreAtMark(pos);
11161 if (node.getArguments().addChild(this._parseFunctionArgument())) {
11162 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comma)) {
11163 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
11166 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
11167 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.ExpressionExpected);
11171 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.ParenthesisR)) {
11172 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_2__.ParseError.RightParenthesisExpected);
11174 return this.finish(node);
11176 Parser.prototype._parseFunctionIdentifier = function () {
11177 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident)) {
11180 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.Identifier);
11181 node.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ReferenceType.Function];
11182 if (this.acceptIdent('progid')) {
11183 // support for IE7 specific filters: 'progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)'
11184 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Colon)) {
11185 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Ident) && this.acceptDelim('.')) {
11189 return this.finish(node);
11191 this.consumeToken();
11192 return this.finish(node);
11194 Parser.prototype._parseFunctionArgument = function () {
11195 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.FunctionArgument);
11196 if (node.setValue(this._parseExpr(true))) {
11197 return this.finish(node);
11201 Parser.prototype._parseHexColor = function () {
11202 if (this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Hash, /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)) {
11203 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_1__.HexColorValue);
11204 this.consumeToken();
11205 return this.finish(node);
11218 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11220 __webpack_require__.r(__webpack_exports__);
11221 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11222 /* harmony export */ "TokenType": () => /* binding */ TokenType,
11223 /* harmony export */ "MultiLineStream": () => /* binding */ MultiLineStream,
11224 /* harmony export */ "Scanner": () => /* binding */ Scanner
11225 /* harmony export */ });
11226 /*---------------------------------------------------------------------------------------------
11227 * Copyright (c) Microsoft Corporation. All rights reserved.
11228 * Licensed under the MIT License. See License.txt in the project root for license information.
11229 *--------------------------------------------------------------------------------------------*/
11232 (function (TokenType) {
11233 TokenType[TokenType["Ident"] = 0] = "Ident";
11234 TokenType[TokenType["AtKeyword"] = 1] = "AtKeyword";
11235 TokenType[TokenType["String"] = 2] = "String";
11236 TokenType[TokenType["BadString"] = 3] = "BadString";
11237 TokenType[TokenType["UnquotedString"] = 4] = "UnquotedString";
11238 TokenType[TokenType["Hash"] = 5] = "Hash";
11239 TokenType[TokenType["Num"] = 6] = "Num";
11240 TokenType[TokenType["Percentage"] = 7] = "Percentage";
11241 TokenType[TokenType["Dimension"] = 8] = "Dimension";
11242 TokenType[TokenType["UnicodeRange"] = 9] = "UnicodeRange";
11243 TokenType[TokenType["CDO"] = 10] = "CDO";
11244 TokenType[TokenType["CDC"] = 11] = "CDC";
11245 TokenType[TokenType["Colon"] = 12] = "Colon";
11246 TokenType[TokenType["SemiColon"] = 13] = "SemiColon";
11247 TokenType[TokenType["CurlyL"] = 14] = "CurlyL";
11248 TokenType[TokenType["CurlyR"] = 15] = "CurlyR";
11249 TokenType[TokenType["ParenthesisL"] = 16] = "ParenthesisL";
11250 TokenType[TokenType["ParenthesisR"] = 17] = "ParenthesisR";
11251 TokenType[TokenType["BracketL"] = 18] = "BracketL";
11252 TokenType[TokenType["BracketR"] = 19] = "BracketR";
11253 TokenType[TokenType["Whitespace"] = 20] = "Whitespace";
11254 TokenType[TokenType["Includes"] = 21] = "Includes";
11255 TokenType[TokenType["Dashmatch"] = 22] = "Dashmatch";
11256 TokenType[TokenType["SubstringOperator"] = 23] = "SubstringOperator";
11257 TokenType[TokenType["PrefixOperator"] = 24] = "PrefixOperator";
11258 TokenType[TokenType["SuffixOperator"] = 25] = "SuffixOperator";
11259 TokenType[TokenType["Delim"] = 26] = "Delim";
11260 TokenType[TokenType["EMS"] = 27] = "EMS";
11261 TokenType[TokenType["EXS"] = 28] = "EXS";
11262 TokenType[TokenType["Length"] = 29] = "Length";
11263 TokenType[TokenType["Angle"] = 30] = "Angle";
11264 TokenType[TokenType["Time"] = 31] = "Time";
11265 TokenType[TokenType["Freq"] = 32] = "Freq";
11266 TokenType[TokenType["Exclamation"] = 33] = "Exclamation";
11267 TokenType[TokenType["Resolution"] = 34] = "Resolution";
11268 TokenType[TokenType["Comma"] = 35] = "Comma";
11269 TokenType[TokenType["Charset"] = 36] = "Charset";
11270 TokenType[TokenType["EscapedJavaScript"] = 37] = "EscapedJavaScript";
11271 TokenType[TokenType["BadEscapedJavaScript"] = 38] = "BadEscapedJavaScript";
11272 TokenType[TokenType["Comment"] = 39] = "Comment";
11273 TokenType[TokenType["SingleLineComment"] = 40] = "SingleLineComment";
11274 TokenType[TokenType["EOF"] = 41] = "EOF";
11275 TokenType[TokenType["CustomToken"] = 42] = "CustomToken";
11276 })(TokenType || (TokenType = {}));
11277 var MultiLineStream = /** @class */ (function () {
11278 function MultiLineStream(source) {
11279 this.source = source;
11280 this.len = source.length;
11283 MultiLineStream.prototype.substring = function (from, to) {
11284 if (to === void 0) { to = this.position; }
11285 return this.source.substring(from, to);
11287 MultiLineStream.prototype.eos = function () {
11288 return this.len <= this.position;
11290 MultiLineStream.prototype.pos = function () {
11291 return this.position;
11293 MultiLineStream.prototype.goBackTo = function (pos) {
11294 this.position = pos;
11296 MultiLineStream.prototype.goBack = function (n) {
11297 this.position -= n;
11299 MultiLineStream.prototype.advance = function (n) {
11300 this.position += n;
11302 MultiLineStream.prototype.nextChar = function () {
11303 return this.source.charCodeAt(this.position++) || 0;
11305 MultiLineStream.prototype.peekChar = function (n) {
11306 if (n === void 0) { n = 0; }
11307 return this.source.charCodeAt(this.position + n) || 0;
11309 MultiLineStream.prototype.lookbackChar = function (n) {
11310 if (n === void 0) { n = 0; }
11311 return this.source.charCodeAt(this.position - n) || 0;
11313 MultiLineStream.prototype.advanceIfChar = function (ch) {
11314 if (ch === this.source.charCodeAt(this.position)) {
11320 MultiLineStream.prototype.advanceIfChars = function (ch) {
11321 if (this.position + ch.length > this.source.length) {
11325 for (; i < ch.length; i++) {
11326 if (this.source.charCodeAt(this.position + i) !== ch[i]) {
11333 MultiLineStream.prototype.advanceWhileChar = function (condition) {
11334 var posNow = this.position;
11335 while (this.position < this.len && condition(this.source.charCodeAt(this.position))) {
11338 return this.position - posNow;
11340 return MultiLineStream;
11343 var _a = 'a'.charCodeAt(0);
11344 var _f = 'f'.charCodeAt(0);
11345 var _z = 'z'.charCodeAt(0);
11346 var _A = 'A'.charCodeAt(0);
11347 var _F = 'F'.charCodeAt(0);
11348 var _Z = 'Z'.charCodeAt(0);
11349 var _0 = '0'.charCodeAt(0);
11350 var _9 = '9'.charCodeAt(0);
11351 var _TLD = '~'.charCodeAt(0);
11352 var _HAT = '^'.charCodeAt(0);
11353 var _EQS = '='.charCodeAt(0);
11354 var _PIP = '|'.charCodeAt(0);
11355 var _MIN = '-'.charCodeAt(0);
11356 var _USC = '_'.charCodeAt(0);
11357 var _PRC = '%'.charCodeAt(0);
11358 var _MUL = '*'.charCodeAt(0);
11359 var _LPA = '('.charCodeAt(0);
11360 var _RPA = ')'.charCodeAt(0);
11361 var _LAN = '<'.charCodeAt(0);
11362 var _RAN = '>'.charCodeAt(0);
11363 var _ATS = '@'.charCodeAt(0);
11364 var _HSH = '#'.charCodeAt(0);
11365 var _DLR = '$'.charCodeAt(0);
11366 var _BSL = '\\'.charCodeAt(0);
11367 var _FSL = '/'.charCodeAt(0);
11368 var _NWL = '\n'.charCodeAt(0);
11369 var _CAR = '\r'.charCodeAt(0);
11370 var _LFD = '\f'.charCodeAt(0);
11371 var _DQO = '"'.charCodeAt(0);
11372 var _SQO = '\''.charCodeAt(0);
11373 var _WSP = ' '.charCodeAt(0);
11374 var _TAB = '\t'.charCodeAt(0);
11375 var _SEM = ';'.charCodeAt(0);
11376 var _COL = ':'.charCodeAt(0);
11377 var _CUL = '{'.charCodeAt(0);
11378 var _CUR = '}'.charCodeAt(0);
11379 var _BRL = '['.charCodeAt(0);
11380 var _BRR = ']'.charCodeAt(0);
11381 var _CMA = ','.charCodeAt(0);
11382 var _DOT = '.'.charCodeAt(0);
11383 var _BNG = '!'.charCodeAt(0);
11384 var staticTokenTable = {};
11385 staticTokenTable[_SEM] = TokenType.SemiColon;
11386 staticTokenTable[_COL] = TokenType.Colon;
11387 staticTokenTable[_CUL] = TokenType.CurlyL;
11388 staticTokenTable[_CUR] = TokenType.CurlyR;
11389 staticTokenTable[_BRR] = TokenType.BracketR;
11390 staticTokenTable[_BRL] = TokenType.BracketL;
11391 staticTokenTable[_LPA] = TokenType.ParenthesisL;
11392 staticTokenTable[_RPA] = TokenType.ParenthesisR;
11393 staticTokenTable[_CMA] = TokenType.Comma;
11394 var staticUnitTable = {};
11395 staticUnitTable['em'] = TokenType.EMS;
11396 staticUnitTable['ex'] = TokenType.EXS;
11397 staticUnitTable['px'] = TokenType.Length;
11398 staticUnitTable['cm'] = TokenType.Length;
11399 staticUnitTable['mm'] = TokenType.Length;
11400 staticUnitTable['in'] = TokenType.Length;
11401 staticUnitTable['pt'] = TokenType.Length;
11402 staticUnitTable['pc'] = TokenType.Length;
11403 staticUnitTable['deg'] = TokenType.Angle;
11404 staticUnitTable['rad'] = TokenType.Angle;
11405 staticUnitTable['grad'] = TokenType.Angle;
11406 staticUnitTable['ms'] = TokenType.Time;
11407 staticUnitTable['s'] = TokenType.Time;
11408 staticUnitTable['hz'] = TokenType.Freq;
11409 staticUnitTable['khz'] = TokenType.Freq;
11410 staticUnitTable['%'] = TokenType.Percentage;
11411 staticUnitTable['fr'] = TokenType.Percentage;
11412 staticUnitTable['dpi'] = TokenType.Resolution;
11413 staticUnitTable['dpcm'] = TokenType.Resolution;
11414 var Scanner = /** @class */ (function () {
11415 function Scanner() {
11416 this.stream = new MultiLineStream('');
11417 this.ignoreComment = true;
11418 this.ignoreWhitespace = true;
11419 this.inURL = false;
11421 Scanner.prototype.setSource = function (input) {
11422 this.stream = new MultiLineStream(input);
11424 Scanner.prototype.finishToken = function (offset, type, text) {
11427 len: this.stream.pos() - offset,
11429 text: text || this.stream.substring(offset)
11432 Scanner.prototype.substring = function (offset, len) {
11433 return this.stream.substring(offset, offset + len);
11435 Scanner.prototype.pos = function () {
11436 return this.stream.pos();
11438 Scanner.prototype.goBackTo = function (pos) {
11439 this.stream.goBackTo(pos);
11441 Scanner.prototype.scanUnquotedString = function () {
11442 var offset = this.stream.pos();
11444 if (this._unquotedString(content)) {
11445 return this.finishToken(offset, TokenType.UnquotedString, content.join(''));
11449 Scanner.prototype.scan = function () {
11450 // processes all whitespaces and comments
11451 var triviaToken = this.trivia();
11452 if (triviaToken !== null) {
11453 return triviaToken;
11455 var offset = this.stream.pos();
11456 // End of file/input
11457 if (this.stream.eos()) {
11458 return this.finishToken(offset, TokenType.EOF);
11460 return this.scanNext(offset);
11462 Scanner.prototype.scanNext = function (offset) {
11464 if (this.stream.advanceIfChars([_LAN, _BNG, _MIN, _MIN])) {
11465 return this.finishToken(offset, TokenType.CDO);
11468 if (this.stream.advanceIfChars([_MIN, _MIN, _RAN])) {
11469 return this.finishToken(offset, TokenType.CDC);
11472 if (this.ident(content)) {
11473 return this.finishToken(offset, TokenType.Ident, content.join(''));
11476 if (this.stream.advanceIfChar(_ATS)) {
11478 if (this._name(content)) {
11479 var keywordText = content.join('');
11480 if (keywordText === '@charset') {
11481 return this.finishToken(offset, TokenType.Charset, keywordText);
11483 return this.finishToken(offset, TokenType.AtKeyword, keywordText);
11486 return this.finishToken(offset, TokenType.Delim);
11490 if (this.stream.advanceIfChar(_HSH)) {
11492 if (this._name(content)) {
11493 return this.finishToken(offset, TokenType.Hash, content.join(''));
11496 return this.finishToken(offset, TokenType.Delim);
11500 if (this.stream.advanceIfChar(_BNG)) {
11501 return this.finishToken(offset, TokenType.Exclamation);
11504 if (this._number()) {
11505 var pos = this.stream.pos();
11506 content = [this.stream.substring(offset, pos)];
11507 if (this.stream.advanceIfChar(_PRC)) {
11509 return this.finishToken(offset, TokenType.Percentage);
11511 else if (this.ident(content)) {
11512 var dim = this.stream.substring(pos).toLowerCase();
11513 var tokenType_1 = staticUnitTable[dim];
11514 if (typeof tokenType_1 !== 'undefined') {
11515 // Known dimension 43px
11516 return this.finishToken(offset, tokenType_1, content.join(''));
11519 // Unknown dimension 43ft
11520 return this.finishToken(offset, TokenType.Dimension, content.join(''));
11523 return this.finishToken(offset, TokenType.Num);
11525 // String, BadString
11527 var tokenType = this._string(content);
11528 if (tokenType !== null) {
11529 return this.finishToken(offset, tokenType, content.join(''));
11531 // single character tokens
11532 tokenType = staticTokenTable[this.stream.peekChar()];
11533 if (typeof tokenType !== 'undefined') {
11534 this.stream.advance(1);
11535 return this.finishToken(offset, tokenType);
11538 if (this.stream.peekChar(0) === _TLD && this.stream.peekChar(1) === _EQS) {
11539 this.stream.advance(2);
11540 return this.finishToken(offset, TokenType.Includes);
11543 if (this.stream.peekChar(0) === _PIP && this.stream.peekChar(1) === _EQS) {
11544 this.stream.advance(2);
11545 return this.finishToken(offset, TokenType.Dashmatch);
11547 // Substring operator *=
11548 if (this.stream.peekChar(0) === _MUL && this.stream.peekChar(1) === _EQS) {
11549 this.stream.advance(2);
11550 return this.finishToken(offset, TokenType.SubstringOperator);
11552 // Substring operator ^=
11553 if (this.stream.peekChar(0) === _HAT && this.stream.peekChar(1) === _EQS) {
11554 this.stream.advance(2);
11555 return this.finishToken(offset, TokenType.PrefixOperator);
11557 // Substring operator $=
11558 if (this.stream.peekChar(0) === _DLR && this.stream.peekChar(1) === _EQS) {
11559 this.stream.advance(2);
11560 return this.finishToken(offset, TokenType.SuffixOperator);
11563 this.stream.nextChar();
11564 return this.finishToken(offset, TokenType.Delim);
11566 Scanner.prototype.trivia = function () {
11568 var offset = this.stream.pos();
11569 if (this._whitespace()) {
11570 if (!this.ignoreWhitespace) {
11571 return this.finishToken(offset, TokenType.Whitespace);
11574 else if (this.comment()) {
11575 if (!this.ignoreComment) {
11576 return this.finishToken(offset, TokenType.Comment);
11584 Scanner.prototype.comment = function () {
11585 if (this.stream.advanceIfChars([_FSL, _MUL])) {
11586 var success_1 = false, hot_1 = false;
11587 this.stream.advanceWhileChar(function (ch) {
11588 if (hot_1 && ch === _FSL) {
11592 hot_1 = ch === _MUL;
11596 this.stream.advance(1);
11602 Scanner.prototype._number = function () {
11604 if (this.stream.peekChar() === _DOT) {
11607 ch = this.stream.peekChar(npeek);
11608 if (ch >= _0 && ch <= _9) {
11609 this.stream.advance(npeek + 1);
11610 this.stream.advanceWhileChar(function (ch) {
11611 return ch >= _0 && ch <= _9 || npeek === 0 && ch === _DOT;
11617 Scanner.prototype._newline = function (result) {
11618 var ch = this.stream.peekChar();
11623 this.stream.advance(1);
11624 result.push(String.fromCharCode(ch));
11625 if (ch === _CAR && this.stream.advanceIfChar(_NWL)) {
11632 Scanner.prototype._escape = function (result, includeNewLines) {
11633 var ch = this.stream.peekChar();
11635 this.stream.advance(1);
11636 ch = this.stream.peekChar();
11637 var hexNumCount = 0;
11638 while (hexNumCount < 6 && (ch >= _0 && ch <= _9 || ch >= _a && ch <= _f || ch >= _A && ch <= _F)) {
11639 this.stream.advance(1);
11640 ch = this.stream.peekChar();
11643 if (hexNumCount > 0) {
11645 var hexVal = parseInt(this.stream.substring(this.stream.pos() - hexNumCount), 16);
11647 result.push(String.fromCharCode(hexVal));
11653 // optional whitespace or new line, not part of result text
11654 if (ch === _WSP || ch === _TAB) {
11655 this.stream.advance(1);
11662 if (ch !== _CAR && ch !== _LFD && ch !== _NWL) {
11663 this.stream.advance(1);
11664 result.push(String.fromCharCode(ch));
11667 else if (includeNewLines) {
11668 return this._newline(result);
11673 Scanner.prototype._stringChar = function (closeQuote, result) {
11674 // not closeQuote, not backslash, not newline
11675 var ch = this.stream.peekChar();
11676 if (ch !== 0 && ch !== closeQuote && ch !== _BSL && ch !== _CAR && ch !== _LFD && ch !== _NWL) {
11677 this.stream.advance(1);
11678 result.push(String.fromCharCode(ch));
11683 Scanner.prototype._string = function (result) {
11684 if (this.stream.peekChar() === _SQO || this.stream.peekChar() === _DQO) {
11685 var closeQuote = this.stream.nextChar();
11686 result.push(String.fromCharCode(closeQuote));
11687 while (this._stringChar(closeQuote, result) || this._escape(result, true)) {
11690 if (this.stream.peekChar() === closeQuote) {
11691 this.stream.nextChar();
11692 result.push(String.fromCharCode(closeQuote));
11693 return TokenType.String;
11696 return TokenType.BadString;
11701 Scanner.prototype._unquotedChar = function (result) {
11702 // not closeQuote, not backslash, not newline
11703 var ch = this.stream.peekChar();
11704 if (ch !== 0 && ch !== _BSL && ch !== _SQO && ch !== _DQO && ch !== _LPA && ch !== _RPA && ch !== _WSP && ch !== _TAB && ch !== _NWL && ch !== _LFD && ch !== _CAR) {
11705 this.stream.advance(1);
11706 result.push(String.fromCharCode(ch));
11711 Scanner.prototype._unquotedString = function (result) {
11712 var hasContent = false;
11713 while (this._unquotedChar(result) || this._escape(result)) {
11718 Scanner.prototype._whitespace = function () {
11719 var n = this.stream.advanceWhileChar(function (ch) {
11720 return ch === _WSP || ch === _TAB || ch === _NWL || ch === _LFD || ch === _CAR;
11724 Scanner.prototype._name = function (result) {
11725 var matched = false;
11726 while (this._identChar(result) || this._escape(result)) {
11731 Scanner.prototype.ident = function (result) {
11732 var pos = this.stream.pos();
11733 var hasMinus = this._minus(result);
11734 if (hasMinus && this._minus(result) /* -- */) {
11735 if (this._identFirstChar(result) || this._escape(result)) {
11736 while (this._identChar(result) || this._escape(result)) {
11742 else if (this._identFirstChar(result) || this._escape(result)) {
11743 while (this._identChar(result) || this._escape(result)) {
11748 this.stream.goBackTo(pos);
11751 Scanner.prototype._identFirstChar = function (result) {
11752 var ch = this.stream.peekChar();
11753 if (ch === _USC || // _
11754 ch >= _a && ch <= _z || // a-z
11755 ch >= _A && ch <= _Z || // A-Z
11756 ch >= 0x80 && ch <= 0xFFFF) { // nonascii
11757 this.stream.advance(1);
11758 result.push(String.fromCharCode(ch));
11763 Scanner.prototype._minus = function (result) {
11764 var ch = this.stream.peekChar();
11766 this.stream.advance(1);
11767 result.push(String.fromCharCode(ch));
11772 Scanner.prototype._identChar = function (result) {
11773 var ch = this.stream.peekChar();
11774 if (ch === _USC || // _
11775 ch === _MIN || // -
11776 ch >= _a && ch <= _z || // a-z
11777 ch >= _A && ch <= _Z || // A-Z
11778 ch >= _0 && ch <= _9 || // 0/9
11779 ch >= 0x80 && ch <= 0xFFFF) { // nonascii
11780 this.stream.advance(1);
11781 result.push(String.fromCharCode(ch));
11793 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11795 __webpack_require__.r(__webpack_exports__);
11796 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11797 /* harmony export */ "NodeType": () => /* binding */ NodeType,
11798 /* harmony export */ "ReferenceType": () => /* binding */ ReferenceType,
11799 /* harmony export */ "getNodeAtOffset": () => /* binding */ getNodeAtOffset,
11800 /* harmony export */ "getNodePath": () => /* binding */ getNodePath,
11801 /* harmony export */ "getParentDeclaration": () => /* binding */ getParentDeclaration,
11802 /* harmony export */ "Node": () => /* binding */ Node,
11803 /* harmony export */ "Nodelist": () => /* binding */ Nodelist,
11804 /* harmony export */ "Identifier": () => /* binding */ Identifier,
11805 /* harmony export */ "Stylesheet": () => /* binding */ Stylesheet,
11806 /* harmony export */ "Declarations": () => /* binding */ Declarations,
11807 /* harmony export */ "BodyDeclaration": () => /* binding */ BodyDeclaration,
11808 /* harmony export */ "RuleSet": () => /* binding */ RuleSet,
11809 /* harmony export */ "Selector": () => /* binding */ Selector,
11810 /* harmony export */ "SimpleSelector": () => /* binding */ SimpleSelector,
11811 /* harmony export */ "AtApplyRule": () => /* binding */ AtApplyRule,
11812 /* harmony export */ "AbstractDeclaration": () => /* binding */ AbstractDeclaration,
11813 /* harmony export */ "CustomPropertySet": () => /* binding */ CustomPropertySet,
11814 /* harmony export */ "Declaration": () => /* binding */ Declaration,
11815 /* harmony export */ "CustomPropertyDeclaration": () => /* binding */ CustomPropertyDeclaration,
11816 /* harmony export */ "Property": () => /* binding */ Property,
11817 /* harmony export */ "Invocation": () => /* binding */ Invocation,
11818 /* harmony export */ "Function": () => /* binding */ Function,
11819 /* harmony export */ "FunctionParameter": () => /* binding */ FunctionParameter,
11820 /* harmony export */ "FunctionArgument": () => /* binding */ FunctionArgument,
11821 /* harmony export */ "IfStatement": () => /* binding */ IfStatement,
11822 /* harmony export */ "ForStatement": () => /* binding */ ForStatement,
11823 /* harmony export */ "EachStatement": () => /* binding */ EachStatement,
11824 /* harmony export */ "WhileStatement": () => /* binding */ WhileStatement,
11825 /* harmony export */ "ElseStatement": () => /* binding */ ElseStatement,
11826 /* harmony export */ "FunctionDeclaration": () => /* binding */ FunctionDeclaration,
11827 /* harmony export */ "ViewPort": () => /* binding */ ViewPort,
11828 /* harmony export */ "FontFace": () => /* binding */ FontFace,
11829 /* harmony export */ "NestedProperties": () => /* binding */ NestedProperties,
11830 /* harmony export */ "Keyframe": () => /* binding */ Keyframe,
11831 /* harmony export */ "KeyframeSelector": () => /* binding */ KeyframeSelector,
11832 /* harmony export */ "Import": () => /* binding */ Import,
11833 /* harmony export */ "Use": () => /* binding */ Use,
11834 /* harmony export */ "ModuleConfiguration": () => /* binding */ ModuleConfiguration,
11835 /* harmony export */ "Forward": () => /* binding */ Forward,
11836 /* harmony export */ "ForwardVisibility": () => /* binding */ ForwardVisibility,
11837 /* harmony export */ "Namespace": () => /* binding */ Namespace,
11838 /* harmony export */ "Media": () => /* binding */ Media,
11839 /* harmony export */ "Supports": () => /* binding */ Supports,
11840 /* harmony export */ "Document": () => /* binding */ Document,
11841 /* harmony export */ "Medialist": () => /* binding */ Medialist,
11842 /* harmony export */ "MediaQuery": () => /* binding */ MediaQuery,
11843 /* harmony export */ "SupportsCondition": () => /* binding */ SupportsCondition,
11844 /* harmony export */ "Page": () => /* binding */ Page,
11845 /* harmony export */ "PageBoxMarginBox": () => /* binding */ PageBoxMarginBox,
11846 /* harmony export */ "Expression": () => /* binding */ Expression,
11847 /* harmony export */ "BinaryExpression": () => /* binding */ BinaryExpression,
11848 /* harmony export */ "Term": () => /* binding */ Term,
11849 /* harmony export */ "AttributeSelector": () => /* binding */ AttributeSelector,
11850 /* harmony export */ "Operator": () => /* binding */ Operator,
11851 /* harmony export */ "HexColorValue": () => /* binding */ HexColorValue,
11852 /* harmony export */ "NumericValue": () => /* binding */ NumericValue,
11853 /* harmony export */ "VariableDeclaration": () => /* binding */ VariableDeclaration,
11854 /* harmony export */ "Interpolation": () => /* binding */ Interpolation,
11855 /* harmony export */ "Variable": () => /* binding */ Variable,
11856 /* harmony export */ "ExtendsReference": () => /* binding */ ExtendsReference,
11857 /* harmony export */ "MixinContentReference": () => /* binding */ MixinContentReference,
11858 /* harmony export */ "MixinContentDeclaration": () => /* binding */ MixinContentDeclaration,
11859 /* harmony export */ "MixinReference": () => /* binding */ MixinReference,
11860 /* harmony export */ "MixinDeclaration": () => /* binding */ MixinDeclaration,
11861 /* harmony export */ "UnknownAtRule": () => /* binding */ UnknownAtRule,
11862 /* harmony export */ "ListEntry": () => /* binding */ ListEntry,
11863 /* harmony export */ "LessGuard": () => /* binding */ LessGuard,
11864 /* harmony export */ "GuardCondition": () => /* binding */ GuardCondition,
11865 /* harmony export */ "Module": () => /* binding */ Module,
11866 /* harmony export */ "Level": () => /* binding */ Level,
11867 /* harmony export */ "Marker": () => /* binding */ Marker,
11868 /* harmony export */ "ParseErrorCollector": () => /* binding */ ParseErrorCollector
11869 /* harmony export */ });
11870 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75);
11871 /*---------------------------------------------------------------------------------------------
11872 * Copyright (c) Microsoft Corporation. All rights reserved.
11873 * Licensed under the MIT License. See License.txt in the project root for license information.
11874 *--------------------------------------------------------------------------------------------*/
11876 var __extends = (undefined && undefined.__extends) || (function () {
11877 var extendStatics = function (d, b) {
11878 extendStatics = Object.setPrototypeOf ||
11879 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11880 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11881 return extendStatics(d, b);
11883 return function (d, b) {
11884 extendStatics(d, b);
11885 function __() { this.constructor = d; }
11886 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11891 /// Nodes for the css 2.1 specification. See for reference:
11892 /// http://www.w3.org/TR/CSS21/grammar.html#grammar
11895 (function (NodeType) {
11896 NodeType[NodeType["Undefined"] = 0] = "Undefined";
11897 NodeType[NodeType["Identifier"] = 1] = "Identifier";
11898 NodeType[NodeType["Stylesheet"] = 2] = "Stylesheet";
11899 NodeType[NodeType["Ruleset"] = 3] = "Ruleset";
11900 NodeType[NodeType["Selector"] = 4] = "Selector";
11901 NodeType[NodeType["SimpleSelector"] = 5] = "SimpleSelector";
11902 NodeType[NodeType["SelectorInterpolation"] = 6] = "SelectorInterpolation";
11903 NodeType[NodeType["SelectorCombinator"] = 7] = "SelectorCombinator";
11904 NodeType[NodeType["SelectorCombinatorParent"] = 8] = "SelectorCombinatorParent";
11905 NodeType[NodeType["SelectorCombinatorSibling"] = 9] = "SelectorCombinatorSibling";
11906 NodeType[NodeType["SelectorCombinatorAllSiblings"] = 10] = "SelectorCombinatorAllSiblings";
11907 NodeType[NodeType["SelectorCombinatorShadowPiercingDescendant"] = 11] = "SelectorCombinatorShadowPiercingDescendant";
11908 NodeType[NodeType["Page"] = 12] = "Page";
11909 NodeType[NodeType["PageBoxMarginBox"] = 13] = "PageBoxMarginBox";
11910 NodeType[NodeType["ClassSelector"] = 14] = "ClassSelector";
11911 NodeType[NodeType["IdentifierSelector"] = 15] = "IdentifierSelector";
11912 NodeType[NodeType["ElementNameSelector"] = 16] = "ElementNameSelector";
11913 NodeType[NodeType["PseudoSelector"] = 17] = "PseudoSelector";
11914 NodeType[NodeType["AttributeSelector"] = 18] = "AttributeSelector";
11915 NodeType[NodeType["Declaration"] = 19] = "Declaration";
11916 NodeType[NodeType["Declarations"] = 20] = "Declarations";
11917 NodeType[NodeType["Property"] = 21] = "Property";
11918 NodeType[NodeType["Expression"] = 22] = "Expression";
11919 NodeType[NodeType["BinaryExpression"] = 23] = "BinaryExpression";
11920 NodeType[NodeType["Term"] = 24] = "Term";
11921 NodeType[NodeType["Operator"] = 25] = "Operator";
11922 NodeType[NodeType["Value"] = 26] = "Value";
11923 NodeType[NodeType["StringLiteral"] = 27] = "StringLiteral";
11924 NodeType[NodeType["URILiteral"] = 28] = "URILiteral";
11925 NodeType[NodeType["EscapedValue"] = 29] = "EscapedValue";
11926 NodeType[NodeType["Function"] = 30] = "Function";
11927 NodeType[NodeType["NumericValue"] = 31] = "NumericValue";
11928 NodeType[NodeType["HexColorValue"] = 32] = "HexColorValue";
11929 NodeType[NodeType["MixinDeclaration"] = 33] = "MixinDeclaration";
11930 NodeType[NodeType["MixinReference"] = 34] = "MixinReference";
11931 NodeType[NodeType["VariableName"] = 35] = "VariableName";
11932 NodeType[NodeType["VariableDeclaration"] = 36] = "VariableDeclaration";
11933 NodeType[NodeType["Prio"] = 37] = "Prio";
11934 NodeType[NodeType["Interpolation"] = 38] = "Interpolation";
11935 NodeType[NodeType["NestedProperties"] = 39] = "NestedProperties";
11936 NodeType[NodeType["ExtendsReference"] = 40] = "ExtendsReference";
11937 NodeType[NodeType["SelectorPlaceholder"] = 41] = "SelectorPlaceholder";
11938 NodeType[NodeType["Debug"] = 42] = "Debug";
11939 NodeType[NodeType["If"] = 43] = "If";
11940 NodeType[NodeType["Else"] = 44] = "Else";
11941 NodeType[NodeType["For"] = 45] = "For";
11942 NodeType[NodeType["Each"] = 46] = "Each";
11943 NodeType[NodeType["While"] = 47] = "While";
11944 NodeType[NodeType["MixinContentReference"] = 48] = "MixinContentReference";
11945 NodeType[NodeType["MixinContentDeclaration"] = 49] = "MixinContentDeclaration";
11946 NodeType[NodeType["Media"] = 50] = "Media";
11947 NodeType[NodeType["Keyframe"] = 51] = "Keyframe";
11948 NodeType[NodeType["FontFace"] = 52] = "FontFace";
11949 NodeType[NodeType["Import"] = 53] = "Import";
11950 NodeType[NodeType["Namespace"] = 54] = "Namespace";
11951 NodeType[NodeType["Invocation"] = 55] = "Invocation";
11952 NodeType[NodeType["FunctionDeclaration"] = 56] = "FunctionDeclaration";
11953 NodeType[NodeType["ReturnStatement"] = 57] = "ReturnStatement";
11954 NodeType[NodeType["MediaQuery"] = 58] = "MediaQuery";
11955 NodeType[NodeType["FunctionParameter"] = 59] = "FunctionParameter";
11956 NodeType[NodeType["FunctionArgument"] = 60] = "FunctionArgument";
11957 NodeType[NodeType["KeyframeSelector"] = 61] = "KeyframeSelector";
11958 NodeType[NodeType["ViewPort"] = 62] = "ViewPort";
11959 NodeType[NodeType["Document"] = 63] = "Document";
11960 NodeType[NodeType["AtApplyRule"] = 64] = "AtApplyRule";
11961 NodeType[NodeType["CustomPropertyDeclaration"] = 65] = "CustomPropertyDeclaration";
11962 NodeType[NodeType["CustomPropertySet"] = 66] = "CustomPropertySet";
11963 NodeType[NodeType["ListEntry"] = 67] = "ListEntry";
11964 NodeType[NodeType["Supports"] = 68] = "Supports";
11965 NodeType[NodeType["SupportsCondition"] = 69] = "SupportsCondition";
11966 NodeType[NodeType["NamespacePrefix"] = 70] = "NamespacePrefix";
11967 NodeType[NodeType["GridLine"] = 71] = "GridLine";
11968 NodeType[NodeType["Plugin"] = 72] = "Plugin";
11969 NodeType[NodeType["UnknownAtRule"] = 73] = "UnknownAtRule";
11970 NodeType[NodeType["Use"] = 74] = "Use";
11971 NodeType[NodeType["ModuleConfiguration"] = 75] = "ModuleConfiguration";
11972 NodeType[NodeType["Forward"] = 76] = "Forward";
11973 NodeType[NodeType["ForwardVisibility"] = 77] = "ForwardVisibility";
11974 NodeType[NodeType["Module"] = 78] = "Module";
11975 })(NodeType || (NodeType = {}));
11977 (function (ReferenceType) {
11978 ReferenceType[ReferenceType["Mixin"] = 0] = "Mixin";
11979 ReferenceType[ReferenceType["Rule"] = 1] = "Rule";
11980 ReferenceType[ReferenceType["Variable"] = 2] = "Variable";
11981 ReferenceType[ReferenceType["Function"] = 3] = "Function";
11982 ReferenceType[ReferenceType["Keyframe"] = 4] = "Keyframe";
11983 ReferenceType[ReferenceType["Unknown"] = 5] = "Unknown";
11984 ReferenceType[ReferenceType["Module"] = 6] = "Module";
11985 ReferenceType[ReferenceType["Forward"] = 7] = "Forward";
11986 ReferenceType[ReferenceType["ForwardVisibility"] = 8] = "ForwardVisibility";
11987 })(ReferenceType || (ReferenceType = {}));
11988 function getNodeAtOffset(node, offset) {
11989 var candidate = null;
11990 if (!node || offset < node.offset || offset > node.end) {
11993 // Find the shortest node at the position
11994 node.accept(function (node) {
11995 if (node.offset === -1 && node.length === -1) {
11998 if (node.offset <= offset && node.end >= offset) {
12002 else if (node.length <= candidate.length) {
12011 function getNodePath(node, offset) {
12012 var candidate = getNodeAtOffset(node, offset);
12014 while (candidate) {
12015 path.unshift(candidate);
12016 candidate = candidate.parent;
12020 function getParentDeclaration(node) {
12021 var decl = node.findParent(NodeType.Declaration);
12022 var value = decl && decl.getValue();
12023 if (value && value.encloses(node)) {
12028 var Node = /** @class */ (function () {
12029 function Node(offset, len, nodeType) {
12030 if (offset === void 0) { offset = -1; }
12031 if (len === void 0) { len = -1; }
12032 this.parent = null;
12033 this.offset = offset;
12036 this.nodeType = nodeType;
12039 Object.defineProperty(Node.prototype, "end", {
12040 get: function () { return this.offset + this.length; },
12044 Object.defineProperty(Node.prototype, "type", {
12046 return this.nodeType || NodeType.Undefined;
12048 set: function (type) {
12049 this.nodeType = type;
12054 Node.prototype.getTextProvider = function () {
12056 while (node && !node.textProvider) {
12057 node = node.parent;
12060 return node.textProvider;
12062 return function () { return 'unknown'; };
12064 Node.prototype.getText = function () {
12065 return this.getTextProvider()(this.offset, this.length);
12067 Node.prototype.matches = function (str) {
12068 return this.length === str.length && this.getTextProvider()(this.offset, this.length) === str;
12070 Node.prototype.startsWith = function (str) {
12071 return this.length >= str.length && this.getTextProvider()(this.offset, str.length) === str;
12073 Node.prototype.endsWith = function (str) {
12074 return this.length >= str.length && this.getTextProvider()(this.end - str.length, str.length) === str;
12076 Node.prototype.accept = function (visitor) {
12077 if (visitor(this) && this.children) {
12078 for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
12079 var child = _a[_i];
12080 child.accept(visitor);
12084 Node.prototype.acceptVisitor = function (visitor) {
12085 this.accept(visitor.visitNode.bind(visitor));
12087 Node.prototype.adoptChild = function (node, index) {
12088 if (index === void 0) { index = -1; }
12089 if (node.parent && node.parent.children) {
12090 var idx = node.parent.children.indexOf(node);
12092 node.parent.children.splice(idx, 1);
12095 node.parent = this;
12096 var children = this.children;
12098 children = this.children = [];
12100 if (index !== -1) {
12101 children.splice(index, 0, node);
12104 children.push(node);
12108 Node.prototype.attachTo = function (parent, index) {
12109 if (index === void 0) { index = -1; }
12111 parent.adoptChild(this, index);
12115 Node.prototype.collectIssues = function (results) {
12117 results.push.apply(results, this.issues);
12120 Node.prototype.addIssue = function (issue) {
12121 if (!this.issues) {
12124 this.issues.push(issue);
12126 Node.prototype.hasIssue = function (rule) {
12127 return Array.isArray(this.issues) && this.issues.some(function (i) { return i.getRule() === rule; });
12129 Node.prototype.isErroneous = function (recursive) {
12130 if (recursive === void 0) { recursive = false; }
12131 if (this.issues && this.issues.length > 0) {
12134 return recursive && Array.isArray(this.children) && this.children.some(function (c) { return c.isErroneous(true); });
12136 Node.prototype.setNode = function (field, node, index) {
12137 if (index === void 0) { index = -1; }
12139 node.attachTo(this, index);
12140 this[field] = node;
12145 Node.prototype.addChild = function (node) {
12147 if (!this.children) {
12148 this.children = [];
12150 node.attachTo(this);
12151 this.updateOffsetAndLength(node);
12156 Node.prototype.updateOffsetAndLength = function (node) {
12157 if (node.offset < this.offset || this.offset === -1) {
12158 this.offset = node.offset;
12160 var nodeEnd = node.end;
12161 if ((nodeEnd > this.end) || this.length === -1) {
12162 this.length = nodeEnd - this.offset;
12165 Node.prototype.hasChildren = function () {
12166 return !!this.children && this.children.length > 0;
12168 Node.prototype.getChildren = function () {
12169 return this.children ? this.children.slice(0) : [];
12171 Node.prototype.getChild = function (index) {
12172 if (this.children && index < this.children.length) {
12173 return this.children[index];
12177 Node.prototype.addChildren = function (nodes) {
12178 for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
12179 var node = nodes_1[_i];
12180 this.addChild(node);
12183 Node.prototype.findFirstChildBeforeOffset = function (offset) {
12184 if (this.children) {
12185 var current = null;
12186 for (var i = this.children.length - 1; i >= 0; i--) {
12187 // iterate until we find a child that has a start offset smaller than the input offset
12188 current = this.children[i];
12189 if (current.offset <= offset) {
12196 Node.prototype.findChildAtOffset = function (offset, goDeep) {
12197 var current = this.findFirstChildBeforeOffset(offset);
12198 if (current && current.end >= offset) {
12200 return current.findChildAtOffset(offset, true) || current;
12206 Node.prototype.encloses = function (candidate) {
12207 return this.offset <= candidate.offset && this.offset + this.length >= candidate.offset + candidate.length;
12209 Node.prototype.getParent = function () {
12210 var result = this.parent;
12211 while (result instanceof Nodelist) {
12212 result = result.parent;
12216 Node.prototype.findParent = function (type) {
12218 while (result && result.type !== type) {
12219 result = result.parent;
12223 Node.prototype.findAParent = function () {
12225 for (var _i = 0; _i < arguments.length; _i++) {
12226 types[_i] = arguments[_i];
12229 while (result && !types.some(function (t) { return result.type === t; })) {
12230 result = result.parent;
12234 Node.prototype.setData = function (key, value) {
12235 if (!this.options) {
12238 this.options[key] = value;
12240 Node.prototype.getData = function (key) {
12241 if (!this.options || !this.options.hasOwnProperty(key)) {
12244 return this.options[key];
12249 var Nodelist = /** @class */ (function (_super) {
12250 __extends(Nodelist, _super);
12251 function Nodelist(parent, index) {
12252 if (index === void 0) { index = -1; }
12253 var _this = _super.call(this, -1, -1) || this;
12254 _this.attachTo(parent, index);
12262 var Identifier = /** @class */ (function (_super) {
12263 __extends(Identifier, _super);
12264 function Identifier(offset, length) {
12265 var _this = _super.call(this, offset, length) || this;
12266 _this.isCustomProperty = false;
12269 Object.defineProperty(Identifier.prototype, "type", {
12271 return NodeType.Identifier;
12276 Identifier.prototype.containsInterpolation = function () {
12277 return this.hasChildren();
12282 var Stylesheet = /** @class */ (function (_super) {
12283 __extends(Stylesheet, _super);
12284 function Stylesheet(offset, length) {
12285 return _super.call(this, offset, length) || this;
12287 Object.defineProperty(Stylesheet.prototype, "type", {
12289 return NodeType.Stylesheet;
12297 var Declarations = /** @class */ (function (_super) {
12298 __extends(Declarations, _super);
12299 function Declarations(offset, length) {
12300 return _super.call(this, offset, length) || this;
12302 Object.defineProperty(Declarations.prototype, "type", {
12304 return NodeType.Declarations;
12309 return Declarations;
12312 var BodyDeclaration = /** @class */ (function (_super) {
12313 __extends(BodyDeclaration, _super);
12314 function BodyDeclaration(offset, length) {
12315 return _super.call(this, offset, length) || this;
12317 BodyDeclaration.prototype.getDeclarations = function () {
12318 return this.declarations;
12320 BodyDeclaration.prototype.setDeclarations = function (decls) {
12321 return this.setNode('declarations', decls);
12323 return BodyDeclaration;
12326 var RuleSet = /** @class */ (function (_super) {
12327 __extends(RuleSet, _super);
12328 function RuleSet(offset, length) {
12329 return _super.call(this, offset, length) || this;
12331 Object.defineProperty(RuleSet.prototype, "type", {
12333 return NodeType.Ruleset;
12338 RuleSet.prototype.getSelectors = function () {
12339 if (!this.selectors) {
12340 this.selectors = new Nodelist(this);
12342 return this.selectors;
12344 RuleSet.prototype.isNested = function () {
12345 return !!this.parent && this.parent.findParent(NodeType.Declarations) !== null;
12348 }(BodyDeclaration));
12350 var Selector = /** @class */ (function (_super) {
12351 __extends(Selector, _super);
12352 function Selector(offset, length) {
12353 return _super.call(this, offset, length) || this;
12355 Object.defineProperty(Selector.prototype, "type", {
12357 return NodeType.Selector;
12365 var SimpleSelector = /** @class */ (function (_super) {
12366 __extends(SimpleSelector, _super);
12367 function SimpleSelector(offset, length) {
12368 return _super.call(this, offset, length) || this;
12370 Object.defineProperty(SimpleSelector.prototype, "type", {
12372 return NodeType.SimpleSelector;
12377 return SimpleSelector;
12380 var AtApplyRule = /** @class */ (function (_super) {
12381 __extends(AtApplyRule, _super);
12382 function AtApplyRule(offset, length) {
12383 return _super.call(this, offset, length) || this;
12385 Object.defineProperty(AtApplyRule.prototype, "type", {
12387 return NodeType.AtApplyRule;
12392 AtApplyRule.prototype.setIdentifier = function (node) {
12393 return this.setNode('identifier', node, 0);
12395 AtApplyRule.prototype.getIdentifier = function () {
12396 return this.identifier;
12398 AtApplyRule.prototype.getName = function () {
12399 return this.identifier ? this.identifier.getText() : '';
12401 return AtApplyRule;
12404 var AbstractDeclaration = /** @class */ (function (_super) {
12405 __extends(AbstractDeclaration, _super);
12406 function AbstractDeclaration(offset, length) {
12407 return _super.call(this, offset, length) || this;
12409 return AbstractDeclaration;
12412 var CustomPropertySet = /** @class */ (function (_super) {
12413 __extends(CustomPropertySet, _super);
12414 function CustomPropertySet(offset, length) {
12415 return _super.call(this, offset, length) || this;
12417 Object.defineProperty(CustomPropertySet.prototype, "type", {
12419 return NodeType.CustomPropertySet;
12424 return CustomPropertySet;
12425 }(BodyDeclaration));
12427 var Declaration = /** @class */ (function (_super) {
12428 __extends(Declaration, _super);
12429 function Declaration(offset, length) {
12430 var _this = _super.call(this, offset, length) || this;
12431 _this.property = null;
12434 Object.defineProperty(Declaration.prototype, "type", {
12436 return NodeType.Declaration;
12441 Declaration.prototype.setProperty = function (node) {
12442 return this.setNode('property', node);
12444 Declaration.prototype.getProperty = function () {
12445 return this.property;
12447 Declaration.prototype.getFullPropertyName = function () {
12448 var propertyName = this.property ? this.property.getName() : 'unknown';
12449 if (this.parent instanceof Declarations && this.parent.getParent() instanceof NestedProperties) {
12450 var parentDecl = this.parent.getParent().getParent();
12451 if (parentDecl instanceof Declaration) {
12452 return parentDecl.getFullPropertyName() + propertyName;
12455 return propertyName;
12457 Declaration.prototype.getNonPrefixedPropertyName = function () {
12458 var propertyName = this.getFullPropertyName();
12459 if (propertyName && propertyName.charAt(0) === '-') {
12460 var vendorPrefixEnd = propertyName.indexOf('-', 1);
12461 if (vendorPrefixEnd !== -1) {
12462 return propertyName.substring(vendorPrefixEnd + 1);
12465 return propertyName;
12467 Declaration.prototype.setValue = function (value) {
12468 return this.setNode('value', value);
12470 Declaration.prototype.getValue = function () {
12473 Declaration.prototype.setNestedProperties = function (value) {
12474 return this.setNode('nestedProperties', value);
12476 Declaration.prototype.getNestedProperties = function () {
12477 return this.nestedProperties;
12479 return Declaration;
12480 }(AbstractDeclaration));
12482 var CustomPropertyDeclaration = /** @class */ (function (_super) {
12483 __extends(CustomPropertyDeclaration, _super);
12484 function CustomPropertyDeclaration(offset, length) {
12485 return _super.call(this, offset, length) || this;
12487 Object.defineProperty(CustomPropertyDeclaration.prototype, "type", {
12489 return NodeType.CustomPropertyDeclaration;
12494 CustomPropertyDeclaration.prototype.setPropertySet = function (value) {
12495 return this.setNode('propertySet', value);
12497 CustomPropertyDeclaration.prototype.getPropertySet = function () {
12498 return this.propertySet;
12500 return CustomPropertyDeclaration;
12503 var Property = /** @class */ (function (_super) {
12504 __extends(Property, _super);
12505 function Property(offset, length) {
12506 return _super.call(this, offset, length) || this;
12508 Object.defineProperty(Property.prototype, "type", {
12510 return NodeType.Property;
12515 Property.prototype.setIdentifier = function (value) {
12516 return this.setNode('identifier', value);
12518 Property.prototype.getIdentifier = function () {
12519 return this.identifier;
12521 Property.prototype.getName = function () {
12522 return (0,_utils_strings__WEBPACK_IMPORTED_MODULE_0__.trim)(this.getText(), /[_\+]+$/); /* +_: less merge */
12524 Property.prototype.isCustomProperty = function () {
12525 return !!this.identifier && this.identifier.isCustomProperty;
12530 var Invocation = /** @class */ (function (_super) {
12531 __extends(Invocation, _super);
12532 function Invocation(offset, length) {
12533 return _super.call(this, offset, length) || this;
12535 Object.defineProperty(Invocation.prototype, "type", {
12537 return NodeType.Invocation;
12542 Invocation.prototype.getArguments = function () {
12543 if (!this.arguments) {
12544 this.arguments = new Nodelist(this);
12546 return this.arguments;
12551 var Function = /** @class */ (function (_super) {
12552 __extends(Function, _super);
12553 function Function(offset, length) {
12554 return _super.call(this, offset, length) || this;
12556 Object.defineProperty(Function.prototype, "type", {
12558 return NodeType.Function;
12563 Function.prototype.setIdentifier = function (node) {
12564 return this.setNode('identifier', node, 0);
12566 Function.prototype.getIdentifier = function () {
12567 return this.identifier;
12569 Function.prototype.getName = function () {
12570 return this.identifier ? this.identifier.getText() : '';
12575 var FunctionParameter = /** @class */ (function (_super) {
12576 __extends(FunctionParameter, _super);
12577 function FunctionParameter(offset, length) {
12578 return _super.call(this, offset, length) || this;
12580 Object.defineProperty(FunctionParameter.prototype, "type", {
12582 return NodeType.FunctionParameter;
12587 FunctionParameter.prototype.setIdentifier = function (node) {
12588 return this.setNode('identifier', node, 0);
12590 FunctionParameter.prototype.getIdentifier = function () {
12591 return this.identifier;
12593 FunctionParameter.prototype.getName = function () {
12594 return this.identifier ? this.identifier.getText() : '';
12596 FunctionParameter.prototype.setDefaultValue = function (node) {
12597 return this.setNode('defaultValue', node, 0);
12599 FunctionParameter.prototype.getDefaultValue = function () {
12600 return this.defaultValue;
12602 return FunctionParameter;
12605 var FunctionArgument = /** @class */ (function (_super) {
12606 __extends(FunctionArgument, _super);
12607 function FunctionArgument(offset, length) {
12608 return _super.call(this, offset, length) || this;
12610 Object.defineProperty(FunctionArgument.prototype, "type", {
12612 return NodeType.FunctionArgument;
12617 FunctionArgument.prototype.setIdentifier = function (node) {
12618 return this.setNode('identifier', node, 0);
12620 FunctionArgument.prototype.getIdentifier = function () {
12621 return this.identifier;
12623 FunctionArgument.prototype.getName = function () {
12624 return this.identifier ? this.identifier.getText() : '';
12626 FunctionArgument.prototype.setValue = function (node) {
12627 return this.setNode('value', node, 0);
12629 FunctionArgument.prototype.getValue = function () {
12632 return FunctionArgument;
12635 var IfStatement = /** @class */ (function (_super) {
12636 __extends(IfStatement, _super);
12637 function IfStatement(offset, length) {
12638 return _super.call(this, offset, length) || this;
12640 Object.defineProperty(IfStatement.prototype, "type", {
12642 return NodeType.If;
12647 IfStatement.prototype.setExpression = function (node) {
12648 return this.setNode('expression', node, 0);
12650 IfStatement.prototype.setElseClause = function (elseClause) {
12651 return this.setNode('elseClause', elseClause);
12653 return IfStatement;
12654 }(BodyDeclaration));
12656 var ForStatement = /** @class */ (function (_super) {
12657 __extends(ForStatement, _super);
12658 function ForStatement(offset, length) {
12659 return _super.call(this, offset, length) || this;
12661 Object.defineProperty(ForStatement.prototype, "type", {
12663 return NodeType.For;
12668 ForStatement.prototype.setVariable = function (node) {
12669 return this.setNode('variable', node, 0);
12671 return ForStatement;
12672 }(BodyDeclaration));
12674 var EachStatement = /** @class */ (function (_super) {
12675 __extends(EachStatement, _super);
12676 function EachStatement(offset, length) {
12677 return _super.call(this, offset, length) || this;
12679 Object.defineProperty(EachStatement.prototype, "type", {
12681 return NodeType.Each;
12686 EachStatement.prototype.getVariables = function () {
12687 if (!this.variables) {
12688 this.variables = new Nodelist(this);
12690 return this.variables;
12692 return EachStatement;
12693 }(BodyDeclaration));
12695 var WhileStatement = /** @class */ (function (_super) {
12696 __extends(WhileStatement, _super);
12697 function WhileStatement(offset, length) {
12698 return _super.call(this, offset, length) || this;
12700 Object.defineProperty(WhileStatement.prototype, "type", {
12702 return NodeType.While;
12707 return WhileStatement;
12708 }(BodyDeclaration));
12710 var ElseStatement = /** @class */ (function (_super) {
12711 __extends(ElseStatement, _super);
12712 function ElseStatement(offset, length) {
12713 return _super.call(this, offset, length) || this;
12715 Object.defineProperty(ElseStatement.prototype, "type", {
12717 return NodeType.Else;
12722 return ElseStatement;
12723 }(BodyDeclaration));
12725 var FunctionDeclaration = /** @class */ (function (_super) {
12726 __extends(FunctionDeclaration, _super);
12727 function FunctionDeclaration(offset, length) {
12728 return _super.call(this, offset, length) || this;
12730 Object.defineProperty(FunctionDeclaration.prototype, "type", {
12732 return NodeType.FunctionDeclaration;
12737 FunctionDeclaration.prototype.setIdentifier = function (node) {
12738 return this.setNode('identifier', node, 0);
12740 FunctionDeclaration.prototype.getIdentifier = function () {
12741 return this.identifier;
12743 FunctionDeclaration.prototype.getName = function () {
12744 return this.identifier ? this.identifier.getText() : '';
12746 FunctionDeclaration.prototype.getParameters = function () {
12747 if (!this.parameters) {
12748 this.parameters = new Nodelist(this);
12750 return this.parameters;
12752 return FunctionDeclaration;
12753 }(BodyDeclaration));
12755 var ViewPort = /** @class */ (function (_super) {
12756 __extends(ViewPort, _super);
12757 function ViewPort(offset, length) {
12758 return _super.call(this, offset, length) || this;
12760 Object.defineProperty(ViewPort.prototype, "type", {
12762 return NodeType.ViewPort;
12768 }(BodyDeclaration));
12770 var FontFace = /** @class */ (function (_super) {
12771 __extends(FontFace, _super);
12772 function FontFace(offset, length) {
12773 return _super.call(this, offset, length) || this;
12775 Object.defineProperty(FontFace.prototype, "type", {
12777 return NodeType.FontFace;
12783 }(BodyDeclaration));
12785 var NestedProperties = /** @class */ (function (_super) {
12786 __extends(NestedProperties, _super);
12787 function NestedProperties(offset, length) {
12788 return _super.call(this, offset, length) || this;
12790 Object.defineProperty(NestedProperties.prototype, "type", {
12792 return NodeType.NestedProperties;
12797 return NestedProperties;
12798 }(BodyDeclaration));
12800 var Keyframe = /** @class */ (function (_super) {
12801 __extends(Keyframe, _super);
12802 function Keyframe(offset, length) {
12803 return _super.call(this, offset, length) || this;
12805 Object.defineProperty(Keyframe.prototype, "type", {
12807 return NodeType.Keyframe;
12812 Keyframe.prototype.setKeyword = function (keyword) {
12813 return this.setNode('keyword', keyword, 0);
12815 Keyframe.prototype.getKeyword = function () {
12816 return this.keyword;
12818 Keyframe.prototype.setIdentifier = function (node) {
12819 return this.setNode('identifier', node, 0);
12821 Keyframe.prototype.getIdentifier = function () {
12822 return this.identifier;
12824 Keyframe.prototype.getName = function () {
12825 return this.identifier ? this.identifier.getText() : '';
12828 }(BodyDeclaration));
12830 var KeyframeSelector = /** @class */ (function (_super) {
12831 __extends(KeyframeSelector, _super);
12832 function KeyframeSelector(offset, length) {
12833 return _super.call(this, offset, length) || this;
12835 Object.defineProperty(KeyframeSelector.prototype, "type", {
12837 return NodeType.KeyframeSelector;
12842 return KeyframeSelector;
12843 }(BodyDeclaration));
12845 var Import = /** @class */ (function (_super) {
12846 __extends(Import, _super);
12847 function Import(offset, length) {
12848 return _super.call(this, offset, length) || this;
12850 Object.defineProperty(Import.prototype, "type", {
12852 return NodeType.Import;
12857 Import.prototype.setMedialist = function (node) {
12859 node.attachTo(this);
12867 var Use = /** @class */ (function (_super) {
12868 __extends(Use, _super);
12870 return _super !== null && _super.apply(this, arguments) || this;
12872 Object.defineProperty(Use.prototype, "type", {
12874 return NodeType.Use;
12879 Use.prototype.getParameters = function () {
12880 if (!this.parameters) {
12881 this.parameters = new Nodelist(this);
12883 return this.parameters;
12885 Use.prototype.setIdentifier = function (node) {
12886 return this.setNode('identifier', node, 0);
12888 Use.prototype.getIdentifier = function () {
12889 return this.identifier;
12894 var ModuleConfiguration = /** @class */ (function (_super) {
12895 __extends(ModuleConfiguration, _super);
12896 function ModuleConfiguration() {
12897 return _super !== null && _super.apply(this, arguments) || this;
12899 Object.defineProperty(ModuleConfiguration.prototype, "type", {
12901 return NodeType.ModuleConfiguration;
12906 ModuleConfiguration.prototype.setIdentifier = function (node) {
12907 return this.setNode('identifier', node, 0);
12909 ModuleConfiguration.prototype.getIdentifier = function () {
12910 return this.identifier;
12912 ModuleConfiguration.prototype.getName = function () {
12913 return this.identifier ? this.identifier.getText() : '';
12915 ModuleConfiguration.prototype.setValue = function (node) {
12916 return this.setNode('value', node, 0);
12918 ModuleConfiguration.prototype.getValue = function () {
12921 return ModuleConfiguration;
12924 var Forward = /** @class */ (function (_super) {
12925 __extends(Forward, _super);
12926 function Forward() {
12927 return _super !== null && _super.apply(this, arguments) || this;
12929 Object.defineProperty(Forward.prototype, "type", {
12931 return NodeType.Forward;
12936 Forward.prototype.setIdentifier = function (node) {
12937 return this.setNode('identifier', node, 0);
12939 Forward.prototype.getIdentifier = function () {
12940 return this.identifier;
12942 Forward.prototype.getMembers = function () {
12943 if (!this.members) {
12944 this.members = new Nodelist(this);
12946 return this.members;
12948 Forward.prototype.getParameters = function () {
12949 if (!this.parameters) {
12950 this.parameters = new Nodelist(this);
12952 return this.parameters;
12957 var ForwardVisibility = /** @class */ (function (_super) {
12958 __extends(ForwardVisibility, _super);
12959 function ForwardVisibility() {
12960 return _super !== null && _super.apply(this, arguments) || this;
12962 Object.defineProperty(ForwardVisibility.prototype, "type", {
12964 return NodeType.ForwardVisibility;
12969 ForwardVisibility.prototype.setIdentifier = function (node) {
12970 return this.setNode('identifier', node, 0);
12972 ForwardVisibility.prototype.getIdentifier = function () {
12973 return this.identifier;
12975 return ForwardVisibility;
12978 var Namespace = /** @class */ (function (_super) {
12979 __extends(Namespace, _super);
12980 function Namespace(offset, length) {
12981 return _super.call(this, offset, length) || this;
12983 Object.defineProperty(Namespace.prototype, "type", {
12985 return NodeType.Namespace;
12993 var Media = /** @class */ (function (_super) {
12994 __extends(Media, _super);
12995 function Media(offset, length) {
12996 return _super.call(this, offset, length) || this;
12998 Object.defineProperty(Media.prototype, "type", {
13000 return NodeType.Media;
13006 }(BodyDeclaration));
13008 var Supports = /** @class */ (function (_super) {
13009 __extends(Supports, _super);
13010 function Supports(offset, length) {
13011 return _super.call(this, offset, length) || this;
13013 Object.defineProperty(Supports.prototype, "type", {
13015 return NodeType.Supports;
13021 }(BodyDeclaration));
13023 var Document = /** @class */ (function (_super) {
13024 __extends(Document, _super);
13025 function Document(offset, length) {
13026 return _super.call(this, offset, length) || this;
13028 Object.defineProperty(Document.prototype, "type", {
13030 return NodeType.Document;
13036 }(BodyDeclaration));
13038 var Medialist = /** @class */ (function (_super) {
13039 __extends(Medialist, _super);
13040 function Medialist(offset, length) {
13041 return _super.call(this, offset, length) || this;
13043 Medialist.prototype.getMediums = function () {
13044 if (!this.mediums) {
13045 this.mediums = new Nodelist(this);
13047 return this.mediums;
13052 var MediaQuery = /** @class */ (function (_super) {
13053 __extends(MediaQuery, _super);
13054 function MediaQuery(offset, length) {
13055 return _super.call(this, offset, length) || this;
13057 Object.defineProperty(MediaQuery.prototype, "type", {
13059 return NodeType.MediaQuery;
13067 var SupportsCondition = /** @class */ (function (_super) {
13068 __extends(SupportsCondition, _super);
13069 function SupportsCondition(offset, length) {
13070 return _super.call(this, offset, length) || this;
13072 Object.defineProperty(SupportsCondition.prototype, "type", {
13074 return NodeType.SupportsCondition;
13079 return SupportsCondition;
13082 var Page = /** @class */ (function (_super) {
13083 __extends(Page, _super);
13084 function Page(offset, length) {
13085 return _super.call(this, offset, length) || this;
13087 Object.defineProperty(Page.prototype, "type", {
13089 return NodeType.Page;
13095 }(BodyDeclaration));
13097 var PageBoxMarginBox = /** @class */ (function (_super) {
13098 __extends(PageBoxMarginBox, _super);
13099 function PageBoxMarginBox(offset, length) {
13100 return _super.call(this, offset, length) || this;
13102 Object.defineProperty(PageBoxMarginBox.prototype, "type", {
13104 return NodeType.PageBoxMarginBox;
13109 return PageBoxMarginBox;
13110 }(BodyDeclaration));
13112 var Expression = /** @class */ (function (_super) {
13113 __extends(Expression, _super);
13114 function Expression(offset, length) {
13115 return _super.call(this, offset, length) || this;
13117 Object.defineProperty(Expression.prototype, "type", {
13119 return NodeType.Expression;
13127 var BinaryExpression = /** @class */ (function (_super) {
13128 __extends(BinaryExpression, _super);
13129 function BinaryExpression(offset, length) {
13130 return _super.call(this, offset, length) || this;
13132 Object.defineProperty(BinaryExpression.prototype, "type", {
13134 return NodeType.BinaryExpression;
13139 BinaryExpression.prototype.setLeft = function (left) {
13140 return this.setNode('left', left);
13142 BinaryExpression.prototype.getLeft = function () {
13145 BinaryExpression.prototype.setRight = function (right) {
13146 return this.setNode('right', right);
13148 BinaryExpression.prototype.getRight = function () {
13151 BinaryExpression.prototype.setOperator = function (value) {
13152 return this.setNode('operator', value);
13154 BinaryExpression.prototype.getOperator = function () {
13155 return this.operator;
13157 return BinaryExpression;
13160 var Term = /** @class */ (function (_super) {
13161 __extends(Term, _super);
13162 function Term(offset, length) {
13163 return _super.call(this, offset, length) || this;
13165 Object.defineProperty(Term.prototype, "type", {
13167 return NodeType.Term;
13172 Term.prototype.setOperator = function (value) {
13173 return this.setNode('operator', value);
13175 Term.prototype.getOperator = function () {
13176 return this.operator;
13178 Term.prototype.setExpression = function (value) {
13179 return this.setNode('expression', value);
13181 Term.prototype.getExpression = function () {
13182 return this.expression;
13187 var AttributeSelector = /** @class */ (function (_super) {
13188 __extends(AttributeSelector, _super);
13189 function AttributeSelector(offset, length) {
13190 return _super.call(this, offset, length) || this;
13192 Object.defineProperty(AttributeSelector.prototype, "type", {
13194 return NodeType.AttributeSelector;
13199 AttributeSelector.prototype.setNamespacePrefix = function (value) {
13200 return this.setNode('namespacePrefix', value);
13202 AttributeSelector.prototype.getNamespacePrefix = function () {
13203 return this.namespacePrefix;
13205 AttributeSelector.prototype.setIdentifier = function (value) {
13206 return this.setNode('identifier', value);
13208 AttributeSelector.prototype.getIdentifier = function () {
13209 return this.identifier;
13211 AttributeSelector.prototype.setOperator = function (operator) {
13212 return this.setNode('operator', operator);
13214 AttributeSelector.prototype.getOperator = function () {
13215 return this.operator;
13217 AttributeSelector.prototype.setValue = function (value) {
13218 return this.setNode('value', value);
13220 AttributeSelector.prototype.getValue = function () {
13223 return AttributeSelector;
13226 var Operator = /** @class */ (function (_super) {
13227 __extends(Operator, _super);
13228 function Operator(offset, length) {
13229 return _super.call(this, offset, length) || this;
13231 Object.defineProperty(Operator.prototype, "type", {
13233 return NodeType.Operator;
13241 var HexColorValue = /** @class */ (function (_super) {
13242 __extends(HexColorValue, _super);
13243 function HexColorValue(offset, length) {
13244 return _super.call(this, offset, length) || this;
13246 Object.defineProperty(HexColorValue.prototype, "type", {
13248 return NodeType.HexColorValue;
13253 return HexColorValue;
13256 var _dot = '.'.charCodeAt(0), _0 = '0'.charCodeAt(0), _9 = '9'.charCodeAt(0);
13257 var NumericValue = /** @class */ (function (_super) {
13258 __extends(NumericValue, _super);
13259 function NumericValue(offset, length) {
13260 return _super.call(this, offset, length) || this;
13262 Object.defineProperty(NumericValue.prototype, "type", {
13264 return NodeType.NumericValue;
13269 NumericValue.prototype.getValue = function () {
13270 var raw = this.getText();
13273 for (var i = 0, len = raw.length; i < len; i++) {
13274 code = raw.charCodeAt(i);
13275 if (!(_0 <= code && code <= _9 || code === _dot)) {
13281 value: raw.substring(0, unitIdx),
13282 unit: unitIdx < raw.length ? raw.substring(unitIdx) : undefined
13285 return NumericValue;
13288 var VariableDeclaration = /** @class */ (function (_super) {
13289 __extends(VariableDeclaration, _super);
13290 function VariableDeclaration(offset, length) {
13291 var _this = _super.call(this, offset, length) || this;
13292 _this.variable = null;
13293 _this.value = null;
13294 _this.needsSemicolon = true;
13297 Object.defineProperty(VariableDeclaration.prototype, "type", {
13299 return NodeType.VariableDeclaration;
13304 VariableDeclaration.prototype.setVariable = function (node) {
13306 node.attachTo(this);
13307 this.variable = node;
13312 VariableDeclaration.prototype.getVariable = function () {
13313 return this.variable;
13315 VariableDeclaration.prototype.getName = function () {
13316 return this.variable ? this.variable.getName() : '';
13318 VariableDeclaration.prototype.setValue = function (node) {
13320 node.attachTo(this);
13326 VariableDeclaration.prototype.getValue = function () {
13329 return VariableDeclaration;
13330 }(AbstractDeclaration));
13332 var Interpolation = /** @class */ (function (_super) {
13333 __extends(Interpolation, _super);
13334 // private _interpolations: void; // workaround for https://github.com/Microsoft/TypeScript/issues/18276
13335 function Interpolation(offset, length) {
13336 return _super.call(this, offset, length) || this;
13338 Object.defineProperty(Interpolation.prototype, "type", {
13340 return NodeType.Interpolation;
13345 return Interpolation;
13348 var Variable = /** @class */ (function (_super) {
13349 __extends(Variable, _super);
13350 function Variable(offset, length) {
13351 return _super.call(this, offset, length) || this;
13353 Object.defineProperty(Variable.prototype, "type", {
13355 return NodeType.VariableName;
13360 Variable.prototype.getName = function () {
13361 return this.getText();
13366 var ExtendsReference = /** @class */ (function (_super) {
13367 __extends(ExtendsReference, _super);
13368 function ExtendsReference(offset, length) {
13369 return _super.call(this, offset, length) || this;
13371 Object.defineProperty(ExtendsReference.prototype, "type", {
13373 return NodeType.ExtendsReference;
13378 ExtendsReference.prototype.getSelectors = function () {
13379 if (!this.selectors) {
13380 this.selectors = new Nodelist(this);
13382 return this.selectors;
13384 return ExtendsReference;
13387 var MixinContentReference = /** @class */ (function (_super) {
13388 __extends(MixinContentReference, _super);
13389 function MixinContentReference(offset, length) {
13390 return _super.call(this, offset, length) || this;
13392 Object.defineProperty(MixinContentReference.prototype, "type", {
13394 return NodeType.MixinContentReference;
13399 MixinContentReference.prototype.getArguments = function () {
13400 if (!this.arguments) {
13401 this.arguments = new Nodelist(this);
13403 return this.arguments;
13405 return MixinContentReference;
13408 var MixinContentDeclaration = /** @class */ (function (_super) {
13409 __extends(MixinContentDeclaration, _super);
13410 function MixinContentDeclaration(offset, length) {
13411 return _super.call(this, offset, length) || this;
13413 Object.defineProperty(MixinContentDeclaration.prototype, "type", {
13415 return NodeType.MixinContentReference;
13420 MixinContentDeclaration.prototype.getParameters = function () {
13421 if (!this.parameters) {
13422 this.parameters = new Nodelist(this);
13424 return this.parameters;
13426 return MixinContentDeclaration;
13427 }(BodyDeclaration));
13429 var MixinReference = /** @class */ (function (_super) {
13430 __extends(MixinReference, _super);
13431 function MixinReference(offset, length) {
13432 return _super.call(this, offset, length) || this;
13434 Object.defineProperty(MixinReference.prototype, "type", {
13436 return NodeType.MixinReference;
13441 MixinReference.prototype.getNamespaces = function () {
13442 if (!this.namespaces) {
13443 this.namespaces = new Nodelist(this);
13445 return this.namespaces;
13447 MixinReference.prototype.setIdentifier = function (node) {
13448 return this.setNode('identifier', node, 0);
13450 MixinReference.prototype.getIdentifier = function () {
13451 return this.identifier;
13453 MixinReference.prototype.getName = function () {
13454 return this.identifier ? this.identifier.getText() : '';
13456 MixinReference.prototype.getArguments = function () {
13457 if (!this.arguments) {
13458 this.arguments = new Nodelist(this);
13460 return this.arguments;
13462 MixinReference.prototype.setContent = function (node) {
13463 return this.setNode('content', node);
13465 MixinReference.prototype.getContent = function () {
13466 return this.content;
13468 return MixinReference;
13471 var MixinDeclaration = /** @class */ (function (_super) {
13472 __extends(MixinDeclaration, _super);
13473 function MixinDeclaration(offset, length) {
13474 return _super.call(this, offset, length) || this;
13476 Object.defineProperty(MixinDeclaration.prototype, "type", {
13478 return NodeType.MixinDeclaration;
13483 MixinDeclaration.prototype.setIdentifier = function (node) {
13484 return this.setNode('identifier', node, 0);
13486 MixinDeclaration.prototype.getIdentifier = function () {
13487 return this.identifier;
13489 MixinDeclaration.prototype.getName = function () {
13490 return this.identifier ? this.identifier.getText() : '';
13492 MixinDeclaration.prototype.getParameters = function () {
13493 if (!this.parameters) {
13494 this.parameters = new Nodelist(this);
13496 return this.parameters;
13498 MixinDeclaration.prototype.setGuard = function (node) {
13500 node.attachTo(this);
13505 return MixinDeclaration;
13506 }(BodyDeclaration));
13508 var UnknownAtRule = /** @class */ (function (_super) {
13509 __extends(UnknownAtRule, _super);
13510 function UnknownAtRule(offset, length) {
13511 return _super.call(this, offset, length) || this;
13513 Object.defineProperty(UnknownAtRule.prototype, "type", {
13515 return NodeType.UnknownAtRule;
13520 UnknownAtRule.prototype.setAtRuleName = function (atRuleName) {
13521 this.atRuleName = atRuleName;
13523 UnknownAtRule.prototype.getAtRuleName = function () {
13524 return this.atRuleName;
13526 return UnknownAtRule;
13527 }(BodyDeclaration));
13529 var ListEntry = /** @class */ (function (_super) {
13530 __extends(ListEntry, _super);
13531 function ListEntry() {
13532 return _super !== null && _super.apply(this, arguments) || this;
13534 Object.defineProperty(ListEntry.prototype, "type", {
13536 return NodeType.ListEntry;
13541 ListEntry.prototype.setKey = function (node) {
13542 return this.setNode('key', node, 0);
13544 ListEntry.prototype.setValue = function (node) {
13545 return this.setNode('value', node, 1);
13550 var LessGuard = /** @class */ (function (_super) {
13551 __extends(LessGuard, _super);
13552 function LessGuard() {
13553 return _super !== null && _super.apply(this, arguments) || this;
13555 LessGuard.prototype.getConditions = function () {
13556 if (!this.conditions) {
13557 this.conditions = new Nodelist(this);
13559 return this.conditions;
13564 var GuardCondition = /** @class */ (function (_super) {
13565 __extends(GuardCondition, _super);
13566 function GuardCondition() {
13567 return _super !== null && _super.apply(this, arguments) || this;
13569 GuardCondition.prototype.setVariable = function (node) {
13570 return this.setNode('variable', node);
13572 return GuardCondition;
13575 var Module = /** @class */ (function (_super) {
13576 __extends(Module, _super);
13577 function Module() {
13578 return _super !== null && _super.apply(this, arguments) || this;
13580 Object.defineProperty(Module.prototype, "type", {
13582 return NodeType.Module;
13587 Module.prototype.setIdentifier = function (node) {
13588 return this.setNode('identifier', node, 0);
13590 Module.prototype.getIdentifier = function () {
13591 return this.identifier;
13597 (function (Level) {
13598 Level[Level["Ignore"] = 1] = "Ignore";
13599 Level[Level["Warning"] = 2] = "Warning";
13600 Level[Level["Error"] = 4] = "Error";
13601 })(Level || (Level = {}));
13602 var Marker = /** @class */ (function () {
13603 function Marker(node, rule, level, message, offset, length) {
13604 if (offset === void 0) { offset = node.offset; }
13605 if (length === void 0) { length = node.length; }
13608 this.level = level;
13609 this.message = message || rule.message;
13610 this.offset = offset;
13611 this.length = length;
13613 Marker.prototype.getRule = function () {
13616 Marker.prototype.getLevel = function () {
13619 Marker.prototype.getOffset = function () {
13620 return this.offset;
13622 Marker.prototype.getLength = function () {
13623 return this.length;
13625 Marker.prototype.getNode = function () {
13628 Marker.prototype.getMessage = function () {
13629 return this.message;
13635 export class DefaultVisitor implements IVisitor {
13637 public visitNode(node:Node):boolean {
13638 switch (node.type) {
13639 case NodeType.Stylesheet:
13640 return this.visitStylesheet(<Stylesheet> node);
13641 case NodeType.FontFace:
13642 return this.visitFontFace(<FontFace> node);
13643 case NodeType.Ruleset:
13644 return this.visitRuleSet(<RuleSet> node);
13645 case NodeType.Selector:
13646 return this.visitSelector(<Selector> node);
13647 case NodeType.SimpleSelector:
13648 return this.visitSimpleSelector(<SimpleSelector> node);
13649 case NodeType.Declaration:
13650 return this.visitDeclaration(<Declaration> node);
13651 case NodeType.Function:
13652 return this.visitFunction(<Function> node);
13653 case NodeType.FunctionDeclaration:
13654 return this.visitFunctionDeclaration(<FunctionDeclaration> node);
13655 case NodeType.FunctionParameter:
13656 return this.visitFunctionParameter(<FunctionParameter> node);
13657 case NodeType.FunctionArgument:
13658 return this.visitFunctionArgument(<FunctionArgument> node);
13659 case NodeType.Term:
13660 return this.visitTerm(<Term> node);
13661 case NodeType.Declaration:
13662 return this.visitExpression(<Expression> node);
13663 case NodeType.NumericValue:
13664 return this.visitNumericValue(<NumericValue> node);
13665 case NodeType.Page:
13666 return this.visitPage(<Page> node);
13667 case NodeType.PageBoxMarginBox:
13668 return this.visitPageBoxMarginBox(<PageBoxMarginBox> node);
13669 case NodeType.Property:
13670 return this.visitProperty(<Property> node);
13671 case NodeType.NumericValue:
13672 return this.visitNodelist(<Nodelist> node);
13673 case NodeType.Import:
13674 return this.visitImport(<Import> node);
13675 case NodeType.Namespace:
13676 return this.visitNamespace(<Namespace> node);
13677 case NodeType.Keyframe:
13678 return this.visitKeyframe(<Keyframe> node);
13679 case NodeType.KeyframeSelector:
13680 return this.visitKeyframeSelector(<KeyframeSelector> node);
13681 case NodeType.MixinDeclaration:
13682 return this.visitMixinDeclaration(<MixinDeclaration> node);
13683 case NodeType.MixinReference:
13684 return this.visitMixinReference(<MixinReference> node);
13685 case NodeType.Variable:
13686 return this.visitVariable(<Variable> node);
13687 case NodeType.VariableDeclaration:
13688 return this.visitVariableDeclaration(<VariableDeclaration> node);
13690 return this.visitUnknownNode(node);
13693 public visitFontFace(node:FontFace):boolean {
13697 public visitKeyframe(node:Keyframe):boolean {
13701 public visitKeyframeSelector(node:KeyframeSelector):boolean {
13705 public visitStylesheet(node:Stylesheet):boolean {
13709 public visitProperty(Node:Property):boolean {
13713 public visitRuleSet(node:RuleSet):boolean {
13717 public visitSelector(node:Selector):boolean {
13721 public visitSimpleSelector(node:SimpleSelector):boolean {
13725 public visitDeclaration(node:Declaration):boolean {
13729 public visitFunction(node:Function):boolean {
13733 public visitFunctionDeclaration(node:FunctionDeclaration):boolean {
13737 public visitInvocation(node:Invocation):boolean {
13741 public visitTerm(node:Term):boolean {
13745 public visitImport(node:Import):boolean {
13749 public visitNamespace(node:Namespace):boolean {
13753 public visitExpression(node:Expression):boolean {
13757 public visitNumericValue(node:NumericValue):boolean {
13761 public visitPage(node:Page):boolean {
13765 public visitPageBoxMarginBox(node:PageBoxMarginBox):boolean {
13769 public visitNodelist(node:Nodelist):boolean {
13773 public visitVariableDeclaration(node:VariableDeclaration):boolean {
13777 public visitVariable(node:Variable):boolean {
13781 public visitMixinDeclaration(node:MixinDeclaration):boolean {
13785 public visitMixinReference(node:MixinReference):boolean {
13789 public visitUnknownNode(node:Node):boolean {
13794 var ParseErrorCollector = /** @class */ (function () {
13795 function ParseErrorCollector() {
13798 ParseErrorCollector.entries = function (node) {
13799 var visitor = new ParseErrorCollector();
13800 node.acceptVisitor(visitor);
13801 return visitor.entries;
13803 ParseErrorCollector.prototype.visitNode = function (node) {
13804 if (node.isErroneous()) {
13805 node.collectIssues(this.entries);
13809 return ParseErrorCollector;
13816 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
13818 __webpack_require__.r(__webpack_exports__);
13819 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13820 /* harmony export */ "startsWith": () => /* binding */ startsWith,
13821 /* harmony export */ "endsWith": () => /* binding */ endsWith,
13822 /* harmony export */ "difference": () => /* binding */ difference,
13823 /* harmony export */ "getLimitedString": () => /* binding */ getLimitedString,
13824 /* harmony export */ "trim": () => /* binding */ trim
13825 /* harmony export */ });
13826 /*---------------------------------------------------------------------------------------------
13827 * Copyright (c) Microsoft Corporation. All rights reserved.
13828 * Licensed under the MIT License. See License.txt in the project root for license information.
13829 *--------------------------------------------------------------------------------------------*/
13831 function startsWith(haystack, needle) {
13832 if (haystack.length < needle.length) {
13835 for (var i = 0; i < needle.length; i++) {
13836 if (haystack[i] !== needle[i]) {
13843 * Determines if haystack ends with needle.
13845 function endsWith(haystack, needle) {
13846 var diff = haystack.length - needle.length;
13848 return haystack.lastIndexOf(needle) === diff;
13850 else if (diff === 0) {
13851 return haystack === needle;
13858 * Computes the difference score for two strings. More similar strings have a higher score.
13859 * We use largest common subsequence dynamic programming approach but penalize in the end for length differences.
13860 * Strings that have a large length difference will get a bad default score 0.
13861 * Complexity - both time and space O(first.length * second.length)
13862 * Dynamic programming LCS computation http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
13864 * @param first a string
13865 * @param second a string
13867 function difference(first, second, maxLenDelta) {
13868 if (maxLenDelta === void 0) { maxLenDelta = 4; }
13869 var lengthDifference = Math.abs(first.length - second.length);
13870 // We only compute score if length of the currentWord and length of entry.name are similar.
13871 if (lengthDifference > maxLenDelta) {
13874 // Initialize LCS (largest common subsequence) matrix.
13876 var zeroArray = [];
13878 for (i = 0; i < second.length + 1; ++i) {
13881 for (i = 0; i < first.length + 1; ++i) {
13882 LCS.push(zeroArray);
13884 for (i = 1; i < first.length + 1; ++i) {
13885 for (j = 1; j < second.length + 1; ++j) {
13886 if (first[i - 1] === second[j - 1]) {
13887 LCS[i][j] = LCS[i - 1][j - 1] + 1;
13890 LCS[i][j] = Math.max(LCS[i - 1][j], LCS[i][j - 1]);
13894 return LCS[first.length][second.length] - Math.sqrt(lengthDifference);
13897 * Limit of string length.
13899 function getLimitedString(str, ellipsis) {
13900 if (ellipsis === void 0) { ellipsis = true; }
13904 if (str.length < 140) {
13907 return str.slice(0, 140) + (ellipsis ? '\u2026' : '');
13910 * Limit of string length.
13912 function trim(str, regexp) {
13913 var m = regexp.exec(str);
13914 if (m && m[0].length) {
13915 return str.substr(0, str.length - m[0].length);
13923 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
13925 __webpack_require__.r(__webpack_exports__);
13926 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13927 /* harmony export */ "CSSIssueType": () => /* binding */ CSSIssueType,
13928 /* harmony export */ "ParseError": () => /* binding */ ParseError
13929 /* harmony export */ });
13930 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
13931 /*---------------------------------------------------------------------------------------------
13932 * Copyright (c) Microsoft Corporation. All rights reserved.
13933 * Licensed under the MIT License. See License.txt in the project root for license information.
13934 *--------------------------------------------------------------------------------------------*/
13937 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__.loadMessageBundle();
13938 var CSSIssueType = /** @class */ (function () {
13939 function CSSIssueType(id, message) {
13941 this.message = message;
13943 return CSSIssueType;
13947 NumberExpected: new CSSIssueType('css-numberexpected', localize('expected.number', "number expected")),
13948 ConditionExpected: new CSSIssueType('css-conditionexpected', localize('expected.condt', "condition expected")),
13949 RuleOrSelectorExpected: new CSSIssueType('css-ruleorselectorexpected', localize('expected.ruleorselector', "at-rule or selector expected")),
13950 DotExpected: new CSSIssueType('css-dotexpected', localize('expected.dot', "dot expected")),
13951 ColonExpected: new CSSIssueType('css-colonexpected', localize('expected.colon', "colon expected")),
13952 SemiColonExpected: new CSSIssueType('css-semicolonexpected', localize('expected.semicolon', "semi-colon expected")),
13953 TermExpected: new CSSIssueType('css-termexpected', localize('expected.term', "term expected")),
13954 ExpressionExpected: new CSSIssueType('css-expressionexpected', localize('expected.expression', "expression expected")),
13955 OperatorExpected: new CSSIssueType('css-operatorexpected', localize('expected.operator', "operator expected")),
13956 IdentifierExpected: new CSSIssueType('css-identifierexpected', localize('expected.ident', "identifier expected")),
13957 PercentageExpected: new CSSIssueType('css-percentageexpected', localize('expected.percentage', "percentage expected")),
13958 URIOrStringExpected: new CSSIssueType('css-uriorstringexpected', localize('expected.uriorstring', "uri or string expected")),
13959 URIExpected: new CSSIssueType('css-uriexpected', localize('expected.uri', "URI expected")),
13960 VariableNameExpected: new CSSIssueType('css-varnameexpected', localize('expected.varname', "variable name expected")),
13961 VariableValueExpected: new CSSIssueType('css-varvalueexpected', localize('expected.varvalue', "variable value expected")),
13962 PropertyValueExpected: new CSSIssueType('css-propertyvalueexpected', localize('expected.propvalue', "property value expected")),
13963 LeftCurlyExpected: new CSSIssueType('css-lcurlyexpected', localize('expected.lcurly', "{ expected")),
13964 RightCurlyExpected: new CSSIssueType('css-rcurlyexpected', localize('expected.rcurly', "} expected")),
13965 LeftSquareBracketExpected: new CSSIssueType('css-rbracketexpected', localize('expected.lsquare', "[ expected")),
13966 RightSquareBracketExpected: new CSSIssueType('css-lbracketexpected', localize('expected.rsquare', "] expected")),
13967 LeftParenthesisExpected: new CSSIssueType('css-lparentexpected', localize('expected.lparen', "( expected")),
13968 RightParenthesisExpected: new CSSIssueType('css-rparentexpected', localize('expected.rparent', ") expected")),
13969 CommaExpected: new CSSIssueType('css-commaexpected', localize('expected.comma', "comma expected")),
13970 PageDirectiveOrDeclarationExpected: new CSSIssueType('css-pagedirordeclexpected', localize('expected.pagedirordecl', "page directive or declaraton expected")),
13971 UnknownAtRule: new CSSIssueType('css-unknownatrule', localize('unknown.atrule', "at-rule unknown")),
13972 UnknownKeyword: new CSSIssueType('css-unknownkeyword', localize('unknown.keyword', "unknown keyword")),
13973 SelectorExpected: new CSSIssueType('css-selectorexpected', localize('expected.selector', "selector expected")),
13974 StringLiteralExpected: new CSSIssueType('css-stringliteralexpected', localize('expected.stringliteral', "string literal expected")),
13975 WhitespaceExpected: new CSSIssueType('css-whitespaceexpected', localize('expected.whitespace', "whitespace expected")),
13976 MediaQueryExpected: new CSSIssueType('css-mediaqueryexpected', localize('expected.mediaquery', "media query expected")),
13977 IdentifierOrWildcardExpected: new CSSIssueType('css-idorwildcardexpected', localize('expected.idorwildcard', "identifier or wildcard expected")),
13978 WildcardExpected: new CSSIssueType('css-wildcardexpected', localize('expected.wildcard', "wildcard expected")),
13979 IdentifierOrVariableExpected: new CSSIssueType('css-idorvarexpected', localize('expected.idorvar', "identifier or variable expected")),
13985 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13988 /* --------------------------------------------------------------------------------------------
13989 * Copyright (c) Microsoft Corporation. All rights reserved.
13990 * Licensed under the MIT License. See License.txt in the project root for license information.
13991 * ------------------------------------------------------------------------------------------ */
13992 Object.defineProperty(exports, "__esModule", ({ value: true }));
13993 exports.config = exports.loadMessageBundle = void 0;
13994 var path = __webpack_require__(3);
13995 var fs = __webpack_require__(64);
13996 var ral_1 = __webpack_require__(78);
13997 var common_1 = __webpack_require__(79);
13998 var common_2 = __webpack_require__(79);
13999 Object.defineProperty(exports, "MessageFormat", ({ enumerable: true, get: function () { return common_2.MessageFormat; } }));
14000 Object.defineProperty(exports, "BundleFormat", ({ enumerable: true, get: function () { return common_2.BundleFormat; } }));
14001 var toString = Object.prototype.toString;
14002 function isNumber(value) {
14003 return toString.call(value) === '[object Number]';
14005 function isString(value) {
14006 return toString.call(value) === '[object String]';
14008 function isBoolean(value) {
14009 return value === true || value === false;
14011 function readJsonFileSync(filename) {
14012 return JSON.parse(fs.readFileSync(filename, 'utf8'));
14014 var resolvedBundles;
14016 function initializeSettings() {
14017 options = { locale: undefined, language: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: common_1.MessageFormat.bundle };
14018 if (isString(process.env.VSCODE_NLS_CONFIG)) {
14020 var vscodeOptions_1 = JSON.parse(process.env.VSCODE_NLS_CONFIG);
14021 var language = void 0;
14022 if (vscodeOptions_1.availableLanguages) {
14023 var value = vscodeOptions_1.availableLanguages['*'];
14024 if (isString(value)) {
14028 if (isString(vscodeOptions_1.locale)) {
14029 options.locale = vscodeOptions_1.locale.toLowerCase();
14031 if (language === undefined) {
14032 options.language = options.locale;
14034 else if (language !== 'en') {
14035 options.language = language;
14037 if (isBoolean(vscodeOptions_1._languagePackSupport)) {
14038 options.languagePackSupport = vscodeOptions_1._languagePackSupport;
14040 if (isString(vscodeOptions_1._cacheRoot)) {
14041 options.cacheRoot = vscodeOptions_1._cacheRoot;
14043 if (isString(vscodeOptions_1._languagePackId)) {
14044 options.languagePackId = vscodeOptions_1._languagePackId;
14046 if (isString(vscodeOptions_1._translationsConfigFile)) {
14047 options.translationsConfigFile = vscodeOptions_1._translationsConfigFile;
14049 options.translationsConfig = readJsonFileSync(options.translationsConfigFile);
14052 // We can't read the translation config file. Mark the cache as corrupted.
14053 if (vscodeOptions_1._corruptedFile) {
14054 var dirname = path.dirname(vscodeOptions_1._corruptedFile);
14055 fs.exists(dirname, function (exists) {
14057 fs.writeFile(vscodeOptions_1._corruptedFile, 'corrupted', 'utf8', function (err) {
14058 console.error(err);
14070 common_1.setPseudo(options.locale === 'pseudo');
14071 resolvedBundles = Object.create(null);
14073 initializeSettings();
14074 function supportsLanguagePack() {
14075 return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined
14076 && options.translationsConfig !== undefined;
14078 function createScopedLocalizeFunction(messages) {
14079 return function (key, message) {
14081 for (var _i = 2; _i < arguments.length; _i++) {
14082 args[_i - 2] = arguments[_i];
14084 if (isNumber(key)) {
14085 if (key >= messages.length) {
14086 console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: " + new Error('').stack);
14089 return common_1.format(messages[key], args);
14092 if (isString(message)) {
14093 console.warn("Message " + message + " didn't get externalized correctly.");
14094 return common_1.format(message, args);
14097 console.error("Broken localize call found. Stacktrace is\n: " + new Error('').stack);
14102 function resolveLanguage(file) {
14103 var resolvedLanguage;
14104 if (options.cacheLanguageResolution && resolvedLanguage) {
14105 resolvedLanguage = resolvedLanguage;
14108 if (common_1.isPseudo || !options.language) {
14109 resolvedLanguage = '.nls.json';
14112 var locale = options.language;
14114 var candidate = '.nls.' + locale + '.json';
14115 if (fs.existsSync(file + candidate)) {
14116 resolvedLanguage = candidate;
14120 var index = locale.lastIndexOf('-');
14122 locale = locale.substring(0, index);
14125 resolvedLanguage = '.nls.json';
14131 if (options.cacheLanguageResolution) {
14132 resolvedLanguage = resolvedLanguage;
14135 return file + resolvedLanguage;
14137 function findInTheBoxBundle(root) {
14138 var language = options.language;
14140 var candidate = path.join(root, "nls.bundle." + language + ".json");
14141 if (fs.existsSync(candidate)) {
14145 var index = language.lastIndexOf('-');
14147 language = language.substring(0, index);
14150 language = undefined;
14154 // Test if we can reslove the default bundle.
14155 if (language === undefined) {
14156 var candidate = path.join(root, 'nls.bundle.json');
14157 if (fs.existsSync(candidate)) {
14163 function mkdir(directory) {
14165 fs.mkdirSync(directory);
14168 if (err.code === 'EEXIST') {
14171 else if (err.code === 'ENOENT') {
14172 var parent = path.dirname(directory);
14173 if (parent !== directory) {
14175 fs.mkdirSync(directory);
14183 function createDefaultNlsBundle(folder) {
14184 var metaData = readJsonFileSync(path.join(folder, 'nls.metadata.json'));
14185 var result = Object.create(null);
14186 for (var module_1 in metaData) {
14187 var entry = metaData[module_1];
14188 result[module_1] = entry.messages;
14192 function createNLSBundle(header, metaDataPath) {
14193 var languagePackLocation = options.translationsConfig[header.id];
14194 if (!languagePackLocation) {
14197 var languagePack = readJsonFileSync(languagePackLocation).contents;
14198 var metaData = readJsonFileSync(path.join(metaDataPath, 'nls.metadata.json'));
14199 var result = Object.create(null);
14200 for (var module_2 in metaData) {
14201 var entry = metaData[module_2];
14202 var translations = languagePack[header.outDir + "/" + module_2];
14203 if (translations) {
14204 var resultMessages = [];
14205 for (var i = 0; i < entry.keys.length; i++) {
14206 var messageKey = entry.keys[i];
14207 var key = isString(messageKey) ? messageKey : messageKey.key;
14208 var translatedMessage = translations[key];
14209 if (translatedMessage === undefined) {
14210 translatedMessage = entry.messages[i];
14212 resultMessages.push(translatedMessage);
14214 result[module_2] = resultMessages;
14217 result[module_2] = entry.messages;
14222 function touch(file) {
14223 var d = new Date();
14224 fs.utimes(file, d, d, function () {
14225 // Do nothing. Ignore
14228 function cacheBundle(key, bundle) {
14229 resolvedBundles[key] = bundle;
14232 function loadNlsBundleOrCreateFromI18n(header, bundlePath) {
14234 var bundle = path.join(options.cacheRoot, header.id + "-" + header.hash + ".json");
14235 var useMemoryOnly = false;
14236 var writeBundle = false;
14238 result = JSON.parse(fs.readFileSync(bundle, { encoding: 'utf8', flag: 'r' }));
14243 if (err.code === 'ENOENT') {
14244 writeBundle = true;
14246 else if (err instanceof SyntaxError) {
14247 // We have a syntax error. So no valid JSON. Use
14248 console.log("Syntax error parsing message bundle: " + err.message + ".");
14249 fs.unlink(bundle, function (err) {
14251 console.error("Deleting corrupted bundle " + bundle + " failed.");
14254 useMemoryOnly = true;
14260 result = createNLSBundle(header, bundlePath);
14261 if (!result || useMemoryOnly) {
14266 fs.writeFileSync(bundle, JSON.stringify(result), { encoding: 'utf8', flag: 'wx' });
14269 if (err.code === 'EEXIST') {
14277 function loadDefaultNlsBundle(bundlePath) {
14279 return createDefaultNlsBundle(bundlePath);
14282 console.log("Generating default bundle from meta data failed.", err);
14286 function loadNlsBundle(header, bundlePath) {
14288 // Core decided to use a language pack. Do the same in the extension
14289 if (supportsLanguagePack()) {
14291 result = loadNlsBundleOrCreateFromI18n(header, bundlePath);
14294 console.log("Load or create bundle failed ", err);
14298 // No language pack found, but core is running in language pack mode
14299 // Don't try to use old in the box bundles since the might be stale
14300 // Fall right back to the default bundle.
14301 if (options.languagePackSupport) {
14302 return loadDefaultNlsBundle(bundlePath);
14304 var candidate = findInTheBoxBundle(bundlePath);
14307 return readJsonFileSync(candidate);
14310 console.log("Loading in the box message bundle failed.", err);
14313 result = loadDefaultNlsBundle(bundlePath);
14317 function tryFindMetaDataHeaderFile(file) {
14319 var dirname = path.dirname(file);
14321 result = path.join(dirname, 'nls.metadata.header.json');
14322 if (fs.existsSync(result)) {
14325 var parent = path.dirname(dirname);
14326 if (parent === dirname) {
14327 result = undefined;
14336 function loadMessageBundle(file) {
14338 // No file. We are in dev mode. Return the default
14339 // localize function.
14340 return common_1.localize;
14342 // Remove extension since we load json files.
14343 var ext = path.extname(file);
14345 file = file.substr(0, file.length - ext.length);
14347 if (options.messageFormat === common_1.MessageFormat.both || options.messageFormat === common_1.MessageFormat.bundle) {
14348 var headerFile = tryFindMetaDataHeaderFile(file);
14350 var bundlePath = path.dirname(headerFile);
14351 var bundle = resolvedBundles[bundlePath];
14352 if (bundle === undefined) {
14354 var header = JSON.parse(fs.readFileSync(headerFile, 'utf8'));
14356 var nlsBundle = loadNlsBundle(header, bundlePath);
14357 bundle = cacheBundle(bundlePath, nlsBundle ? { header: header, nlsBundle: nlsBundle } : null);
14360 console.error('Failed to load nls bundle', err);
14361 bundle = cacheBundle(bundlePath, null);
14365 console.error('Failed to read header file', err);
14366 bundle = cacheBundle(bundlePath, null);
14370 var module_3 = file.substr(bundlePath.length + 1).replace(/\\/g, '/');
14371 var messages = bundle.nlsBundle[module_3];
14372 if (messages === undefined) {
14373 console.error("Messages for file " + file + " not found. See console for details.");
14374 return function () {
14375 return 'Messages not found.';
14378 return createScopedLocalizeFunction(messages);
14382 if (options.messageFormat === common_1.MessageFormat.both || options.messageFormat === common_1.MessageFormat.file) {
14383 // Try to load a single file bundle
14385 var json = readJsonFileSync(resolveLanguage(file));
14386 if (Array.isArray(json)) {
14387 return createScopedLocalizeFunction(json);
14390 if (common_1.isDefined(json.messages) && common_1.isDefined(json.keys)) {
14391 return createScopedLocalizeFunction(json.messages);
14394 console.error("String bundle '" + file + "' uses an unsupported format.");
14395 return function () {
14396 return 'File bundle has unsupported format. See console for details';
14402 if (err.code !== 'ENOENT') {
14403 console.error('Failed to load single file bundle', err);
14407 console.error("Failed to load message bundle for file " + file);
14408 return function () {
14409 return 'Failed to load message bundle. See console for details.';
14412 exports.loadMessageBundle = loadMessageBundle;
14413 function config(opts) {
14415 if (isString(opts.locale)) {
14416 options.locale = opts.locale.toLowerCase();
14417 options.language = options.locale;
14418 resolvedBundles = Object.create(null);
14420 if (opts.messageFormat !== undefined) {
14421 options.messageFormat = opts.messageFormat;
14423 if (opts.bundleFormat === common_1.BundleFormat.standalone && options.languagePackSupport === true) {
14424 options.languagePackSupport = false;
14427 common_1.setPseudo(options.locale === 'pseudo');
14428 return loadMessageBundle;
14430 exports.config = config;
14431 ral_1.default.install(Object.freeze({
14432 loadMessageBundle: loadMessageBundle,
14435 //# sourceMappingURL=main.js.map
14439 /***/ ((__unused_webpack_module, exports) => {
14442 Object.defineProperty(exports, "__esModule", ({ value: true }));
14445 if (_ral === undefined) {
14446 throw new Error("No runtime abstraction layer installed");
14451 function install(ral) {
14452 if (ral === undefined) {
14453 throw new Error("No runtime abstraction layer provided");
14457 RAL.install = install;
14458 })(RAL || (RAL = {}));
14459 exports.default = RAL;
14460 //# sourceMappingURL=ral.js.map
14464 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14467 /* --------------------------------------------------------------------------------------------
14468 * Copyright (c) Microsoft Corporation. All rights reserved.
14469 * Licensed under the MIT License. See License.txt in the project root for license information.
14470 * ------------------------------------------------------------------------------------------ */
14471 Object.defineProperty(exports, "__esModule", ({ value: true }));
14472 exports.config = exports.loadMessageBundle = exports.localize = exports.format = exports.setPseudo = exports.isPseudo = exports.isDefined = exports.BundleFormat = exports.MessageFormat = void 0;
14473 var ral_1 = __webpack_require__(78);
14475 (function (MessageFormat) {
14476 MessageFormat["file"] = "file";
14477 MessageFormat["bundle"] = "bundle";
14478 MessageFormat["both"] = "both";
14479 })(MessageFormat = exports.MessageFormat || (exports.MessageFormat = {}));
14481 (function (BundleFormat) {
14482 // the nls.bundle format
14483 BundleFormat["standalone"] = "standalone";
14484 BundleFormat["languagePack"] = "languagePack";
14485 })(BundleFormat = exports.BundleFormat || (exports.BundleFormat = {}));
14487 (function (LocalizeInfo) {
14488 function is(value) {
14489 var candidate = value;
14490 return candidate && isDefined(candidate.key) && isDefined(candidate.comment);
14492 LocalizeInfo.is = is;
14493 })(LocalizeInfo || (LocalizeInfo = {}));
14494 function isDefined(value) {
14495 return typeof value !== 'undefined';
14497 exports.isDefined = isDefined;
14498 exports.isPseudo = false;
14499 function setPseudo(pseudo) {
14500 exports.isPseudo = pseudo;
14502 exports.setPseudo = setPseudo;
14503 function format(message, args) {
14505 if (exports.isPseudo) {
14506 // FF3B and FF3D is the Unicode zenkaku representation for [ and ]
14507 message = '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
14509 if (args.length === 0) {
14513 result = message.replace(/\{(\d+)\}/g, function (match, rest) {
14514 var index = rest[0];
14515 var arg = args[index];
14516 var replacement = match;
14517 if (typeof arg === 'string') {
14520 else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) {
14521 replacement = String(arg);
14523 return replacement;
14528 exports.format = format;
14529 function localize(_key, message) {
14531 for (var _i = 2; _i < arguments.length; _i++) {
14532 args[_i - 2] = arguments[_i];
14534 return format(message, args);
14536 exports.localize = localize;
14537 function loadMessageBundle(file) {
14538 return ral_1.default().loadMessageBundle(file);
14540 exports.loadMessageBundle = loadMessageBundle;
14541 function config(opts) {
14542 return ral_1.default().config(opts);
14544 exports.config = config;
14545 //# sourceMappingURL=common.js.map
14549 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14551 __webpack_require__.r(__webpack_exports__);
14552 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14553 /* harmony export */ "browserNames": () => /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_0__.browserNames,
14554 /* harmony export */ "getBrowserLabel": () => /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_0__.getBrowserLabel,
14555 /* harmony export */ "getEntryDescription": () => /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_0__.getEntryDescription,
14556 /* harmony export */ "textToMarkedString": () => /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_0__.textToMarkedString,
14557 /* harmony export */ "colorFrom256RGB": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorFrom256RGB,
14558 /* harmony export */ "colorFromHSL": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorFromHSL,
14559 /* harmony export */ "colorFromHex": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorFromHex,
14560 /* harmony export */ "colorFunctions": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorFunctions,
14561 /* harmony export */ "colorKeywords": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colorKeywords,
14562 /* harmony export */ "colors": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.colors,
14563 /* harmony export */ "getColorValue": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.getColorValue,
14564 /* harmony export */ "hexDigit": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.hexDigit,
14565 /* harmony export */ "hslFromColor": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.hslFromColor,
14566 /* harmony export */ "isColorConstructor": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.isColorConstructor,
14567 /* harmony export */ "isColorValue": () => /* reexport safe */ _colors__WEBPACK_IMPORTED_MODULE_1__.isColorValue,
14568 /* harmony export */ "basicShapeFunctions": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.basicShapeFunctions,
14569 /* harmony export */ "boxKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.boxKeywords,
14570 /* harmony export */ "cssWideKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.cssWideKeywords,
14571 /* harmony export */ "geometryBoxKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.geometryBoxKeywords,
14572 /* harmony export */ "html5Tags": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.html5Tags,
14573 /* harmony export */ "imageFunctions": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.imageFunctions,
14574 /* harmony export */ "lineStyleKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.lineStyleKeywords,
14575 /* harmony export */ "lineWidthKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.lineWidthKeywords,
14576 /* harmony export */ "pageBoxDirectives": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.pageBoxDirectives,
14577 /* harmony export */ "positionKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.positionKeywords,
14578 /* harmony export */ "repeatStyleKeywords": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.repeatStyleKeywords,
14579 /* harmony export */ "svgElements": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.svgElements,
14580 /* harmony export */ "transitionTimingFunctions": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.transitionTimingFunctions,
14581 /* harmony export */ "units": () => /* reexport safe */ _builtinData__WEBPACK_IMPORTED_MODULE_2__.units
14582 /* harmony export */ });
14583 /* harmony import */ var _entry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81);
14584 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82);
14585 /* harmony import */ var _builtinData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83);
14586 /*---------------------------------------------------------------------------------------------
14587 * Copyright (c) Microsoft Corporation. All rights reserved.
14588 * Licensed under the MIT License. See License.txt in the project root for license information.
14589 *--------------------------------------------------------------------------------------------*/
14598 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14600 __webpack_require__.r(__webpack_exports__);
14601 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14602 /* harmony export */ "browserNames": () => /* binding */ browserNames,
14603 /* harmony export */ "getEntryDescription": () => /* binding */ getEntryDescription,
14604 /* harmony export */ "textToMarkedString": () => /* binding */ textToMarkedString,
14605 /* harmony export */ "getBrowserLabel": () => /* binding */ getBrowserLabel
14606 /* harmony export */ });
14607 /*---------------------------------------------------------------------------------------------
14608 * Copyright (c) Microsoft Corporation. All rights reserved.
14609 * Licensed under the MIT License. See License.txt in the project root for license information.
14610 *--------------------------------------------------------------------------------------------*/
14612 var browserNames = {
14620 function getEntryStatus(status) {
14622 case 'experimental':
14623 return '⚠️ Property is experimental. Be cautious when using it.️\n\n';
14624 case 'nonstandard':
14625 return '🚨️ Property is nonstandard. Avoid using it.\n\n';
14627 return '🚨️️️ Property is obsolete. Avoid using it.\n\n';
14632 function getEntryDescription(entry, doesSupportMarkdown, settings) {
14634 if (doesSupportMarkdown) {
14637 value: getEntryMarkdownDescription(entry, settings)
14643 value: getEntryStringDescription(entry, settings)
14646 if (result.value === '') {
14651 function textToMarkedString(text) {
14652 text = text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
14653 return text.replace(/</g, '<').replace(/>/g, '>');
14655 function getEntryStringDescription(entry, settings) {
14656 if (!entry.description || entry.description === '') {
14659 if (typeof entry.description !== 'string') {
14660 return entry.description.value;
14663 if ((settings === null || settings === void 0 ? void 0 : settings.documentation) !== false) {
14664 if (entry.status) {
14665 result += getEntryStatus(entry.status);
14667 result += entry.description;
14668 var browserLabel = getBrowserLabel(entry.browsers);
14669 if (browserLabel) {
14670 result += '\n(' + browserLabel + ')';
14672 if ('syntax' in entry) {
14673 result += "\n\nSyntax: " + entry.syntax;
14676 if (entry.references && entry.references.length > 0 && (settings === null || settings === void 0 ? void 0 : settings.references) !== false) {
14677 if (result.length > 0) {
14680 result += entry.references.map(function (r) {
14681 return r.name + ": " + r.url;
14686 function getEntryMarkdownDescription(entry, settings) {
14687 if (!entry.description || entry.description === '') {
14691 if ((settings === null || settings === void 0 ? void 0 : settings.documentation) !== false) {
14692 if (entry.status) {
14693 result += getEntryStatus(entry.status);
14695 var description = typeof entry.description === 'string' ? entry.description : entry.description.value;
14696 result += textToMarkedString(description);
14697 var browserLabel = getBrowserLabel(entry.browsers);
14698 if (browserLabel) {
14699 result += '\n\n(' + textToMarkedString(browserLabel) + ')';
14701 if ('syntax' in entry && entry.syntax) {
14702 result += "\n\nSyntax: " + textToMarkedString(entry.syntax);
14705 if (entry.references && entry.references.length > 0 && (settings === null || settings === void 0 ? void 0 : settings.references) !== false) {
14706 if (result.length > 0) {
14709 result += entry.references.map(function (r) {
14710 return "[" + r.name + "](" + r.url + ")";
14716 * Input is like `["E12","FF49","C47","IE","O"]`
14717 * Output is like `Edge 12, Firefox 49, Chrome 47, IE, Opera`
14719 function getBrowserLabel(browsers) {
14720 if (browsers === void 0) { browsers = []; }
14721 if (browsers.length === 0) {
14725 .map(function (b) {
14727 var matches = b.match(/([A-Z]+)(\d+)?/);
14728 var name = matches[1];
14729 var version = matches[2];
14730 if (name in browserNames) {
14731 result += browserNames[name];
14734 result += ' ' + version;
14744 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14746 __webpack_require__.r(__webpack_exports__);
14747 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14748 /* harmony export */ "colorFunctions": () => /* binding */ colorFunctions,
14749 /* harmony export */ "colors": () => /* binding */ colors,
14750 /* harmony export */ "colorKeywords": () => /* binding */ colorKeywords,
14751 /* harmony export */ "isColorConstructor": () => /* binding */ isColorConstructor,
14752 /* harmony export */ "isColorValue": () => /* binding */ isColorValue,
14753 /* harmony export */ "hexDigit": () => /* binding */ hexDigit,
14754 /* harmony export */ "colorFromHex": () => /* binding */ colorFromHex,
14755 /* harmony export */ "colorFrom256RGB": () => /* binding */ colorFrom256RGB,
14756 /* harmony export */ "colorFromHSL": () => /* binding */ colorFromHSL,
14757 /* harmony export */ "hslFromColor": () => /* binding */ hslFromColor,
14758 /* harmony export */ "getColorValue": () => /* binding */ getColorValue
14759 /* harmony export */ });
14760 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
14761 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77);
14762 /*---------------------------------------------------------------------------------------------
14763 * Copyright (c) Microsoft Corporation. All rights reserved.
14764 * Licensed under the MIT License. See License.txt in the project root for license information.
14765 *--------------------------------------------------------------------------------------------*/
14768 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__.loadMessageBundle();
14769 var colorFunctions = [
14770 { func: 'rgb($red, $green, $blue)', desc: localize('css.builtin.rgb', 'Creates a Color from red, green, and blue values.') },
14771 { func: 'rgba($red, $green, $blue, $alpha)', desc: localize('css.builtin.rgba', 'Creates a Color from red, green, blue, and alpha values.') },
14772 { func: 'hsl($hue, $saturation, $lightness)', desc: localize('css.builtin.hsl', 'Creates a Color from hue, saturation, and lightness values.') },
14773 { func: 'hsla($hue, $saturation, $lightness, $alpha)', desc: localize('css.builtin.hsla', 'Creates a Color from hue, saturation, lightness, and alpha values.') }
14776 aliceblue: '#f0f8ff',
14777 antiquewhite: '#faebd7',
14779 aquamarine: '#7fffd4',
14784 blanchedalmond: '#ffebcd',
14786 blueviolet: '#8a2be2',
14788 burlywood: '#deb887',
14789 cadetblue: '#5f9ea0',
14790 chartreuse: '#7fff00',
14791 chocolate: '#d2691e',
14793 cornflowerblue: '#6495ed',
14794 cornsilk: '#fff8dc',
14795 crimson: '#dc143c',
14797 darkblue: '#00008b',
14798 darkcyan: '#008b8b',
14799 darkgoldenrod: '#b8860b',
14800 darkgray: '#a9a9a9',
14801 darkgrey: '#a9a9a9',
14802 darkgreen: '#006400',
14803 darkkhaki: '#bdb76b',
14804 darkmagenta: '#8b008b',
14805 darkolivegreen: '#556b2f',
14806 darkorange: '#ff8c00',
14807 darkorchid: '#9932cc',
14808 darkred: '#8b0000',
14809 darksalmon: '#e9967a',
14810 darkseagreen: '#8fbc8f',
14811 darkslateblue: '#483d8b',
14812 darkslategray: '#2f4f4f',
14813 darkslategrey: '#2f4f4f',
14814 darkturquoise: '#00ced1',
14815 darkviolet: '#9400d3',
14816 deeppink: '#ff1493',
14817 deepskyblue: '#00bfff',
14818 dimgray: '#696969',
14819 dimgrey: '#696969',
14820 dodgerblue: '#1e90ff',
14821 firebrick: '#b22222',
14822 floralwhite: '#fffaf0',
14823 forestgreen: '#228b22',
14824 fuchsia: '#ff00ff',
14825 gainsboro: '#dcdcdc',
14826 ghostwhite: '#f8f8ff',
14828 goldenrod: '#daa520',
14832 greenyellow: '#adff2f',
14833 honeydew: '#f0fff0',
14834 hotpink: '#ff69b4',
14835 indianred: '#cd5c5c',
14839 lavender: '#e6e6fa',
14840 lavenderblush: '#fff0f5',
14841 lawngreen: '#7cfc00',
14842 lemonchiffon: '#fffacd',
14843 lightblue: '#add8e6',
14844 lightcoral: '#f08080',
14845 lightcyan: '#e0ffff',
14846 lightgoldenrodyellow: '#fafad2',
14847 lightgray: '#d3d3d3',
14848 lightgrey: '#d3d3d3',
14849 lightgreen: '#90ee90',
14850 lightpink: '#ffb6c1',
14851 lightsalmon: '#ffa07a',
14852 lightseagreen: '#20b2aa',
14853 lightskyblue: '#87cefa',
14854 lightslategray: '#778899',
14855 lightslategrey: '#778899',
14856 lightsteelblue: '#b0c4de',
14857 lightyellow: '#ffffe0',
14859 limegreen: '#32cd32',
14861 magenta: '#ff00ff',
14863 mediumaquamarine: '#66cdaa',
14864 mediumblue: '#0000cd',
14865 mediumorchid: '#ba55d3',
14866 mediumpurple: '#9370d8',
14867 mediumseagreen: '#3cb371',
14868 mediumslateblue: '#7b68ee',
14869 mediumspringgreen: '#00fa9a',
14870 mediumturquoise: '#48d1cc',
14871 mediumvioletred: '#c71585',
14872 midnightblue: '#191970',
14873 mintcream: '#f5fffa',
14874 mistyrose: '#ffe4e1',
14875 moccasin: '#ffe4b5',
14876 navajowhite: '#ffdead',
14878 oldlace: '#fdf5e6',
14880 olivedrab: '#6b8e23',
14882 orangered: '#ff4500',
14884 palegoldenrod: '#eee8aa',
14885 palegreen: '#98fb98',
14886 paleturquoise: '#afeeee',
14887 palevioletred: '#d87093',
14888 papayawhip: '#ffefd5',
14889 peachpuff: '#ffdab9',
14893 powderblue: '#b0e0e6',
14896 rebeccapurple: '#663399',
14897 rosybrown: '#bc8f8f',
14898 royalblue: '#4169e1',
14899 saddlebrown: '#8b4513',
14901 sandybrown: '#f4a460',
14902 seagreen: '#2e8b57',
14903 seashell: '#fff5ee',
14906 skyblue: '#87ceeb',
14907 slateblue: '#6a5acd',
14908 slategray: '#708090',
14909 slategrey: '#708090',
14911 springgreen: '#00ff7f',
14912 steelblue: '#4682b4',
14915 thistle: '#d8bfd8',
14917 turquoise: '#40e0d0',
14921 whitesmoke: '#f5f5f5',
14923 yellowgreen: '#9acd32'
14925 var colorKeywords = {
14926 'currentColor': 'The value of the \'color\' property. The computed value of the \'currentColor\' keyword is the computed value of the \'color\' property. If the \'currentColor\' keyword is set on the \'color\' property itself, it is treated as \'color:inherit\' at parse time.',
14927 'transparent': 'Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value.',
14929 function getNumericValue(node, factor) {
14930 var val = node.getText();
14931 var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);
14936 var result = parseFloat(m[1]) / factor;
14937 if (result >= 0 && result <= 1) {
14943 function getAngle(node) {
14944 var val = node.getText();
14945 var m = val.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);
14947 return parseFloat(val) % 360;
14951 function isColorConstructor(node) {
14952 var name = node.getName();
14956 return /^(rgb|rgba|hsl|hsla)$/gi.test(name);
14959 * Returns true if the node is a color value - either
14960 * defined a hex number, as rgb or rgba function, or
14963 function isColorValue(node) {
14964 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.HexColorValue) {
14967 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Function) {
14968 return isColorConstructor(node);
14970 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Identifier) {
14971 if (node.parent && node.parent.type !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Term) {
14974 var candidateColor = node.getText().toLowerCase();
14975 if (candidateColor === 'none') {
14978 if (colors[candidateColor]) {
14990 function hexDigit(charCode) {
14991 if (charCode < Digit0) {
14994 if (charCode <= Digit9) {
14995 return charCode - Digit0;
14997 if (charCode < a) {
14998 charCode += (a - A);
15000 if (charCode >= a && charCode <= f) {
15001 return charCode - a + 10;
15005 function colorFromHex(text) {
15006 if (text[0] !== '#') {
15009 switch (text.length) {
15012 red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
15013 green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
15014 blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
15019 red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
15020 green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
15021 blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
15022 alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,
15026 red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
15027 green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
15028 blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
15033 red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
15034 green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
15035 blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
15036 alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0
15041 function colorFrom256RGB(red, green, blue, alpha) {
15042 if (alpha === void 0) { alpha = 1.0; }
15045 green: green / 255.0,
15046 blue: blue / 255.0,
15050 function colorFromHSL(hue, sat, light, alpha) {
15051 if (alpha === void 0) { alpha = 1.0; }
15054 return { red: light, green: light, blue: light, alpha: alpha };
15057 var hueToRgb = function (t1, t2, hue) {
15065 return (t2 - t1) * hue + t1;
15071 return (t2 - t1) * (4 - hue) + t1;
15075 var t2 = light <= 0.5 ? (light * (sat + 1)) : (light + sat - (light * sat));
15076 var t1 = light * 2 - t2;
15077 return { red: hueToRgb(t1, t2, hue + 2), green: hueToRgb(t1, t2, hue), blue: hueToRgb(t1, t2, hue - 2), alpha: alpha };
15080 function hslFromColor(rgba) {
15082 var g = rgba.green;
15084 var a = rgba.alpha;
15085 var max = Math.max(r, g, b);
15086 var min = Math.min(r, g, b);
15089 var l = (min + max) / 2;
15090 var chroma = max - min;
15092 s = Math.min((l <= 0.5 ? chroma / (2 * l) : chroma / (2 - (2 * l))), 1);
15095 h = (g - b) / chroma + (g < b ? 6 : 0);
15098 h = (b - r) / chroma + 2;
15101 h = (r - g) / chroma + 4;
15107 return { h: h, s: s, l: l, a: a };
15109 function getColorValue(node) {
15110 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.HexColorValue) {
15111 var text = node.getText();
15112 return colorFromHex(text);
15114 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Function) {
15115 var functionNode = node;
15116 var name = functionNode.getName();
15117 var colorValues = functionNode.getArguments().getChildren();
15118 if (!name || colorValues.length < 3 || colorValues.length > 4) {
15122 var alpha = colorValues.length === 4 ? getNumericValue(colorValues[3], 1) : 1;
15123 if (name === 'rgb' || name === 'rgba') {
15125 red: getNumericValue(colorValues[0], 255.0),
15126 green: getNumericValue(colorValues[1], 255.0),
15127 blue: getNumericValue(colorValues[2], 255.0),
15131 else if (name === 'hsl' || name === 'hsla') {
15132 var h = getAngle(colorValues[0]);
15133 var s = getNumericValue(colorValues[1], 100.0);
15134 var l = getNumericValue(colorValues[2], 100.0);
15135 return colorFromHSL(h, s, l, alpha);
15139 // parse error on numeric value
15143 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Identifier) {
15144 if (node.parent && node.parent.type !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Term) {
15147 var term = node.parent;
15148 if (term && term.parent && term.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.BinaryExpression) {
15149 var expression = term.parent;
15150 if (expression.parent && expression.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ListEntry && expression.parent.key === expression) {
15154 var candidateColor = node.getText().toLowerCase();
15155 if (candidateColor === 'none') {
15158 var colorHex = colors[candidateColor];
15160 return colorFromHex(colorHex);
15169 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15171 __webpack_require__.r(__webpack_exports__);
15172 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15173 /* harmony export */ "positionKeywords": () => /* binding */ positionKeywords,
15174 /* harmony export */ "repeatStyleKeywords": () => /* binding */ repeatStyleKeywords,
15175 /* harmony export */ "lineStyleKeywords": () => /* binding */ lineStyleKeywords,
15176 /* harmony export */ "lineWidthKeywords": () => /* binding */ lineWidthKeywords,
15177 /* harmony export */ "boxKeywords": () => /* binding */ boxKeywords,
15178 /* harmony export */ "geometryBoxKeywords": () => /* binding */ geometryBoxKeywords,
15179 /* harmony export */ "cssWideKeywords": () => /* binding */ cssWideKeywords,
15180 /* harmony export */ "imageFunctions": () => /* binding */ imageFunctions,
15181 /* harmony export */ "transitionTimingFunctions": () => /* binding */ transitionTimingFunctions,
15182 /* harmony export */ "basicShapeFunctions": () => /* binding */ basicShapeFunctions,
15183 /* harmony export */ "units": () => /* binding */ units,
15184 /* harmony export */ "html5Tags": () => /* binding */ html5Tags,
15185 /* harmony export */ "svgElements": () => /* binding */ svgElements,
15186 /* harmony export */ "pageBoxDirectives": () => /* binding */ pageBoxDirectives
15187 /* harmony export */ });
15188 /*---------------------------------------------------------------------------------------------
15189 * Copyright (c) Microsoft Corporation. All rights reserved.
15190 * Licensed under the MIT License. See License.txt in the project root for license information.
15191 *--------------------------------------------------------------------------------------------*/
15193 var positionKeywords = {
15194 'bottom': 'Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.',
15195 'center': 'Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.',
15196 'left': 'Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.',
15197 'right': 'Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.',
15198 'top': 'Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset.'
15200 var repeatStyleKeywords = {
15201 'no-repeat': 'Placed once and not repeated in this direction.',
15202 'repeat': 'Repeated in this direction as often as needed to cover the background painting area.',
15203 'repeat-x': 'Computes to ‘repeat no-repeat’.',
15204 'repeat-y': 'Computes to ‘no-repeat repeat’.',
15205 'round': 'Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.',
15206 'space': 'Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area.'
15208 var lineStyleKeywords = {
15209 'dashed': 'A series of square-ended dashes.',
15210 'dotted': 'A series of round dots.',
15211 'double': 'Two parallel solid lines with some space between them.',
15212 'groove': 'Looks as if it were carved in the canvas.',
15213 'hidden': 'Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.',
15214 'inset': 'Looks as if the content on the inside of the border is sunken into the canvas.',
15215 'none': 'No border. Color and width are ignored.',
15216 'outset': 'Looks as if the content on the inside of the border is coming out of the canvas.',
15217 'ridge': 'Looks as if it were coming out of the canvas.',
15218 'solid': 'A single line segment.'
15220 var lineWidthKeywords = ['medium', 'thick', 'thin'];
15221 var boxKeywords = {
15222 'border-box': 'The background is painted within (clipped to) the border box.',
15223 'content-box': 'The background is painted within (clipped to) the content box.',
15224 'padding-box': 'The background is painted within (clipped to) the padding box.'
15226 var geometryBoxKeywords = {
15227 'margin-box': 'Uses the margin box as reference box.',
15228 'fill-box': 'Uses the object bounding box as reference box.',
15229 'stroke-box': 'Uses the stroke bounding box as reference box.',
15230 'view-box': 'Uses the nearest SVG viewport as reference box.'
15232 var cssWideKeywords = {
15233 'initial': 'Represents the value specified as the property’s initial value.',
15234 'inherit': 'Represents the computed value of the property on the element’s parent.',
15235 'unset': 'Acts as either `inherit` or `initial`, depending on whether the property is inherited or not.'
15237 var imageFunctions = {
15238 'url()': 'Reference an image file by URL',
15239 'image()': 'Provide image fallbacks and annotations.',
15240 '-webkit-image-set()': 'Provide multiple resolutions. Remember to use unprefixed image-set() in addition.',
15241 'image-set()': 'Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.',
15242 '-moz-element()': 'Use an element in the document as an image. Remember to use unprefixed element() in addition.',
15243 'element()': 'Use an element in the document as an image.',
15244 'cross-fade()': 'Indicates the two images to be combined and how far along in the transition the combination is.',
15245 '-webkit-gradient()': 'Deprecated. Use modern linear-gradient() or radial-gradient() instead.',
15246 '-webkit-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
15247 '-moz-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
15248 '-o-linear-gradient()': 'Linear gradient. Remember to use unprefixed version in addition.',
15249 'linear-gradient()': 'A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.',
15250 '-webkit-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
15251 '-moz-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
15252 '-o-repeating-linear-gradient()': 'Repeating Linear gradient. Remember to use unprefixed version in addition.',
15253 'repeating-linear-gradient()': 'Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.',
15254 '-webkit-radial-gradient()': 'Radial gradient. Remember to use unprefixed version in addition.',
15255 '-moz-radial-gradient()': 'Radial gradient. Remember to use unprefixed version in addition.',
15256 'radial-gradient()': 'Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.',
15257 '-webkit-repeating-radial-gradient()': 'Repeating radial gradient. Remember to use unprefixed version in addition.',
15258 '-moz-repeating-radial-gradient()': 'Repeating radial gradient. Remember to use unprefixed version in addition.',
15259 'repeating-radial-gradient()': 'Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.'
15261 var transitionTimingFunctions = {
15262 'ease': 'Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).',
15263 'ease-in': 'Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).',
15264 'ease-in-out': 'Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).',
15265 'ease-out': 'Equivalent to cubic-bezier(0, 0, 0.58, 1.0).',
15266 'linear': 'Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).',
15267 'step-end': 'Equivalent to steps(1, end).',
15268 'step-start': 'Equivalent to steps(1, start).',
15269 'steps()': 'The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.',
15270 'cubic-bezier()': 'Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).',
15271 'cubic-bezier(0.6, -0.28, 0.735, 0.045)': 'Ease-in Back. Overshoots.',
15272 'cubic-bezier(0.68, -0.55, 0.265, 1.55)': 'Ease-in-out Back. Overshoots.',
15273 'cubic-bezier(0.175, 0.885, 0.32, 1.275)': 'Ease-out Back. Overshoots.',
15274 'cubic-bezier(0.6, 0.04, 0.98, 0.335)': 'Ease-in Circular. Based on half circle.',
15275 'cubic-bezier(0.785, 0.135, 0.15, 0.86)': 'Ease-in-out Circular. Based on half circle.',
15276 'cubic-bezier(0.075, 0.82, 0.165, 1)': 'Ease-out Circular. Based on half circle.',
15277 'cubic-bezier(0.55, 0.055, 0.675, 0.19)': 'Ease-in Cubic. Based on power of three.',
15278 'cubic-bezier(0.645, 0.045, 0.355, 1)': 'Ease-in-out Cubic. Based on power of three.',
15279 'cubic-bezier(0.215, 0.610, 0.355, 1)': 'Ease-out Cubic. Based on power of three.',
15280 'cubic-bezier(0.95, 0.05, 0.795, 0.035)': 'Ease-in Exponential. Based on two to the power ten.',
15281 'cubic-bezier(1, 0, 0, 1)': 'Ease-in-out Exponential. Based on two to the power ten.',
15282 'cubic-bezier(0.19, 1, 0.22, 1)': 'Ease-out Exponential. Based on two to the power ten.',
15283 'cubic-bezier(0.47, 0, 0.745, 0.715)': 'Ease-in Sine.',
15284 'cubic-bezier(0.445, 0.05, 0.55, 0.95)': 'Ease-in-out Sine.',
15285 'cubic-bezier(0.39, 0.575, 0.565, 1)': 'Ease-out Sine.',
15286 'cubic-bezier(0.55, 0.085, 0.68, 0.53)': 'Ease-in Quadratic. Based on power of two.',
15287 'cubic-bezier(0.455, 0.03, 0.515, 0.955)': 'Ease-in-out Quadratic. Based on power of two.',
15288 'cubic-bezier(0.25, 0.46, 0.45, 0.94)': 'Ease-out Quadratic. Based on power of two.',
15289 'cubic-bezier(0.895, 0.03, 0.685, 0.22)': 'Ease-in Quartic. Based on power of four.',
15290 'cubic-bezier(0.77, 0, 0.175, 1)': 'Ease-in-out Quartic. Based on power of four.',
15291 'cubic-bezier(0.165, 0.84, 0.44, 1)': 'Ease-out Quartic. Based on power of four.',
15292 'cubic-bezier(0.755, 0.05, 0.855, 0.06)': 'Ease-in Quintic. Based on power of five.',
15293 'cubic-bezier(0.86, 0, 0.07, 1)': 'Ease-in-out Quintic. Based on power of five.',
15294 'cubic-bezier(0.23, 1, 0.320, 1)': 'Ease-out Quintic. Based on power of five.'
15296 var basicShapeFunctions = {
15297 'circle()': 'Defines a circle.',
15298 'ellipse()': 'Defines an ellipse.',
15299 'inset()': 'Defines an inset rectangle.',
15300 'polygon()': 'Defines a polygon.'
15303 'length': ['em', 'rem', 'ex', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'vw', 'vh', 'vmin', 'vmax'],
15304 'angle': ['deg', 'rad', 'grad', 'turn'],
15305 'time': ['ms', 's'],
15306 'frequency': ['Hz', 'kHz'],
15307 'resolution': ['dpi', 'dpcm', 'dppx'],
15308 'percentage': ['%', 'fr']
15310 var html5Tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption',
15311 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer',
15312 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link',
15313 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q',
15314 'rb', 'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td',
15315 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'const', 'video', 'wbr'];
15316 var svgElements = ['circle', 'clipPath', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting',
15317 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology',
15318 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'foreignObject', 'g', 'hatch', 'hatchpath', 'image', 'line', 'linearGradient',
15319 'marker', 'mask', 'mesh', 'meshpatch', 'meshrow', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'solidcolor', 'stop', 'svg', 'switch',
15320 'symbol', 'text', 'textPath', 'tspan', 'use', 'view'];
15321 var pageBoxDirectives = [
15322 '@bottom-center', '@bottom-left', '@bottom-left-corner', '@bottom-right', '@bottom-right-corner',
15323 '@left-bottom', '@left-middle', '@left-top', '@right-bottom', '@right-middle', '@right-top',
15324 '@top-center', '@top-left', '@top-left-corner', '@top-right', '@top-right-corner'
15330 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15332 __webpack_require__.r(__webpack_exports__);
15333 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15334 /* harmony export */ "values": () => /* binding */ values,
15335 /* harmony export */ "isDefined": () => /* binding */ isDefined
15336 /* harmony export */ });
15337 /*---------------------------------------------------------------------------------------------
15338 * Copyright (c) Microsoft Corporation. All rights reserved.
15339 * Licensed under the MIT License. See License.txt in the project root for license information.
15340 *--------------------------------------------------------------------------------------------*/
15342 function values(obj) {
15343 return Object.keys(obj).map(function (key) { return obj[key]; });
15345 function isDefined(obj) {
15346 return typeof obj !== 'undefined';
15352 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15354 __webpack_require__.r(__webpack_exports__);
15355 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15356 /* harmony export */ "CSSCompletion": () => /* binding */ CSSCompletion
15357 /* harmony export */ });
15358 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
15359 /* harmony import */ var _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86);
15360 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80);
15361 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75);
15362 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88);
15363 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77);
15364 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(84);
15365 /* harmony import */ var _pathCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91);
15366 /*---------------------------------------------------------------------------------------------
15367 * Copyright (c) Microsoft Corporation. All rights reserved.
15368 * Licensed under the MIT License. See License.txt in the project root for license information.
15369 *--------------------------------------------------------------------------------------------*/
15371 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
15372 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15373 return new (P || (P = Promise))(function (resolve, reject) {
15374 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15375 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15376 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
15377 step((generator = generator.apply(thisArg, _arguments || [])).next());
15380 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
15381 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15382 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
15383 function verb(n) { return function (v) { return step([n, v]); }; }
15384 function step(op) {
15385 if (f) throw new TypeError("Generator is already executing.");
15387 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
15388 if (y = 0, t) op = [op[0] & 2, t.value];
15390 case 0: case 1: t = op; break;
15391 case 4: _.label++; return { value: op[1], done: false };
15392 case 5: _.label++; y = op[1]; op = [0]; continue;
15393 case 7: op = _.ops.pop(); _.trys.pop(); continue;
15395 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
15396 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
15397 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
15398 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
15399 if (t[2]) _.ops.pop();
15400 _.trys.pop(); continue;
15402 op = body.call(thisArg, _);
15403 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
15404 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
15415 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_5__.loadMessageBundle();
15416 var SnippetFormat = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.InsertTextFormat.Snippet;
15418 (function (SortTexts) {
15419 // char code 32, comes before everything
15420 SortTexts["Enums"] = " ";
15421 SortTexts["Normal"] = "d";
15422 SortTexts["VendorPrefixed"] = "x";
15423 SortTexts["Term"] = "y";
15424 SortTexts["Variable"] = "z";
15425 })(SortTexts || (SortTexts = {}));
15426 var CSSCompletion = /** @class */ (function () {
15427 function CSSCompletion(variablePrefix, lsOptions, cssDataManager) {
15428 if (variablePrefix === void 0) { variablePrefix = null; }
15429 this.variablePrefix = variablePrefix;
15430 this.lsOptions = lsOptions;
15431 this.cssDataManager = cssDataManager;
15432 this.completionParticipants = [];
15434 CSSCompletion.prototype.configure = function (settings) {
15435 this.settings = settings;
15437 CSSCompletion.prototype.getSymbolContext = function () {
15438 if (!this.symbolContext) {
15439 this.symbolContext = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_1__.Symbols(this.styleSheet);
15441 return this.symbolContext;
15443 CSSCompletion.prototype.setCompletionParticipants = function (registeredCompletionParticipants) {
15444 this.completionParticipants = registeredCompletionParticipants || [];
15446 CSSCompletion.prototype.doComplete2 = function (document, position, styleSheet, documentContext) {
15447 return __awaiter(this, void 0, void 0, function () {
15448 var participant, contributedParticipants, result, pathCompletionResult;
15449 return __generator(this, function (_a) {
15450 switch (_a.label) {
15452 if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) {
15453 return [2 /*return*/, this.doComplete(document, position, styleSheet)];
15455 participant = new _pathCompletion__WEBPACK_IMPORTED_MODULE_7__.PathCompletionParticipant(this.lsOptions.fileSystemProvider.readDirectory);
15456 contributedParticipants = this.completionParticipants;
15457 this.completionParticipants = [participant].concat(contributedParticipants);
15458 result = this.doComplete(document, position, styleSheet);
15461 _a.trys.push([1, , 3, 4]);
15462 return [4 /*yield*/, participant.computeCompletions(document, documentContext)];
15464 pathCompletionResult = _a.sent();
15465 return [2 /*return*/, {
15466 isIncomplete: result.isIncomplete || pathCompletionResult.isIncomplete,
15467 items: pathCompletionResult.items.concat(result.items)
15470 this.completionParticipants = contributedParticipants;
15471 return [7 /*endfinally*/];
15472 case 4: return [2 /*return*/];
15477 CSSCompletion.prototype.doComplete = function (document, position, styleSheet) {
15478 this.offset = document.offsetAt(position);
15479 this.position = position;
15480 this.currentWord = getCurrentWord(document, this.offset);
15481 this.defaultReplaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.Range.create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.Position.create(this.position.line, this.position.character - this.currentWord.length), this.position);
15482 this.textDocument = document;
15483 this.styleSheet = styleSheet;
15485 var result = { isIncomplete: false, items: [] };
15486 this.nodePath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.getNodePath(this.styleSheet, this.offset);
15487 for (var i = this.nodePath.length - 1; i >= 0; i--) {
15488 var node = this.nodePath[i];
15489 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Property) {
15490 this.getCompletionsForDeclarationProperty(node.getParent(), result);
15492 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Expression) {
15493 if (node.parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Interpolation) {
15494 this.getVariableProposals(null, result);
15497 this.getCompletionsForExpression(node, result);
15500 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector) {
15501 var parentRef = node.findAParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ExtendsReference, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Ruleset);
15503 if (parentRef.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ExtendsReference) {
15504 this.getCompletionsForExtendsReference(parentRef, node, result);
15507 var parentRuleSet = parentRef;
15508 this.getCompletionsForSelector(parentRuleSet, parentRuleSet && parentRuleSet.isNested(), result);
15512 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionArgument) {
15513 this.getCompletionsForFunctionArgument(node, node.getParent(), result);
15515 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declarations) {
15516 this.getCompletionsForDeclarations(node, result);
15518 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.VariableDeclaration) {
15519 this.getCompletionsForVariableDeclaration(node, result);
15521 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
15522 this.getCompletionsForRuleSet(node, result);
15524 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Interpolation) {
15525 this.getCompletionsForInterpolation(node, result);
15527 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionDeclaration) {
15528 this.getCompletionsForFunctionDeclaration(node, result);
15530 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.MixinReference) {
15531 this.getCompletionsForMixinReference(node, result);
15533 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Function) {
15534 this.getCompletionsForFunctionArgument(null, node, result);
15536 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Supports) {
15537 this.getCompletionsForSupports(node, result);
15539 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SupportsCondition) {
15540 this.getCompletionsForSupportsCondition(node, result);
15542 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ExtendsReference) {
15543 this.getCompletionsForExtendsReference(node, null, result);
15545 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.URILiteral) {
15546 this.getCompletionForUriLiteralValue(node, result);
15548 else if (node.parent === null) {
15549 this.getCompletionForTopLevel(result);
15551 else if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.StringLiteral && this.isImportPathParent(node.parent.type)) {
15552 this.getCompletionForImportPath(node, result);
15553 // } else if (node instanceof nodes.Variable) {
15554 // this.getCompletionsForVariableDeclaration()
15559 if (result.items.length > 0 || this.offset > node.offset) {
15560 return this.finalize(result);
15563 this.getCompletionsForStylesheet(result);
15564 if (result.items.length === 0) {
15565 if (this.variablePrefix && this.currentWord.indexOf(this.variablePrefix) === 0) {
15566 this.getVariableProposals(null, result);
15569 return this.finalize(result);
15572 // don't hold on any state, clear symbolContext
15573 this.position = null;
15574 this.currentWord = null;
15575 this.textDocument = null;
15576 this.styleSheet = null;
15577 this.symbolContext = null;
15578 this.defaultReplaceRange = null;
15579 this.nodePath = null;
15582 CSSCompletion.prototype.isImportPathParent = function (type) {
15583 return type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Import;
15585 CSSCompletion.prototype.finalize = function (result) {
15588 CSSCompletion.prototype.findInNodePath = function () {
15590 for (var _i = 0; _i < arguments.length; _i++) {
15591 types[_i] = arguments[_i];
15593 for (var i = this.nodePath.length - 1; i >= 0; i--) {
15594 var node = this.nodePath[i];
15595 if (types.indexOf(node.type) !== -1) {
15601 CSSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
15602 return this.getPropertyProposals(declaration, result);
15604 CSSCompletion.prototype.getPropertyProposals = function (declaration, result) {
15606 var triggerPropertyValueCompletion = this.isTriggerPropertyValueCompletionEnabled;
15607 var completePropertyWithSemicolon = this.isCompletePropertyWithSemicolonEnabled;
15608 var properties = this.cssDataManager.getProperties();
15609 properties.forEach(function (entry) {
15612 var retrigger = false;
15614 range = _this.getCompletionRange(declaration.getProperty());
15615 insertText = entry.name;
15616 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(declaration.colonPosition)) {
15617 insertText += ': ';
15622 range = _this.getCompletionRange(null);
15623 insertText = entry.name + ': ';
15626 // Empty .selector { | } case
15627 if (!declaration && completePropertyWithSemicolon) {
15628 insertText += '$0;';
15630 // Cases such as .selector { p; } or .selector { p:; }
15631 if (declaration && !declaration.semicolonPosition) {
15632 if (completePropertyWithSemicolon && _this.offset >= _this.textDocument.offsetAt(range.end)) {
15633 insertText += '$0;';
15638 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(entry, _this.doesSupportMarkdown()),
15639 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemTag.Deprecated] : [],
15640 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(range, insertText),
15641 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.InsertTextFormat.Snippet,
15642 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Property
15644 if (!entry.restrictions) {
15647 if (triggerPropertyValueCompletion && retrigger) {
15650 command: 'editor.action.triggerSuggest'
15653 var relevance = typeof entry.relevance === 'number' ? Math.min(Math.max(entry.relevance, 0), 99) : 50;
15654 var sortTextSuffix = (255 - relevance).toString(16);
15655 var sortTextPrefix = _utils_strings__WEBPACK_IMPORTED_MODULE_3__.startsWith(entry.name, '-') ? SortTexts.VendorPrefixed : SortTexts.Normal;
15656 item.sortText = sortTextPrefix + '_' + sortTextSuffix;
15657 result.items.push(item);
15659 this.completionParticipants.forEach(function (participant) {
15660 if (participant.onCssProperty) {
15661 participant.onCssProperty({
15662 propertyName: _this.currentWord,
15663 range: _this.defaultReplaceRange
15669 Object.defineProperty(CSSCompletion.prototype, "isTriggerPropertyValueCompletionEnabled", {
15671 if (!this.settings ||
15672 !this.settings.completion ||
15673 this.settings.completion.triggerPropertyValueCompletion === undefined) {
15676 return this.settings.completion.triggerPropertyValueCompletion;
15681 Object.defineProperty(CSSCompletion.prototype, "isCompletePropertyWithSemicolonEnabled", {
15683 if (!this.settings ||
15684 !this.settings.completion ||
15685 this.settings.completion.completePropertyWithSemicolon === undefined) {
15688 return this.settings.completion.completePropertyWithSemicolon;
15693 CSSCompletion.prototype.getCompletionsForDeclarationValue = function (node, result) {
15695 var propertyName = node.getFullPropertyName();
15696 var entry = this.cssDataManager.getProperty(propertyName);
15697 var existingNode = node.getValue() || null;
15698 while (existingNode && existingNode.hasChildren()) {
15699 existingNode = existingNode.findChildAtOffset(this.offset, false);
15701 this.completionParticipants.forEach(function (participant) {
15702 if (participant.onCssPropertyValue) {
15703 participant.onCssPropertyValue({
15704 propertyName: propertyName,
15705 propertyValue: _this.currentWord,
15706 range: _this.getCompletionRange(existingNode)
15711 if (entry.restrictions) {
15712 for (var _i = 0, _a = entry.restrictions; _i < _a.length; _i++) {
15713 var restriction = _a[_i];
15714 switch (restriction) {
15716 this.getColorProposals(entry, existingNode, result);
15719 this.getPositionProposals(entry, existingNode, result);
15722 this.getRepeatStyleProposals(entry, existingNode, result);
15725 this.getLineStyleProposals(entry, existingNode, result);
15728 this.getLineWidthProposals(entry, existingNode, result);
15730 case 'geometry-box':
15731 this.getGeometryBoxProposals(entry, existingNode, result);
15734 this.getBoxProposals(entry, existingNode, result);
15737 this.getImageProposals(entry, existingNode, result);
15739 case 'timing-function':
15740 this.getTimingFunctionProposals(entry, existingNode, result);
15743 this.getBasicShapeProposals(entry, existingNode, result);
15748 this.getValueEnumProposals(entry, existingNode, result);
15749 this.getCSSWideKeywordProposals(entry, existingNode, result);
15750 this.getUnitProposals(entry, existingNode, result);
15753 var existingValues = collectValues(this.styleSheet, node);
15754 for (var _b = 0, _c = existingValues.getEntries(); _b < _c.length; _b++) {
15755 var existingValue = _c[_b];
15756 result.items.push({
15757 label: existingValue,
15758 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), existingValue),
15759 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
15763 this.getVariableProposals(existingNode, result);
15764 this.getTermProposals(entry, existingNode, result);
15767 CSSCompletion.prototype.getValueEnumProposals = function (entry, existingNode, result) {
15768 if (entry.values) {
15769 for (var _i = 0, _a = entry.values; _i < _a.length; _i++) {
15770 var value = _a[_i];
15771 var insertString = value.name;
15772 var insertTextFormat = void 0;
15773 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__.endsWith(insertString, ')')) {
15774 var from = insertString.lastIndexOf('(');
15776 insertString = insertString.substr(0, from) + '($1)';
15777 insertTextFormat = SnippetFormat;
15780 var sortText = SortTexts.Enums;
15781 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__.startsWith(value.name, '-')) {
15782 sortText += SortTexts.VendorPrefixed;
15786 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(value, this.doesSupportMarkdown()),
15787 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemTag.Deprecated] : [],
15788 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), insertString),
15789 sortText: sortText,
15790 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value,
15791 insertTextFormat: insertTextFormat
15793 result.items.push(item);
15798 CSSCompletion.prototype.getCSSWideKeywordProposals = function (entry, existingNode, result) {
15799 for (var keywords in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.cssWideKeywords) {
15800 result.items.push({
15802 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.cssWideKeywords[keywords],
15803 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), keywords),
15804 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
15809 CSSCompletion.prototype.getCompletionsForInterpolation = function (node, result) {
15810 if (this.offset >= node.offset + 2) {
15811 this.getVariableProposals(null, result);
15815 CSSCompletion.prototype.getVariableProposals = function (existingNode, result) {
15816 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15817 for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
15818 var symbol = symbols_1[_i];
15819 var insertText = _utils_strings__WEBPACK_IMPORTED_MODULE_3__.startsWith(symbol.name, '--') ? "var(" + symbol.name + ")" : symbol.name;
15820 var completionItem = {
15821 label: symbol.name,
15822 documentation: symbol.value ? _utils_strings__WEBPACK_IMPORTED_MODULE_3__.getLimitedString(symbol.value) : symbol.value,
15823 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
15824 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Variable,
15825 sortText: SortTexts.Variable
15827 if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
15828 completionItem.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Color;
15830 if (symbol.node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.FunctionParameter) {
15831 var mixinNode = (symbol.node.getParent());
15832 if (mixinNode.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.MixinDeclaration) {
15833 completionItem.detail = localize('completion.argument', 'argument from \'{0}\'', mixinNode.getName());
15836 result.items.push(completionItem);
15840 CSSCompletion.prototype.getVariableProposalsForCSSVarFunction = function (result) {
15841 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
15842 symbols = symbols.filter(function (symbol) {
15843 return _utils_strings__WEBPACK_IMPORTED_MODULE_3__.startsWith(symbol.name, '--');
15845 for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) {
15846 var symbol = symbols_2[_i];
15847 var completionItem = {
15848 label: symbol.name,
15849 documentation: symbol.value ? _utils_strings__WEBPACK_IMPORTED_MODULE_3__.getLimitedString(symbol.value) : symbol.value,
15850 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(null), symbol.name),
15851 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Variable
15853 if (typeof completionItem.documentation === 'string' && isColorString(completionItem.documentation)) {
15854 completionItem.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Color;
15856 result.items.push(completionItem);
15860 CSSCompletion.prototype.getUnitProposals = function (entry, existingNode, result) {
15861 var currentWord = '0';
15862 if (this.currentWord.length > 0) {
15863 var numMatch = this.currentWord.match(/^-?\d[\.\d+]*/);
15865 currentWord = numMatch[0];
15866 result.isIncomplete = currentWord.length === this.currentWord.length;
15869 else if (this.currentWord.length === 0) {
15870 result.isIncomplete = true;
15872 if (existingNode && existingNode.parent && existingNode.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Term) {
15873 existingNode = existingNode.getParent(); // include the unary operator
15875 if (entry.restrictions) {
15876 for (var _i = 0, _a = entry.restrictions; _i < _a.length; _i++) {
15877 var restriction = _a[_i];
15878 var units = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.units[restriction];
15880 for (var _b = 0, units_1 = units; _b < units_1.length; _b++) {
15881 var unit = units_1[_b];
15882 var insertText = currentWord + unit;
15883 result.items.push({
15885 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
15886 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Unit
15894 CSSCompletion.prototype.getCompletionRange = function (existingNode) {
15895 if (existingNode && existingNode.offset <= this.offset && this.offset <= existingNode.end) {
15896 var end = existingNode.end !== -1 ? this.textDocument.positionAt(existingNode.end) : this.position;
15897 var start = this.textDocument.positionAt(existingNode.offset);
15898 if (start.line === end.line) {
15899 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.Range.create(start, end); // multi line edits are not allowed
15902 return this.defaultReplaceRange;
15904 CSSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
15905 for (var color in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colors) {
15906 result.items.push({
15908 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colors[color],
15909 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), color),
15910 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Color
15913 for (var color in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colorKeywords) {
15914 result.items.push({
15916 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colorKeywords[color],
15917 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), color),
15918 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
15921 var colorValues = new Set();
15922 this.styleSheet.acceptVisitor(new ColorValueCollector(colorValues, this.offset));
15923 for (var _i = 0, _a = colorValues.getEntries(); _i < _a.length; _i++) {
15924 var color = _a[_i];
15925 result.items.push({
15927 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), color),
15928 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Color
15931 var _loop_1 = function (p) {
15933 var replaceFunction = function (_match, p1) { return '${' + tabStop++ + ':' + p1 + '}'; };
15934 var insertText = p.func.replace(/\[?\$(\w+)\]?/g, replaceFunction);
15935 result.items.push({
15936 label: p.func.substr(0, p.func.indexOf('(')),
15938 documentation: p.desc,
15939 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this_1.getCompletionRange(existingNode), insertText),
15940 insertTextFormat: SnippetFormat,
15941 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Function
15945 for (var _b = 0, _c = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colorFunctions; _b < _c.length; _b++) {
15951 CSSCompletion.prototype.getPositionProposals = function (entry, existingNode, result) {
15952 for (var position in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.positionKeywords) {
15953 result.items.push({
15955 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.positionKeywords[position],
15956 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), position),
15957 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
15962 CSSCompletion.prototype.getRepeatStyleProposals = function (entry, existingNode, result) {
15963 for (var repeat in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.repeatStyleKeywords) {
15964 result.items.push({
15966 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.repeatStyleKeywords[repeat],
15967 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), repeat),
15968 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
15973 CSSCompletion.prototype.getLineStyleProposals = function (entry, existingNode, result) {
15974 for (var lineStyle in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.lineStyleKeywords) {
15975 result.items.push({
15977 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.lineStyleKeywords[lineStyle],
15978 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), lineStyle),
15979 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
15984 CSSCompletion.prototype.getLineWidthProposals = function (entry, existingNode, result) {
15985 for (var _i = 0, _a = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.lineWidthKeywords; _i < _a.length; _i++) {
15986 var lineWidth = _a[_i];
15987 result.items.push({
15989 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), lineWidth),
15990 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
15995 CSSCompletion.prototype.getGeometryBoxProposals = function (entry, existingNode, result) {
15996 for (var box in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.geometryBoxKeywords) {
15997 result.items.push({
15999 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.geometryBoxKeywords[box],
16000 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), box),
16001 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
16006 CSSCompletion.prototype.getBoxProposals = function (entry, existingNode, result) {
16007 for (var box in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.boxKeywords) {
16008 result.items.push({
16010 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.boxKeywords[box],
16011 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), box),
16012 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Value
16017 CSSCompletion.prototype.getImageProposals = function (entry, existingNode, result) {
16018 for (var image in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.imageFunctions) {
16019 var insertText = moveCursorInsideParenthesis(image);
16020 result.items.push({
16022 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.imageFunctions[image],
16023 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
16024 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Function,
16025 insertTextFormat: image !== insertText ? SnippetFormat : void 0
16030 CSSCompletion.prototype.getTimingFunctionProposals = function (entry, existingNode, result) {
16031 for (var timing in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.transitionTimingFunctions) {
16032 var insertText = moveCursorInsideParenthesis(timing);
16033 result.items.push({
16035 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.transitionTimingFunctions[timing],
16036 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
16037 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Function,
16038 insertTextFormat: timing !== insertText ? SnippetFormat : void 0
16043 CSSCompletion.prototype.getBasicShapeProposals = function (entry, existingNode, result) {
16044 for (var shape in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.basicShapeFunctions) {
16045 var insertText = moveCursorInsideParenthesis(shape);
16046 result.items.push({
16048 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.basicShapeFunctions[shape],
16049 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
16050 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Function,
16051 insertTextFormat: shape !== insertText ? SnippetFormat : void 0
16056 CSSCompletion.prototype.getCompletionsForStylesheet = function (result) {
16057 var node = this.styleSheet.findFirstChildBeforeOffset(this.offset);
16059 return this.getCompletionForTopLevel(result);
16061 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
16062 return this.getCompletionsForRuleSet(node, result);
16064 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Supports) {
16065 return this.getCompletionsForSupports(node, result);
16069 CSSCompletion.prototype.getCompletionForTopLevel = function (result) {
16071 this.cssDataManager.getAtDirectives().forEach(function (entry) {
16072 result.items.push({
16074 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(_this.getCompletionRange(null), entry.name),
16075 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(entry, _this.doesSupportMarkdown()),
16076 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemTag.Deprecated] : [],
16077 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Keyword
16080 this.getCompletionsForSelector(null, false, result);
16083 CSSCompletion.prototype.getCompletionsForRuleSet = function (ruleSet, result) {
16084 var declarations = ruleSet.getDeclarations();
16085 var isAfter = declarations && declarations.endsWith('}') && this.offset >= declarations.end;
16087 return this.getCompletionForTopLevel(result);
16089 var isInSelectors = !declarations || this.offset <= declarations.offset;
16090 if (isInSelectors) {
16091 return this.getCompletionsForSelector(ruleSet, ruleSet.isNested(), result);
16093 return this.getCompletionsForDeclarations(ruleSet.getDeclarations(), result);
16095 CSSCompletion.prototype.getCompletionsForSelector = function (ruleSet, isNested, result) {
16097 var existingNode = this.findInNodePath(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.PseudoSelector, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.IdentifierSelector, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ClassSelector, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ElementNameSelector);
16098 if (!existingNode && this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ':')) {
16099 // after the ':' of a pseudo selector, no node generated for just ':'
16100 this.currentWord = ':' + this.currentWord;
16101 if (this.hasCharacterAtPosition(this.offset - this.currentWord.length - 1, ':')) {
16102 this.currentWord = ':' + this.currentWord; // for '::'
16104 this.defaultReplaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.Range.create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.Position.create(this.position.line, this.position.character - this.currentWord.length), this.position);
16106 var pseudoClasses = this.cssDataManager.getPseudoClasses();
16107 pseudoClasses.forEach(function (entry) {
16108 var insertText = moveCursorInsideParenthesis(entry.name);
16111 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(_this.getCompletionRange(existingNode), insertText),
16112 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(entry, _this.doesSupportMarkdown()),
16113 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemTag.Deprecated] : [],
16114 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Function,
16115 insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
16117 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__.startsWith(entry.name, ':-')) {
16118 item.sortText = SortTexts.VendorPrefixed;
16120 result.items.push(item);
16122 var pseudoElements = this.cssDataManager.getPseudoElements();
16123 pseudoElements.forEach(function (entry) {
16124 var insertText = moveCursorInsideParenthesis(entry.name);
16127 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(_this.getCompletionRange(existingNode), insertText),
16128 documentation: _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.getEntryDescription(entry, _this.doesSupportMarkdown()),
16129 tags: isDeprecated(entry) ? [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemTag.Deprecated] : [],
16130 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Function,
16131 insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
16133 if (_utils_strings__WEBPACK_IMPORTED_MODULE_3__.startsWith(entry.name, '::-')) {
16134 item.sortText = SortTexts.VendorPrefixed;
16136 result.items.push(item);
16138 if (!isNested) { // show html tags only for top level
16139 for (var _i = 0, _a = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.html5Tags; _i < _a.length; _i++) {
16140 var entry = _a[_i];
16141 result.items.push({
16143 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), entry),
16144 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Keyword
16147 for (var _b = 0, _c = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.svgElements; _b < _c.length; _b++) {
16148 var entry = _c[_b];
16149 result.items.push({
16151 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), entry),
16152 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Keyword
16157 visited[this.currentWord] = true;
16158 var docText = this.textDocument.getText();
16159 this.styleSheet.accept(function (n) {
16160 if (n.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SimpleSelector && n.length > 0) {
16161 var selector = docText.substr(n.offset, n.length);
16162 if (selector.charAt(0) === '.' && !visited[selector]) {
16163 visited[selector] = true;
16164 result.items.push({
16166 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(_this.getCompletionRange(existingNode), selector),
16167 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Keyword
16174 if (ruleSet && ruleSet.isNested()) {
16175 var selector = ruleSet.getSelectors().findFirstChildBeforeOffset(this.offset);
16176 if (selector && ruleSet.getSelectors().getChildren().indexOf(selector) === 0) {
16177 this.getPropertyProposals(null, result);
16182 CSSCompletion.prototype.getCompletionsForDeclarations = function (declarations, result) {
16183 if (!declarations || this.offset === declarations.offset) { // incomplete nodes
16186 var node = declarations.findFirstChildBeforeOffset(this.offset);
16188 return this.getCompletionsForDeclarationProperty(null, result);
16190 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.AbstractDeclaration) {
16191 var declaration = node;
16192 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(declaration.colonPosition) || this.offset <= declaration.colonPosition) {
16193 // complete property
16194 return this.getCompletionsForDeclarationProperty(declaration, result);
16196 else if (((0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(declaration.semicolonPosition) && declaration.semicolonPosition < this.offset)) {
16197 if (this.offset === declaration.semicolonPosition + 1) {
16198 return result; // don't show new properties right after semicolon (see Bug 15421:[intellisense] [css] Be less aggressive when manually typing CSS)
16200 // complete next property
16201 return this.getCompletionsForDeclarationProperty(null, result);
16203 if (declaration instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration) {
16205 return this.getCompletionsForDeclarationValue(declaration, result);
16208 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ExtendsReference) {
16209 this.getCompletionsForExtendsReference(node, null, result);
16211 else if (this.currentWord && this.currentWord[0] === '@') {
16212 this.getCompletionsForDeclarationProperty(null, result);
16214 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
16215 this.getCompletionsForDeclarationProperty(null, result);
16219 CSSCompletion.prototype.getCompletionsForVariableDeclaration = function (declaration, result) {
16220 if (this.offset && (0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(declaration.colonPosition) && this.offset > declaration.colonPosition) {
16221 this.getVariableProposals(declaration.getValue(), result);
16225 CSSCompletion.prototype.getCompletionsForExpression = function (expression, result) {
16226 var parent = expression.getParent();
16227 if (parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionArgument) {
16228 this.getCompletionsForFunctionArgument(parent, parent.getParent(), result);
16231 var declaration = expression.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Declaration);
16232 if (!declaration) {
16233 this.getTermProposals(undefined, null, result);
16236 var node = expression.findChildAtOffset(this.offset, true);
16238 return this.getCompletionsForDeclarationValue(declaration, result);
16240 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NumericValue || node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Identifier) {
16241 return this.getCompletionsForDeclarationValue(declaration, result);
16245 CSSCompletion.prototype.getCompletionsForFunctionArgument = function (arg, func, result) {
16246 var identifier = func.getIdentifier();
16247 if (identifier && identifier.matches('var')) {
16248 if (!func.getArguments().hasChildren() || func.getArguments().getChild(0) === arg) {
16249 this.getVariableProposalsForCSSVarFunction(result);
16254 CSSCompletion.prototype.getCompletionsForFunctionDeclaration = function (decl, result) {
16255 var declarations = decl.getDeclarations();
16256 if (declarations && this.offset > declarations.offset && this.offset < declarations.end) {
16257 this.getTermProposals(undefined, null, result);
16261 CSSCompletion.prototype.getCompletionsForMixinReference = function (ref, result) {
16263 var allMixins = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Mixin);
16264 for (var _i = 0, allMixins_1 = allMixins; _i < allMixins_1.length; _i++) {
16265 var mixinSymbol = allMixins_1[_i];
16266 if (mixinSymbol.node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.MixinDeclaration) {
16267 result.items.push(this.makeTermProposal(mixinSymbol, mixinSymbol.node.getParameters(), null));
16270 var identifierNode = ref.getIdentifier() || null;
16271 this.completionParticipants.forEach(function (participant) {
16272 if (participant.onCssMixinReference) {
16273 participant.onCssMixinReference({
16274 mixinName: _this.currentWord,
16275 range: _this.getCompletionRange(identifierNode)
16281 CSSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
16282 var allFunctions = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Function);
16283 for (var _i = 0, allFunctions_1 = allFunctions; _i < allFunctions_1.length; _i++) {
16284 var functionSymbol = allFunctions_1[_i];
16285 if (functionSymbol.node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionDeclaration) {
16286 result.items.push(this.makeTermProposal(functionSymbol, functionSymbol.node.getParameters(), existingNode));
16291 CSSCompletion.prototype.makeTermProposal = function (symbol, parameters, existingNode) {
16292 var decl = symbol.node;
16293 var params = parameters.getChildren().map(function (c) {
16294 return (c instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionParameter) ? c.getName() : c.getText();
16296 var insertText = symbol.name + '(' + params.map(function (p, index) { return '${' + (index + 1) + ':' + p + '}'; }).join(', ') + ')';
16298 label: symbol.name,
16299 detail: symbol.name + '(' + params.join(', ') + ')',
16300 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
16301 insertTextFormat: SnippetFormat,
16302 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.CompletionItemKind.Function,
16303 sortText: SortTexts.Term
16306 CSSCompletion.prototype.getCompletionsForSupportsCondition = function (supportsCondition, result) {
16307 var child = supportsCondition.findFirstChildBeforeOffset(this.offset);
16309 if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration) {
16310 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(child.colonPosition) || this.offset <= child.colonPosition) {
16311 return this.getCompletionsForDeclarationProperty(child, result);
16314 return this.getCompletionsForDeclarationValue(child, result);
16317 else if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SupportsCondition) {
16318 return this.getCompletionsForSupportsCondition(child, result);
16321 if ((0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(supportsCondition.lParent) && this.offset > supportsCondition.lParent && (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(supportsCondition.rParent) || this.offset <= supportsCondition.rParent)) {
16322 return this.getCompletionsForDeclarationProperty(null, result);
16326 CSSCompletion.prototype.getCompletionsForSupports = function (supports, result) {
16327 var declarations = supports.getDeclarations();
16328 var inInCondition = !declarations || this.offset <= declarations.offset;
16329 if (inInCondition) {
16330 var child = supports.findFirstChildBeforeOffset(this.offset);
16331 if (child instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SupportsCondition) {
16332 return this.getCompletionsForSupportsCondition(child, result);
16336 return this.getCompletionForTopLevel(result);
16338 CSSCompletion.prototype.getCompletionsForExtendsReference = function (extendsRef, existingNode, result) {
16341 CSSCompletion.prototype.getCompletionForUriLiteralValue = function (uriLiteralNode, result) {
16345 // No children, empty value
16346 if (!uriLiteralNode.hasChildren()) {
16348 position = this.position;
16349 var emptyURIValuePosition = this.textDocument.positionAt(uriLiteralNode.offset + 'url('.length);
16350 range = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.Range.create(emptyURIValuePosition, emptyURIValuePosition);
16353 var uriValueNode = uriLiteralNode.getChild(0);
16354 uriValue = uriValueNode.getText();
16355 position = this.position;
16356 range = this.getCompletionRange(uriValueNode);
16358 this.completionParticipants.forEach(function (participant) {
16359 if (participant.onCssURILiteralValue) {
16360 participant.onCssURILiteralValue({
16361 uriValue: uriValue,
16362 position: position,
16369 CSSCompletion.prototype.getCompletionForImportPath = function (importPathNode, result) {
16371 this.completionParticipants.forEach(function (participant) {
16372 if (participant.onCssImportPath) {
16373 participant.onCssImportPath({
16374 pathValue: importPathNode.getText(),
16375 position: _this.position,
16376 range: _this.getCompletionRange(importPathNode)
16382 CSSCompletion.prototype.hasCharacterAtPosition = function (offset, char) {
16383 var text = this.textDocument.getText();
16384 return (offset >= 0 && offset < text.length) && text.charAt(offset) === char;
16386 CSSCompletion.prototype.doesSupportMarkdown = function () {
16388 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(this.supportsMarkdown)) {
16389 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_6__.isDefined)(this.lsOptions.clientCapabilities)) {
16390 this.supportsMarkdown = true;
16391 return this.supportsMarkdown;
16393 var documentationFormat = (_c = (_b = (_a = this.lsOptions.clientCapabilities.textDocument) === null || _a === void 0 ? void 0 : _a.completion) === null || _b === void 0 ? void 0 : _b.completionItem) === null || _c === void 0 ? void 0 : _c.documentationFormat;
16394 this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.MarkupKind.Markdown) !== -1;
16396 return this.supportsMarkdown;
16398 return CSSCompletion;
16401 function isDeprecated(entry) {
16402 if (entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete')) {
16408 * Rank number should all be same length strings
16410 function computeRankNumber(n) {
16411 var nstr = n.toString();
16412 switch (nstr.length) {
16418 return '00' + nstr;
16420 return '000' + nstr;
16425 var Set = /** @class */ (function () {
16429 Set.prototype.add = function (entry) {
16430 this.entries[entry] = true;
16432 Set.prototype.getEntries = function () {
16433 return Object.keys(this.entries);
16437 function moveCursorInsideParenthesis(text) {
16438 return text.replace(/\(\)$/, "($1)");
16440 function collectValues(styleSheet, declaration) {
16441 var fullPropertyName = declaration.getFullPropertyName();
16442 var entries = new Set();
16443 function visitValue(node) {
16444 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Identifier || node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NumericValue || node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.HexColorValue) {
16445 entries.add(node.getText());
16449 function matchesProperty(decl) {
16450 var propertyName = decl.getFullPropertyName();
16451 return fullPropertyName === propertyName;
16453 function vistNode(node) {
16454 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration && node !== declaration) {
16455 if (matchesProperty(node)) {
16456 var value = node.getValue();
16458 value.accept(visitValue);
16464 styleSheet.accept(vistNode);
16467 var ColorValueCollector = /** @class */ (function () {
16468 function ColorValueCollector(entries, currentOffset) {
16469 this.entries = entries;
16470 this.currentOffset = currentOffset;
16473 ColorValueCollector.prototype.visitNode = function (node) {
16474 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.HexColorValue || (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Function && _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.isColorConstructor(node))) {
16475 if (this.currentOffset < node.offset || node.end < this.currentOffset) {
16476 this.entries.add(node.getText());
16481 return ColorValueCollector;
16483 function getCurrentWord(document, offset) {
16484 var i = offset - 1;
16485 var text = document.getText();
16486 while (i >= 0 && ' \t\n\r":{[()]},*>+'.indexOf(text.charAt(i)) === -1) {
16489 return text.substring(i + 1, offset);
16491 function isColorString(s) {
16492 // From https://stackoverflow.com/questions/8027423/how-to-check-if-a-string-is-a-valid-hex-color-representation/8027444
16493 return (s.toLowerCase() in _languageFacts_facts__WEBPACK_IMPORTED_MODULE_2__.colors) || /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(s);
16499 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16501 __webpack_require__.r(__webpack_exports__);
16502 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16503 /* harmony export */ "Scope": () => /* binding */ Scope,
16504 /* harmony export */ "GlobalScope": () => /* binding */ GlobalScope,
16505 /* harmony export */ "Symbol": () => /* binding */ Symbol,
16506 /* harmony export */ "ScopeBuilder": () => /* binding */ ScopeBuilder,
16507 /* harmony export */ "Symbols": () => /* binding */ Symbols
16508 /* harmony export */ });
16509 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
16510 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87);
16511 /*---------------------------------------------------------------------------------------------
16512 * Copyright (c) Microsoft Corporation. All rights reserved.
16513 * Licensed under the MIT License. See License.txt in the project root for license information.
16514 *--------------------------------------------------------------------------------------------*/
16516 var __extends = (undefined && undefined.__extends) || (function () {
16517 var extendStatics = function (d, b) {
16518 extendStatics = Object.setPrototypeOf ||
16519 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
16520 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
16521 return extendStatics(d, b);
16523 return function (d, b) {
16524 extendStatics(d, b);
16525 function __() { this.constructor = d; }
16526 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16531 var Scope = /** @class */ (function () {
16532 function Scope(offset, length) {
16533 this.offset = offset;
16534 this.length = length;
16536 this.parent = null;
16537 this.children = [];
16539 Scope.prototype.addChild = function (scope) {
16540 this.children.push(scope);
16541 scope.setParent(this);
16543 Scope.prototype.setParent = function (scope) {
16544 this.parent = scope;
16546 Scope.prototype.findScope = function (offset, length) {
16547 if (length === void 0) { length = 0; }
16548 if (this.offset <= offset && this.offset + this.length > offset + length || this.offset === offset && this.length === length) {
16549 return this.findInScope(offset, length);
16553 Scope.prototype.findInScope = function (offset, length) {
16554 if (length === void 0) { length = 0; }
16555 // find the first scope child that has an offset larger than offset + length
16556 var end = offset + length;
16557 var idx = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_1__.findFirst)(this.children, function (s) { return s.offset > end; });
16559 // all scopes have offsets larger than our end
16562 var res = this.children[idx - 1];
16563 if (res.offset <= offset && res.offset + res.length >= offset + length) {
16564 return res.findInScope(offset, length);
16568 Scope.prototype.addSymbol = function (symbol) {
16569 this.symbols.push(symbol);
16571 Scope.prototype.getSymbol = function (name, type) {
16572 for (var index = 0; index < this.symbols.length; index++) {
16573 var symbol = this.symbols[index];
16574 if (symbol.name === name && symbol.type === type) {
16580 Scope.prototype.getSymbols = function () {
16581 return this.symbols;
16586 var GlobalScope = /** @class */ (function (_super) {
16587 __extends(GlobalScope, _super);
16588 function GlobalScope() {
16589 return _super.call(this, 0, Number.MAX_VALUE) || this;
16591 return GlobalScope;
16594 var Symbol = /** @class */ (function () {
16595 function Symbol(name, value, node, type) {
16597 this.value = value;
16604 var ScopeBuilder = /** @class */ (function () {
16605 function ScopeBuilder(scope) {
16606 this.scope = scope;
16608 ScopeBuilder.prototype.addSymbol = function (node, name, value, type) {
16609 if (node.offset !== -1) {
16610 var current = this.scope.findScope(node.offset, node.length);
16612 current.addSymbol(new Symbol(name, value, node, type));
16616 ScopeBuilder.prototype.addScope = function (node) {
16617 if (node.offset !== -1) {
16618 var current = this.scope.findScope(node.offset, node.length);
16619 if (current && (current.offset !== node.offset || current.length !== node.length)) { // scope already known?
16620 var newScope = new Scope(node.offset, node.length);
16621 current.addChild(newScope);
16628 ScopeBuilder.prototype.addSymbolToChildScope = function (scopeNode, node, name, value, type) {
16629 if (scopeNode && scopeNode.offset !== -1) {
16630 var current = this.addScope(scopeNode); // create the scope or gets the existing one
16632 current.addSymbol(new Symbol(name, value, node, type));
16636 ScopeBuilder.prototype.visitNode = function (node) {
16637 switch (node.type) {
16638 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Keyframe:
16639 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Keyframe);
16641 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.CustomPropertyDeclaration:
16642 return this.visitCustomPropertyDeclarationNode(node);
16643 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.VariableDeclaration:
16644 return this.visitVariableDeclarationNode(node);
16645 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Ruleset:
16646 return this.visitRuleSet(node);
16647 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.MixinDeclaration:
16648 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Mixin);
16650 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.FunctionDeclaration:
16651 this.addSymbol(node, node.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Function);
16653 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.FunctionParameter: {
16654 return this.visitFunctionParameterNode(node);
16656 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Declarations:
16657 this.addScope(node);
16659 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.For:
16660 var forNode = node;
16661 var scopeNode = forNode.getDeclarations();
16662 if (scopeNode && forNode.variable) {
16663 this.addSymbolToChildScope(scopeNode, forNode.variable, forNode.variable.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
16666 case _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Each: {
16667 var eachNode = node;
16668 var scopeNode_1 = eachNode.getDeclarations();
16670 var variables = eachNode.getVariables().getChildren();
16671 for (var _i = 0, variables_1 = variables; _i < variables_1.length; _i++) {
16672 var variable = variables_1[_i];
16673 this.addSymbolToChildScope(scopeNode_1, variable, variable.getName(), void 0, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
16681 ScopeBuilder.prototype.visitRuleSet = function (node) {
16682 var current = this.scope.findScope(node.offset, node.length);
16684 for (var _i = 0, _a = node.getSelectors().getChildren(); _i < _a.length; _i++) {
16685 var child = _a[_i];
16686 if (child instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.Selector) {
16687 if (child.getChildren().length === 1) { // only selectors with a single element can be extended
16688 current.addSymbol(new Symbol(child.getChild(0).getText(), void 0, child, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Rule));
16695 ScopeBuilder.prototype.visitVariableDeclarationNode = function (node) {
16696 var value = node.getValue() ? node.getValue().getText() : void 0;
16697 this.addSymbol(node, node.getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
16700 ScopeBuilder.prototype.visitFunctionParameterNode = function (node) {
16701 // parameters are part of the body scope
16702 var scopeNode = node.getParent().getDeclarations();
16704 var valueNode = node.getDefaultValue();
16705 var value = valueNode ? valueNode.getText() : void 0;
16706 this.addSymbolToChildScope(scopeNode, node, node.getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
16710 ScopeBuilder.prototype.visitCustomPropertyDeclarationNode = function (node) {
16711 var value = node.getValue() ? node.getValue().getText() : '';
16712 this.addCSSVariable(node.getProperty(), node.getProperty().getName(), value, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable);
16715 ScopeBuilder.prototype.addCSSVariable = function (node, name, value, type) {
16716 if (node.offset !== -1) {
16717 this.scope.addSymbol(new Symbol(name, value, node, type));
16720 return ScopeBuilder;
16723 var Symbols = /** @class */ (function () {
16724 function Symbols(node) {
16725 this.global = new GlobalScope();
16726 node.acceptVisitor(new ScopeBuilder(this.global));
16728 Symbols.prototype.findSymbolsAtOffset = function (offset, referenceType) {
16729 var scope = this.global.findScope(offset, 0);
16733 var symbols = scope.getSymbols();
16734 for (var i = 0; i < symbols.length; i++) {
16735 var symbol = symbols[i];
16736 if (symbol.type === referenceType && !names[symbol.name]) {
16737 result.push(symbol);
16738 names[symbol.name] = true;
16741 scope = scope.parent;
16745 Symbols.prototype.internalFindSymbol = function (node, referenceTypes) {
16746 var scopeNode = node;
16747 if (node.parent instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionParameter && node.parent.getParent() instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.BodyDeclaration) {
16748 scopeNode = node.parent.getParent().getDeclarations();
16750 if (node.parent instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.FunctionArgument && node.parent.getParent() instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.Function) {
16751 var funcId = node.parent.getParent().getIdentifier();
16753 var functionSymbol = this.internalFindSymbol(funcId, [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Function]);
16754 if (functionSymbol) {
16755 scopeNode = functionSymbol.node.getDeclarations();
16762 var name = node.getText();
16763 var scope = this.global.findScope(scopeNode.offset, scopeNode.length);
16765 for (var index = 0; index < referenceTypes.length; index++) {
16766 var type = referenceTypes[index];
16767 var symbol = scope.getSymbol(name, type);
16772 scope = scope.parent;
16776 Symbols.prototype.evaluateReferenceTypes = function (node) {
16777 if (node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.Identifier) {
16778 var referenceTypes = node.referenceTypes;
16779 if (referenceTypes) {
16780 return referenceTypes;
16783 if (node.isCustomProperty) {
16784 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable];
16786 // are a reference to a keyframe?
16787 var decl = _cssNodes__WEBPACK_IMPORTED_MODULE_0__.getParentDeclaration(node);
16789 var propertyName = decl.getNonPrefixedPropertyName();
16790 if ((propertyName === 'animation' || propertyName === 'animation-name')
16791 && decl.getValue() && decl.getValue().offset === node.offset) {
16792 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Keyframe];
16797 else if (node instanceof _cssNodes__WEBPACK_IMPORTED_MODULE_0__.Variable) {
16798 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Variable];
16800 var selector = node.findAParent(_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Selector, _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ExtendsReference);
16802 return [_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ReferenceType.Rule];
16806 Symbols.prototype.findSymbolFromNode = function (node) {
16810 while (node.type === _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Interpolation) {
16811 node = node.getParent();
16813 var referenceTypes = this.evaluateReferenceTypes(node);
16814 if (referenceTypes) {
16815 return this.internalFindSymbol(node, referenceTypes);
16819 Symbols.prototype.matchesSymbol = function (node, symbol) {
16823 while (node.type === _cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Interpolation) {
16824 node = node.getParent();
16826 if (!node.matches(symbol.name)) {
16829 var referenceTypes = this.evaluateReferenceTypes(node);
16830 if (!referenceTypes || referenceTypes.indexOf(symbol.type) === -1) {
16833 var nodeSymbol = this.internalFindSymbol(node, referenceTypes);
16834 return nodeSymbol === symbol;
16836 Symbols.prototype.findSymbol = function (name, type, offset) {
16837 var scope = this.global.findScope(offset);
16839 var symbol = scope.getSymbol(name, type);
16843 scope = scope.parent;
16854 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16856 __webpack_require__.r(__webpack_exports__);
16857 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16858 /* harmony export */ "findFirst": () => /* binding */ findFirst,
16859 /* harmony export */ "includes": () => /* binding */ includes,
16860 /* harmony export */ "union": () => /* binding */ union
16861 /* harmony export */ });
16862 /*---------------------------------------------------------------------------------------------
16863 * Copyright (c) Microsoft Corporation. All rights reserved.
16864 * Licensed under the MIT License. See License.txt in the project root for license information.
16865 *--------------------------------------------------------------------------------------------*/
16868 * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false
16869 * are located before all elements where p(x) is true.
16870 * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.
16872 function findFirst(array, p) {
16873 var low = 0, high = array.length;
16875 return 0; // no children
16877 while (low < high) {
16878 var mid = Math.floor((low + high) / 2);
16879 if (p(array[mid])) {
16888 function includes(array, item) {
16889 return array.indexOf(item) !== -1;
16893 for (var _i = 0; _i < arguments.length; _i++) {
16894 arrays[_i] = arguments[_i];
16897 for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {
16898 var array = arrays_1[_a];
16899 for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {
16900 var item = array_1[_b];
16901 if (!includes(result, item)) {
16912 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
16914 __webpack_require__.r(__webpack_exports__);
16915 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16916 /* harmony export */ "TextDocument": () => /* reexport safe */ vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__.TextDocument,
16917 /* harmony export */ "AnnotatedTextEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.AnnotatedTextEdit,
16918 /* harmony export */ "ChangeAnnotation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ChangeAnnotation,
16919 /* harmony export */ "ChangeAnnotationIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ChangeAnnotationIdentifier,
16920 /* harmony export */ "CodeAction": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeAction,
16921 /* harmony export */ "CodeActionContext": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeActionContext,
16922 /* harmony export */ "CodeActionKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeActionKind,
16923 /* harmony export */ "CodeDescription": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeDescription,
16924 /* harmony export */ "CodeLens": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeLens,
16925 /* harmony export */ "Color": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Color,
16926 /* harmony export */ "ColorInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ColorInformation,
16927 /* harmony export */ "ColorPresentation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ColorPresentation,
16928 /* harmony export */ "Command": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Command,
16929 /* harmony export */ "CompletionItem": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItem,
16930 /* harmony export */ "CompletionItemKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind,
16931 /* harmony export */ "CompletionItemTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItemTag,
16932 /* harmony export */ "CompletionList": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionList,
16933 /* harmony export */ "CreateFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CreateFile,
16934 /* harmony export */ "DeleteFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DeleteFile,
16935 /* harmony export */ "Diagnostic": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Diagnostic,
16936 /* harmony export */ "DiagnosticRelatedInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticRelatedInformation,
16937 /* harmony export */ "DiagnosticSeverity": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticSeverity,
16938 /* harmony export */ "DiagnosticTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticTag,
16939 /* harmony export */ "DocumentHighlight": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlight,
16940 /* harmony export */ "DocumentHighlightKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind,
16941 /* harmony export */ "DocumentLink": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentLink,
16942 /* harmony export */ "DocumentSymbol": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentSymbol,
16943 /* harmony export */ "EOL": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.EOL,
16944 /* harmony export */ "FoldingRange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FoldingRange,
16945 /* harmony export */ "FoldingRangeKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FoldingRangeKind,
16946 /* harmony export */ "FormattingOptions": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FormattingOptions,
16947 /* harmony export */ "Hover": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Hover,
16948 /* harmony export */ "InsertReplaceEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.InsertReplaceEdit,
16949 /* harmony export */ "InsertTextFormat": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.InsertTextFormat,
16950 /* harmony export */ "InsertTextMode": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.InsertTextMode,
16951 /* harmony export */ "Location": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Location,
16952 /* harmony export */ "LocationLink": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.LocationLink,
16953 /* harmony export */ "MarkedString": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkedString,
16954 /* harmony export */ "MarkupContent": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupContent,
16955 /* harmony export */ "MarkupKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind,
16956 /* harmony export */ "OptionalVersionedTextDocumentIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.OptionalVersionedTextDocumentIdentifier,
16957 /* harmony export */ "ParameterInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ParameterInformation,
16958 /* harmony export */ "Position": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Position,
16959 /* harmony export */ "Range": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Range,
16960 /* harmony export */ "RenameFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.RenameFile,
16961 /* harmony export */ "SelectionRange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SelectionRange,
16962 /* harmony export */ "SignatureInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SignatureInformation,
16963 /* harmony export */ "SymbolInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolInformation,
16964 /* harmony export */ "SymbolKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolKind,
16965 /* harmony export */ "SymbolTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolTag,
16966 /* harmony export */ "TextDocumentEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentEdit,
16967 /* harmony export */ "TextDocumentIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentIdentifier,
16968 /* harmony export */ "TextDocumentItem": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentItem,
16969 /* harmony export */ "TextEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextEdit,
16970 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.VersionedTextDocumentIdentifier,
16971 /* harmony export */ "WorkspaceChange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.WorkspaceChange,
16972 /* harmony export */ "WorkspaceEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.WorkspaceEdit,
16973 /* harmony export */ "integer": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.integer,
16974 /* harmony export */ "uinteger": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.uinteger,
16975 /* harmony export */ "ClientCapabilities": () => /* binding */ ClientCapabilities,
16976 /* harmony export */ "FileType": () => /* binding */ FileType
16977 /* harmony export */ });
16978 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89);
16979 /* harmony import */ var vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
16980 /*---------------------------------------------------------------------------------------------
16981 * Copyright (c) Microsoft Corporation. All rights reserved.
16982 * Licensed under the MIT License. See License.txt in the project root for license information.
16983 *--------------------------------------------------------------------------------------------*/
16988 var ClientCapabilities;
16989 (function (ClientCapabilities) {
16990 ClientCapabilities.LATEST = {
16994 documentationFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.PlainText]
16998 contentFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.PlainText]
17002 })(ClientCapabilities || (ClientCapabilities = {}));
17004 (function (FileType) {
17006 * The file type is unknown.
17008 FileType[FileType["Unknown"] = 0] = "Unknown";
17012 FileType[FileType["File"] = 1] = "File";
17016 FileType[FileType["Directory"] = 2] = "Directory";
17018 * A symbolic link to a file.
17020 FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
17021 })(FileType || (FileType = {}));
17026 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17028 __webpack_require__.r(__webpack_exports__);
17029 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17030 /* harmony export */ "integer": () => /* binding */ integer,
17031 /* harmony export */ "uinteger": () => /* binding */ uinteger,
17032 /* harmony export */ "Position": () => /* binding */ Position,
17033 /* harmony export */ "Range": () => /* binding */ Range,
17034 /* harmony export */ "Location": () => /* binding */ Location,
17035 /* harmony export */ "LocationLink": () => /* binding */ LocationLink,
17036 /* harmony export */ "Color": () => /* binding */ Color,
17037 /* harmony export */ "ColorInformation": () => /* binding */ ColorInformation,
17038 /* harmony export */ "ColorPresentation": () => /* binding */ ColorPresentation,
17039 /* harmony export */ "FoldingRangeKind": () => /* binding */ FoldingRangeKind,
17040 /* harmony export */ "FoldingRange": () => /* binding */ FoldingRange,
17041 /* harmony export */ "DiagnosticRelatedInformation": () => /* binding */ DiagnosticRelatedInformation,
17042 /* harmony export */ "DiagnosticSeverity": () => /* binding */ DiagnosticSeverity,
17043 /* harmony export */ "DiagnosticTag": () => /* binding */ DiagnosticTag,
17044 /* harmony export */ "CodeDescription": () => /* binding */ CodeDescription,
17045 /* harmony export */ "Diagnostic": () => /* binding */ Diagnostic,
17046 /* harmony export */ "Command": () => /* binding */ Command,
17047 /* harmony export */ "TextEdit": () => /* binding */ TextEdit,
17048 /* harmony export */ "ChangeAnnotation": () => /* binding */ ChangeAnnotation,
17049 /* harmony export */ "ChangeAnnotationIdentifier": () => /* binding */ ChangeAnnotationIdentifier,
17050 /* harmony export */ "AnnotatedTextEdit": () => /* binding */ AnnotatedTextEdit,
17051 /* harmony export */ "TextDocumentEdit": () => /* binding */ TextDocumentEdit,
17052 /* harmony export */ "CreateFile": () => /* binding */ CreateFile,
17053 /* harmony export */ "RenameFile": () => /* binding */ RenameFile,
17054 /* harmony export */ "DeleteFile": () => /* binding */ DeleteFile,
17055 /* harmony export */ "WorkspaceEdit": () => /* binding */ WorkspaceEdit,
17056 /* harmony export */ "WorkspaceChange": () => /* binding */ WorkspaceChange,
17057 /* harmony export */ "TextDocumentIdentifier": () => /* binding */ TextDocumentIdentifier,
17058 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* binding */ VersionedTextDocumentIdentifier,
17059 /* harmony export */ "OptionalVersionedTextDocumentIdentifier": () => /* binding */ OptionalVersionedTextDocumentIdentifier,
17060 /* harmony export */ "TextDocumentItem": () => /* binding */ TextDocumentItem,
17061 /* harmony export */ "MarkupKind": () => /* binding */ MarkupKind,
17062 /* harmony export */ "MarkupContent": () => /* binding */ MarkupContent,
17063 /* harmony export */ "CompletionItemKind": () => /* binding */ CompletionItemKind,
17064 /* harmony export */ "InsertTextFormat": () => /* binding */ InsertTextFormat,
17065 /* harmony export */ "CompletionItemTag": () => /* binding */ CompletionItemTag,
17066 /* harmony export */ "InsertReplaceEdit": () => /* binding */ InsertReplaceEdit,
17067 /* harmony export */ "InsertTextMode": () => /* binding */ InsertTextMode,
17068 /* harmony export */ "CompletionItem": () => /* binding */ CompletionItem,
17069 /* harmony export */ "CompletionList": () => /* binding */ CompletionList,
17070 /* harmony export */ "MarkedString": () => /* binding */ MarkedString,
17071 /* harmony export */ "Hover": () => /* binding */ Hover,
17072 /* harmony export */ "ParameterInformation": () => /* binding */ ParameterInformation,
17073 /* harmony export */ "SignatureInformation": () => /* binding */ SignatureInformation,
17074 /* harmony export */ "DocumentHighlightKind": () => /* binding */ DocumentHighlightKind,
17075 /* harmony export */ "DocumentHighlight": () => /* binding */ DocumentHighlight,
17076 /* harmony export */ "SymbolKind": () => /* binding */ SymbolKind,
17077 /* harmony export */ "SymbolTag": () => /* binding */ SymbolTag,
17078 /* harmony export */ "SymbolInformation": () => /* binding */ SymbolInformation,
17079 /* harmony export */ "DocumentSymbol": () => /* binding */ DocumentSymbol,
17080 /* harmony export */ "CodeActionKind": () => /* binding */ CodeActionKind,
17081 /* harmony export */ "CodeActionContext": () => /* binding */ CodeActionContext,
17082 /* harmony export */ "CodeAction": () => /* binding */ CodeAction,
17083 /* harmony export */ "CodeLens": () => /* binding */ CodeLens,
17084 /* harmony export */ "FormattingOptions": () => /* binding */ FormattingOptions,
17085 /* harmony export */ "DocumentLink": () => /* binding */ DocumentLink,
17086 /* harmony export */ "SelectionRange": () => /* binding */ SelectionRange,
17087 /* harmony export */ "EOL": () => /* binding */ EOL,
17088 /* harmony export */ "TextDocument": () => /* binding */ TextDocument
17089 /* harmony export */ });
17090 /* --------------------------------------------------------------------------------------------
17091 * Copyright (c) Microsoft Corporation. All rights reserved.
17092 * Licensed under the MIT License. See License.txt in the project root for license information.
17093 * ------------------------------------------------------------------------------------------ */
17096 (function (integer) {
17097 integer.MIN_VALUE = -2147483648;
17098 integer.MAX_VALUE = 2147483647;
17099 })(integer || (integer = {}));
17101 (function (uinteger) {
17102 uinteger.MIN_VALUE = 0;
17103 uinteger.MAX_VALUE = 2147483647;
17104 })(uinteger || (uinteger = {}));
17106 * The Position namespace provides helper functions to work with
17107 * [Position](#Position) literals.
17110 (function (Position) {
17112 * Creates a new Position literal from the given line and character.
17113 * @param line The position's line.
17114 * @param character The position's character.
17116 function create(line, character) {
17117 if (line === Number.MAX_VALUE) {
17118 line = uinteger.MAX_VALUE;
17120 if (character === Number.MAX_VALUE) {
17121 character = uinteger.MAX_VALUE;
17123 return { line: line, character: character };
17125 Position.create = create;
17127 * Checks whether the given literal conforms to the [Position](#Position) interface.
17129 function is(value) {
17130 var candidate = value;
17131 return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
17134 })(Position || (Position = {}));
17136 * The Range namespace provides helper functions to work with
17137 * [Range](#Range) literals.
17140 (function (Range) {
17141 function create(one, two, three, four) {
17142 if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
17143 return { start: Position.create(one, two), end: Position.create(three, four) };
17145 else if (Position.is(one) && Position.is(two)) {
17146 return { start: one, end: two };
17149 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
17152 Range.create = create;
17154 * Checks whether the given literal conforms to the [Range](#Range) interface.
17156 function is(value) {
17157 var candidate = value;
17158 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
17161 })(Range || (Range = {}));
17163 * The Location namespace provides helper functions to work with
17164 * [Location](#Location) literals.
17167 (function (Location) {
17169 * Creates a Location literal.
17170 * @param uri The location's uri.
17171 * @param range The location's range.
17173 function create(uri, range) {
17174 return { uri: uri, range: range };
17176 Location.create = create;
17178 * Checks whether the given literal conforms to the [Location](#Location) interface.
17180 function is(value) {
17181 var candidate = value;
17182 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
17185 })(Location || (Location = {}));
17187 * The LocationLink namespace provides helper functions to work with
17188 * [LocationLink](#LocationLink) literals.
17191 (function (LocationLink) {
17193 * Creates a LocationLink literal.
17194 * @param targetUri The definition's uri.
17195 * @param targetRange The full range of the definition.
17196 * @param targetSelectionRange The span of the symbol definition at the target.
17197 * @param originSelectionRange The span of the symbol being defined in the originating source file.
17199 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
17200 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
17202 LocationLink.create = create;
17204 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
17206 function is(value) {
17207 var candidate = value;
17208 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
17209 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
17210 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
17212 LocationLink.is = is;
17213 })(LocationLink || (LocationLink = {}));
17215 * The Color namespace provides helper functions to work with
17216 * [Color](#Color) literals.
17219 (function (Color) {
17221 * Creates a new Color literal.
17223 function create(red, green, blue, alpha) {
17231 Color.create = create;
17233 * Checks whether the given literal conforms to the [Color](#Color) interface.
17235 function is(value) {
17236 var candidate = value;
17237 return Is.numberRange(candidate.red, 0, 1)
17238 && Is.numberRange(candidate.green, 0, 1)
17239 && Is.numberRange(candidate.blue, 0, 1)
17240 && Is.numberRange(candidate.alpha, 0, 1);
17243 })(Color || (Color = {}));
17245 * The ColorInformation namespace provides helper functions to work with
17246 * [ColorInformation](#ColorInformation) literals.
17248 var ColorInformation;
17249 (function (ColorInformation) {
17251 * Creates a new ColorInformation literal.
17253 function create(range, color) {
17259 ColorInformation.create = create;
17261 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
17263 function is(value) {
17264 var candidate = value;
17265 return Range.is(candidate.range) && Color.is(candidate.color);
17267 ColorInformation.is = is;
17268 })(ColorInformation || (ColorInformation = {}));
17270 * The Color namespace provides helper functions to work with
17271 * [ColorPresentation](#ColorPresentation) literals.
17273 var ColorPresentation;
17274 (function (ColorPresentation) {
17276 * Creates a new ColorInformation literal.
17278 function create(label, textEdit, additionalTextEdits) {
17281 textEdit: textEdit,
17282 additionalTextEdits: additionalTextEdits,
17285 ColorPresentation.create = create;
17287 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
17289 function is(value) {
17290 var candidate = value;
17291 return Is.string(candidate.label)
17292 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
17293 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
17295 ColorPresentation.is = is;
17296 })(ColorPresentation || (ColorPresentation = {}));
17298 * Enum of known range kinds
17300 var FoldingRangeKind;
17301 (function (FoldingRangeKind) {
17303 * Folding range for a comment
17305 FoldingRangeKind["Comment"] = "comment";
17307 * Folding range for a imports or includes
17309 FoldingRangeKind["Imports"] = "imports";
17311 * Folding range for a region (e.g. `#region`)
17313 FoldingRangeKind["Region"] = "region";
17314 })(FoldingRangeKind || (FoldingRangeKind = {}));
17316 * The folding range namespace provides helper functions to work with
17317 * [FoldingRange](#FoldingRange) literals.
17320 (function (FoldingRange) {
17322 * Creates a new FoldingRange literal.
17324 function create(startLine, endLine, startCharacter, endCharacter, kind) {
17326 startLine: startLine,
17329 if (Is.defined(startCharacter)) {
17330 result.startCharacter = startCharacter;
17332 if (Is.defined(endCharacter)) {
17333 result.endCharacter = endCharacter;
17335 if (Is.defined(kind)) {
17336 result.kind = kind;
17340 FoldingRange.create = create;
17342 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
17344 function is(value) {
17345 var candidate = value;
17346 return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
17347 && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
17348 && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
17349 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
17351 FoldingRange.is = is;
17352 })(FoldingRange || (FoldingRange = {}));
17354 * The DiagnosticRelatedInformation namespace provides helper functions to work with
17355 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
17357 var DiagnosticRelatedInformation;
17358 (function (DiagnosticRelatedInformation) {
17360 * Creates a new DiagnosticRelatedInformation literal.
17362 function create(location, message) {
17364 location: location,
17368 DiagnosticRelatedInformation.create = create;
17370 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
17372 function is(value) {
17373 var candidate = value;
17374 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
17376 DiagnosticRelatedInformation.is = is;
17377 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
17379 * The diagnostic's severity.
17381 var DiagnosticSeverity;
17382 (function (DiagnosticSeverity) {
17384 * Reports an error.
17386 DiagnosticSeverity.Error = 1;
17388 * Reports a warning.
17390 DiagnosticSeverity.Warning = 2;
17392 * Reports an information.
17394 DiagnosticSeverity.Information = 3;
17398 DiagnosticSeverity.Hint = 4;
17399 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
17401 * The diagnostic tags.
17406 (function (DiagnosticTag) {
17408 * Unused or unnecessary code.
17410 * Clients are allowed to render diagnostics with this tag faded out instead of having
17411 * an error squiggle.
17413 DiagnosticTag.Unnecessary = 1;
17415 * Deprecated or obsolete code.
17417 * Clients are allowed to rendered diagnostics with this tag strike through.
17419 DiagnosticTag.Deprecated = 2;
17420 })(DiagnosticTag || (DiagnosticTag = {}));
17422 * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
17426 var CodeDescription;
17427 (function (CodeDescription) {
17428 function is(value) {
17429 var candidate = value;
17430 return candidate !== undefined && candidate !== null && Is.string(candidate.href);
17432 CodeDescription.is = is;
17433 })(CodeDescription || (CodeDescription = {}));
17435 * The Diagnostic namespace provides helper functions to work with
17436 * [Diagnostic](#Diagnostic) literals.
17439 (function (Diagnostic) {
17441 * Creates a new Diagnostic literal.
17443 function create(range, message, severity, code, source, relatedInformation) {
17444 var result = { range: range, message: message };
17445 if (Is.defined(severity)) {
17446 result.severity = severity;
17448 if (Is.defined(code)) {
17449 result.code = code;
17451 if (Is.defined(source)) {
17452 result.source = source;
17454 if (Is.defined(relatedInformation)) {
17455 result.relatedInformation = relatedInformation;
17459 Diagnostic.create = create;
17461 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
17463 function is(value) {
17465 var candidate = value;
17466 return Is.defined(candidate)
17467 && Range.is(candidate.range)
17468 && Is.string(candidate.message)
17469 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
17470 && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
17471 && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
17472 && (Is.string(candidate.source) || Is.undefined(candidate.source))
17473 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
17475 Diagnostic.is = is;
17476 })(Diagnostic || (Diagnostic = {}));
17478 * The Command namespace provides helper functions to work with
17479 * [Command](#Command) literals.
17482 (function (Command) {
17484 * Creates a new Command literal.
17486 function create(title, command) {
17488 for (var _i = 2; _i < arguments.length; _i++) {
17489 args[_i - 2] = arguments[_i];
17491 var result = { title: title, command: command };
17492 if (Is.defined(args) && args.length > 0) {
17493 result.arguments = args;
17497 Command.create = create;
17499 * Checks whether the given literal conforms to the [Command](#Command) interface.
17501 function is(value) {
17502 var candidate = value;
17503 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
17506 })(Command || (Command = {}));
17508 * The TextEdit namespace provides helper function to create replace,
17509 * insert and delete edits more easily.
17512 (function (TextEdit) {
17514 * Creates a replace text edit.
17515 * @param range The range of text to be replaced.
17516 * @param newText The new text.
17518 function replace(range, newText) {
17519 return { range: range, newText: newText };
17521 TextEdit.replace = replace;
17523 * Creates a insert text edit.
17524 * @param position The position to insert the text at.
17525 * @param newText The text to be inserted.
17527 function insert(position, newText) {
17528 return { range: { start: position, end: position }, newText: newText };
17530 TextEdit.insert = insert;
17532 * Creates a delete text edit.
17533 * @param range The range of text to be deleted.
17535 function del(range) {
17536 return { range: range, newText: '' };
17538 TextEdit.del = del;
17539 function is(value) {
17540 var candidate = value;
17541 return Is.objectLiteral(candidate)
17542 && Is.string(candidate.newText)
17543 && Range.is(candidate.range);
17546 })(TextEdit || (TextEdit = {}));
17547 var ChangeAnnotation;
17548 (function (ChangeAnnotation) {
17549 function create(label, needsConfirmation, description) {
17550 var result = { label: label };
17551 if (needsConfirmation !== undefined) {
17552 result.needsConfirmation = needsConfirmation;
17554 if (description !== undefined) {
17555 result.description = description;
17559 ChangeAnnotation.create = create;
17560 function is(value) {
17561 var candidate = value;
17562 return candidate !== undefined && Is.objectLiteral(candidate) && Is.string(candidate.label) &&
17563 (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
17564 (Is.string(candidate.description) || candidate.description === undefined);
17566 ChangeAnnotation.is = is;
17567 })(ChangeAnnotation || (ChangeAnnotation = {}));
17568 var ChangeAnnotationIdentifier;
17569 (function (ChangeAnnotationIdentifier) {
17570 function is(value) {
17571 var candidate = value;
17572 return typeof candidate === 'string';
17574 ChangeAnnotationIdentifier.is = is;
17575 })(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
17576 var AnnotatedTextEdit;
17577 (function (AnnotatedTextEdit) {
17579 * Creates an annotated replace text edit.
17581 * @param range The range of text to be replaced.
17582 * @param newText The new text.
17583 * @param annotation The annotation.
17585 function replace(range, newText, annotation) {
17586 return { range: range, newText: newText, annotationId: annotation };
17588 AnnotatedTextEdit.replace = replace;
17590 * Creates an annotated insert text edit.
17592 * @param position The position to insert the text at.
17593 * @param newText The text to be inserted.
17594 * @param annotation The annotation.
17596 function insert(position, newText, annotation) {
17597 return { range: { start: position, end: position }, newText: newText, annotationId: annotation };
17599 AnnotatedTextEdit.insert = insert;
17601 * Creates an annotated delete text edit.
17603 * @param range The range of text to be deleted.
17604 * @param annotation The annotation.
17606 function del(range, annotation) {
17607 return { range: range, newText: '', annotationId: annotation };
17609 AnnotatedTextEdit.del = del;
17610 function is(value) {
17611 var candidate = value;
17612 return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
17614 AnnotatedTextEdit.is = is;
17615 })(AnnotatedTextEdit || (AnnotatedTextEdit = {}));
17617 * The TextDocumentEdit namespace provides helper function to create
17618 * an edit that manipulates a text document.
17620 var TextDocumentEdit;
17621 (function (TextDocumentEdit) {
17623 * Creates a new `TextDocumentEdit`
17625 function create(textDocument, edits) {
17626 return { textDocument: textDocument, edits: edits };
17628 TextDocumentEdit.create = create;
17629 function is(value) {
17630 var candidate = value;
17631 return Is.defined(candidate)
17632 && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
17633 && Array.isArray(candidate.edits);
17635 TextDocumentEdit.is = is;
17636 })(TextDocumentEdit || (TextDocumentEdit = {}));
17638 (function (CreateFile) {
17639 function create(uri, options, annotation) {
17644 if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
17645 result.options = options;
17647 if (annotation !== undefined) {
17648 result.annotationId = annotation;
17652 CreateFile.create = create;
17653 function is(value) {
17654 var candidate = value;
17655 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
17656 ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
17658 CreateFile.is = is;
17659 })(CreateFile || (CreateFile = {}));
17661 (function (RenameFile) {
17662 function create(oldUri, newUri, options, annotation) {
17668 if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
17669 result.options = options;
17671 if (annotation !== undefined) {
17672 result.annotationId = annotation;
17676 RenameFile.create = create;
17677 function is(value) {
17678 var candidate = value;
17679 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
17680 ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
17682 RenameFile.is = is;
17683 })(RenameFile || (RenameFile = {}));
17685 (function (DeleteFile) {
17686 function create(uri, options, annotation) {
17691 if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
17692 result.options = options;
17694 if (annotation !== undefined) {
17695 result.annotationId = annotation;
17699 DeleteFile.create = create;
17700 function is(value) {
17701 var candidate = value;
17702 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
17703 ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
17705 DeleteFile.is = is;
17706 })(DeleteFile || (DeleteFile = {}));
17708 (function (WorkspaceEdit) {
17709 function is(value) {
17710 var candidate = value;
17711 return candidate &&
17712 (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
17713 (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
17714 if (Is.string(change.kind)) {
17715 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
17718 return TextDocumentEdit.is(change);
17722 WorkspaceEdit.is = is;
17723 })(WorkspaceEdit || (WorkspaceEdit = {}));
17724 var TextEditChangeImpl = /** @class */ (function () {
17725 function TextEditChangeImpl(edits, changeAnnotations) {
17726 this.edits = edits;
17727 this.changeAnnotations = changeAnnotations;
17729 TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
17732 if (annotation === undefined) {
17733 edit = TextEdit.insert(position, newText);
17735 else if (ChangeAnnotationIdentifier.is(annotation)) {
17737 edit = AnnotatedTextEdit.insert(position, newText, annotation);
17740 this.assertChangeAnnotations(this.changeAnnotations);
17741 id = this.changeAnnotations.manage(annotation);
17742 edit = AnnotatedTextEdit.insert(position, newText, id);
17744 this.edits.push(edit);
17745 if (id !== undefined) {
17749 TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
17752 if (annotation === undefined) {
17753 edit = TextEdit.replace(range, newText);
17755 else if (ChangeAnnotationIdentifier.is(annotation)) {
17757 edit = AnnotatedTextEdit.replace(range, newText, annotation);
17760 this.assertChangeAnnotations(this.changeAnnotations);
17761 id = this.changeAnnotations.manage(annotation);
17762 edit = AnnotatedTextEdit.replace(range, newText, id);
17764 this.edits.push(edit);
17765 if (id !== undefined) {
17769 TextEditChangeImpl.prototype.delete = function (range, annotation) {
17772 if (annotation === undefined) {
17773 edit = TextEdit.del(range);
17775 else if (ChangeAnnotationIdentifier.is(annotation)) {
17777 edit = AnnotatedTextEdit.del(range, annotation);
17780 this.assertChangeAnnotations(this.changeAnnotations);
17781 id = this.changeAnnotations.manage(annotation);
17782 edit = AnnotatedTextEdit.del(range, id);
17784 this.edits.push(edit);
17785 if (id !== undefined) {
17789 TextEditChangeImpl.prototype.add = function (edit) {
17790 this.edits.push(edit);
17792 TextEditChangeImpl.prototype.all = function () {
17795 TextEditChangeImpl.prototype.clear = function () {
17796 this.edits.splice(0, this.edits.length);
17798 TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
17799 if (value === undefined) {
17800 throw new Error("Text edit change is not configured to manage change annotations.");
17803 return TextEditChangeImpl;
17808 var ChangeAnnotations = /** @class */ (function () {
17809 function ChangeAnnotations(annotations) {
17810 this._annotations = annotations === undefined ? Object.create(null) : annotations;
17814 ChangeAnnotations.prototype.all = function () {
17815 return this._annotations;
17817 Object.defineProperty(ChangeAnnotations.prototype, "size", {
17824 ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
17826 if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
17827 id = idOrAnnotation;
17830 id = this.nextId();
17831 annotation = idOrAnnotation;
17833 if (this._annotations[id] !== undefined) {
17834 throw new Error("Id " + id + " is already in use.");
17836 if (annotation === undefined) {
17837 throw new Error("No annotation provided for id " + id);
17839 this._annotations[id] = annotation;
17843 ChangeAnnotations.prototype.nextId = function () {
17845 return this._counter.toString();
17847 return ChangeAnnotations;
17850 * A workspace change helps constructing changes to a workspace.
17852 var WorkspaceChange = /** @class */ (function () {
17853 function WorkspaceChange(workspaceEdit) {
17855 this._textEditChanges = Object.create(null);
17856 if (workspaceEdit !== undefined) {
17857 this._workspaceEdit = workspaceEdit;
17858 if (workspaceEdit.documentChanges) {
17859 this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
17860 workspaceEdit.changeAnnotations = this._changeAnnotations.all();
17861 workspaceEdit.documentChanges.forEach(function (change) {
17862 if (TextDocumentEdit.is(change)) {
17863 var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
17864 _this._textEditChanges[change.textDocument.uri] = textEditChange;
17868 else if (workspaceEdit.changes) {
17869 Object.keys(workspaceEdit.changes).forEach(function (key) {
17870 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
17871 _this._textEditChanges[key] = textEditChange;
17876 this._workspaceEdit = {};
17879 Object.defineProperty(WorkspaceChange.prototype, "edit", {
17881 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
17882 * use to be returned from a workspace edit operation like rename.
17885 this.initDocumentChanges();
17886 if (this._changeAnnotations !== undefined) {
17887 if (this._changeAnnotations.size === 0) {
17888 this._workspaceEdit.changeAnnotations = undefined;
17891 this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
17894 return this._workspaceEdit;
17899 WorkspaceChange.prototype.getTextEditChange = function (key) {
17900 if (OptionalVersionedTextDocumentIdentifier.is(key)) {
17901 this.initDocumentChanges();
17902 if (this._workspaceEdit.documentChanges === undefined) {
17903 throw new Error('Workspace edit is not configured for document changes.');
17905 var textDocument = { uri: key.uri, version: key.version };
17906 var result = this._textEditChanges[textDocument.uri];
17909 var textDocumentEdit = {
17910 textDocument: textDocument,
17913 this._workspaceEdit.documentChanges.push(textDocumentEdit);
17914 result = new TextEditChangeImpl(edits, this._changeAnnotations);
17915 this._textEditChanges[textDocument.uri] = result;
17920 this.initChanges();
17921 if (this._workspaceEdit.changes === undefined) {
17922 throw new Error('Workspace edit is not configured for normal text edit changes.');
17924 var result = this._textEditChanges[key];
17927 this._workspaceEdit.changes[key] = edits;
17928 result = new TextEditChangeImpl(edits);
17929 this._textEditChanges[key] = result;
17934 WorkspaceChange.prototype.initDocumentChanges = function () {
17935 if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
17936 this._changeAnnotations = new ChangeAnnotations();
17937 this._workspaceEdit.documentChanges = [];
17938 this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
17941 WorkspaceChange.prototype.initChanges = function () {
17942 if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
17943 this._workspaceEdit.changes = Object.create(null);
17946 WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
17947 this.initDocumentChanges();
17948 if (this._workspaceEdit.documentChanges === undefined) {
17949 throw new Error('Workspace edit is not configured for document changes.');
17952 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
17953 annotation = optionsOrAnnotation;
17956 options = optionsOrAnnotation;
17960 if (annotation === undefined) {
17961 operation = CreateFile.create(uri, options);
17964 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
17965 operation = CreateFile.create(uri, options, id);
17967 this._workspaceEdit.documentChanges.push(operation);
17968 if (id !== undefined) {
17972 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
17973 this.initDocumentChanges();
17974 if (this._workspaceEdit.documentChanges === undefined) {
17975 throw new Error('Workspace edit is not configured for document changes.');
17978 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
17979 annotation = optionsOrAnnotation;
17982 options = optionsOrAnnotation;
17986 if (annotation === undefined) {
17987 operation = RenameFile.create(oldUri, newUri, options);
17990 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
17991 operation = RenameFile.create(oldUri, newUri, options, id);
17993 this._workspaceEdit.documentChanges.push(operation);
17994 if (id !== undefined) {
17998 WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
17999 this.initDocumentChanges();
18000 if (this._workspaceEdit.documentChanges === undefined) {
18001 throw new Error('Workspace edit is not configured for document changes.');
18004 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
18005 annotation = optionsOrAnnotation;
18008 options = optionsOrAnnotation;
18012 if (annotation === undefined) {
18013 operation = DeleteFile.create(uri, options);
18016 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
18017 operation = DeleteFile.create(uri, options, id);
18019 this._workspaceEdit.documentChanges.push(operation);
18020 if (id !== undefined) {
18024 return WorkspaceChange;
18028 * The TextDocumentIdentifier namespace provides helper functions to work with
18029 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
18031 var TextDocumentIdentifier;
18032 (function (TextDocumentIdentifier) {
18034 * Creates a new TextDocumentIdentifier literal.
18035 * @param uri The document's uri.
18037 function create(uri) {
18038 return { uri: uri };
18040 TextDocumentIdentifier.create = create;
18042 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
18044 function is(value) {
18045 var candidate = value;
18046 return Is.defined(candidate) && Is.string(candidate.uri);
18048 TextDocumentIdentifier.is = is;
18049 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
18051 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
18052 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
18054 var VersionedTextDocumentIdentifier;
18055 (function (VersionedTextDocumentIdentifier) {
18057 * Creates a new VersionedTextDocumentIdentifier literal.
18058 * @param uri The document's uri.
18059 * @param uri The document's text.
18061 function create(uri, version) {
18062 return { uri: uri, version: version };
18064 VersionedTextDocumentIdentifier.create = create;
18066 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
18068 function is(value) {
18069 var candidate = value;
18070 return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
18072 VersionedTextDocumentIdentifier.is = is;
18073 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
18075 * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
18076 * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.
18078 var OptionalVersionedTextDocumentIdentifier;
18079 (function (OptionalVersionedTextDocumentIdentifier) {
18081 * Creates a new OptionalVersionedTextDocumentIdentifier literal.
18082 * @param uri The document's uri.
18083 * @param uri The document's text.
18085 function create(uri, version) {
18086 return { uri: uri, version: version };
18088 OptionalVersionedTextDocumentIdentifier.create = create;
18090 * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.
18092 function is(value) {
18093 var candidate = value;
18094 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
18096 OptionalVersionedTextDocumentIdentifier.is = is;
18097 })(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
18099 * The TextDocumentItem namespace provides helper functions to work with
18100 * [TextDocumentItem](#TextDocumentItem) literals.
18102 var TextDocumentItem;
18103 (function (TextDocumentItem) {
18105 * Creates a new TextDocumentItem literal.
18106 * @param uri The document's uri.
18107 * @param languageId The document's language identifier.
18108 * @param version The document's version number.
18109 * @param text The document's text.
18111 function create(uri, languageId, version, text) {
18112 return { uri: uri, languageId: languageId, version: version, text: text };
18114 TextDocumentItem.create = create;
18116 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
18118 function is(value) {
18119 var candidate = value;
18120 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
18122 TextDocumentItem.is = is;
18123 })(TextDocumentItem || (TextDocumentItem = {}));
18125 * Describes the content type that a client supports in various
18126 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
18128 * Please note that `MarkupKinds` must not start with a `$`. This kinds
18129 * are reserved for internal usage.
18132 (function (MarkupKind) {
18134 * Plain text is supported as a content format
18136 MarkupKind.PlainText = 'plaintext';
18138 * Markdown is supported as a content format
18140 MarkupKind.Markdown = 'markdown';
18141 })(MarkupKind || (MarkupKind = {}));
18142 (function (MarkupKind) {
18144 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
18146 function is(value) {
18147 var candidate = value;
18148 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
18150 MarkupKind.is = is;
18151 })(MarkupKind || (MarkupKind = {}));
18153 (function (MarkupContent) {
18155 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
18157 function is(value) {
18158 var candidate = value;
18159 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
18161 MarkupContent.is = is;
18162 })(MarkupContent || (MarkupContent = {}));
18164 * The kind of a completion entry.
18166 var CompletionItemKind;
18167 (function (CompletionItemKind) {
18168 CompletionItemKind.Text = 1;
18169 CompletionItemKind.Method = 2;
18170 CompletionItemKind.Function = 3;
18171 CompletionItemKind.Constructor = 4;
18172 CompletionItemKind.Field = 5;
18173 CompletionItemKind.Variable = 6;
18174 CompletionItemKind.Class = 7;
18175 CompletionItemKind.Interface = 8;
18176 CompletionItemKind.Module = 9;
18177 CompletionItemKind.Property = 10;
18178 CompletionItemKind.Unit = 11;
18179 CompletionItemKind.Value = 12;
18180 CompletionItemKind.Enum = 13;
18181 CompletionItemKind.Keyword = 14;
18182 CompletionItemKind.Snippet = 15;
18183 CompletionItemKind.Color = 16;
18184 CompletionItemKind.File = 17;
18185 CompletionItemKind.Reference = 18;
18186 CompletionItemKind.Folder = 19;
18187 CompletionItemKind.EnumMember = 20;
18188 CompletionItemKind.Constant = 21;
18189 CompletionItemKind.Struct = 22;
18190 CompletionItemKind.Event = 23;
18191 CompletionItemKind.Operator = 24;
18192 CompletionItemKind.TypeParameter = 25;
18193 })(CompletionItemKind || (CompletionItemKind = {}));
18195 * Defines whether the insert text in a completion item should be interpreted as
18196 * plain text or a snippet.
18198 var InsertTextFormat;
18199 (function (InsertTextFormat) {
18201 * The primary text to be inserted is treated as a plain string.
18203 InsertTextFormat.PlainText = 1;
18205 * The primary text to be inserted is treated as a snippet.
18207 * A snippet can define tab stops and placeholders with `$1`, `$2`
18208 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
18209 * the end of the snippet. Placeholders with equal identifiers are linked,
18210 * that is typing in one will update others too.
18212 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
18214 InsertTextFormat.Snippet = 2;
18215 })(InsertTextFormat || (InsertTextFormat = {}));
18217 * Completion item tags are extra annotations that tweak the rendering of a completion
18222 var CompletionItemTag;
18223 (function (CompletionItemTag) {
18225 * Render a completion as obsolete, usually using a strike-out.
18227 CompletionItemTag.Deprecated = 1;
18228 })(CompletionItemTag || (CompletionItemTag = {}));
18230 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
18234 var InsertReplaceEdit;
18235 (function (InsertReplaceEdit) {
18237 * Creates a new insert / replace edit
18239 function create(newText, insert, replace) {
18240 return { newText: newText, insert: insert, replace: replace };
18242 InsertReplaceEdit.create = create;
18244 * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
18246 function is(value) {
18247 var candidate = value;
18248 return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
18250 InsertReplaceEdit.is = is;
18251 })(InsertReplaceEdit || (InsertReplaceEdit = {}));
18253 * How whitespace and indentation is handled during completion
18258 var InsertTextMode;
18259 (function (InsertTextMode) {
18261 * The insertion or replace strings is taken as it is. If the
18262 * value is multi line the lines below the cursor will be
18263 * inserted using the indentation defined in the string value.
18264 * The client will not apply any kind of adjustments to the
18267 InsertTextMode.asIs = 1;
18269 * The editor adjusts leading whitespace of new lines so that
18270 * they match the indentation up to the cursor of the line for
18271 * which the item is accepted.
18273 * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
18274 * multi line completion item is indented using 2 tabs and all
18275 * following lines inserted will be indented using 2 tabs as well.
18277 InsertTextMode.adjustIndentation = 2;
18278 })(InsertTextMode || (InsertTextMode = {}));
18280 * The CompletionItem namespace provides functions to deal with
18281 * completion items.
18283 var CompletionItem;
18284 (function (CompletionItem) {
18286 * Create a completion item and seed it with a label.
18287 * @param label The completion item's label
18289 function create(label) {
18290 return { label: label };
18292 CompletionItem.create = create;
18293 })(CompletionItem || (CompletionItem = {}));
18295 * The CompletionList namespace provides functions to deal with
18296 * completion lists.
18298 var CompletionList;
18299 (function (CompletionList) {
18301 * Creates a new completion list.
18303 * @param items The completion items.
18304 * @param isIncomplete The list is not complete.
18306 function create(items, isIncomplete) {
18307 return { items: items ? items : [], isIncomplete: !!isIncomplete };
18309 CompletionList.create = create;
18310 })(CompletionList || (CompletionList = {}));
18312 (function (MarkedString) {
18314 * Creates a marked string from plain text.
18316 * @param plainText The plain text.
18318 function fromPlainText(plainText) {
18319 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
18321 MarkedString.fromPlainText = fromPlainText;
18323 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
18325 function is(value) {
18326 var candidate = value;
18327 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
18329 MarkedString.is = is;
18330 })(MarkedString || (MarkedString = {}));
18332 (function (Hover) {
18334 * Checks whether the given value conforms to the [Hover](#Hover) interface.
18336 function is(value) {
18337 var candidate = value;
18338 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
18339 MarkedString.is(candidate.contents) ||
18340 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
18343 })(Hover || (Hover = {}));
18345 * The ParameterInformation namespace provides helper functions to work with
18346 * [ParameterInformation](#ParameterInformation) literals.
18348 var ParameterInformation;
18349 (function (ParameterInformation) {
18351 * Creates a new parameter information literal.
18353 * @param label A label string.
18354 * @param documentation A doc string.
18356 function create(label, documentation) {
18357 return documentation ? { label: label, documentation: documentation } : { label: label };
18359 ParameterInformation.create = create;
18360 })(ParameterInformation || (ParameterInformation = {}));
18362 * The SignatureInformation namespace provides helper functions to work with
18363 * [SignatureInformation](#SignatureInformation) literals.
18365 var SignatureInformation;
18366 (function (SignatureInformation) {
18367 function create(label, documentation) {
18368 var parameters = [];
18369 for (var _i = 2; _i < arguments.length; _i++) {
18370 parameters[_i - 2] = arguments[_i];
18372 var result = { label: label };
18373 if (Is.defined(documentation)) {
18374 result.documentation = documentation;
18376 if (Is.defined(parameters)) {
18377 result.parameters = parameters;
18380 result.parameters = [];
18384 SignatureInformation.create = create;
18385 })(SignatureInformation || (SignatureInformation = {}));
18387 * A document highlight kind.
18389 var DocumentHighlightKind;
18390 (function (DocumentHighlightKind) {
18392 * A textual occurrence.
18394 DocumentHighlightKind.Text = 1;
18396 * Read-access of a symbol, like reading a variable.
18398 DocumentHighlightKind.Read = 2;
18400 * Write-access of a symbol, like writing to a variable.
18402 DocumentHighlightKind.Write = 3;
18403 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
18405 * DocumentHighlight namespace to provide helper functions to work with
18406 * [DocumentHighlight](#DocumentHighlight) literals.
18408 var DocumentHighlight;
18409 (function (DocumentHighlight) {
18411 * Create a DocumentHighlight object.
18412 * @param range The range the highlight applies to.
18414 function create(range, kind) {
18415 var result = { range: range };
18416 if (Is.number(kind)) {
18417 result.kind = kind;
18421 DocumentHighlight.create = create;
18422 })(DocumentHighlight || (DocumentHighlight = {}));
18427 (function (SymbolKind) {
18428 SymbolKind.File = 1;
18429 SymbolKind.Module = 2;
18430 SymbolKind.Namespace = 3;
18431 SymbolKind.Package = 4;
18432 SymbolKind.Class = 5;
18433 SymbolKind.Method = 6;
18434 SymbolKind.Property = 7;
18435 SymbolKind.Field = 8;
18436 SymbolKind.Constructor = 9;
18437 SymbolKind.Enum = 10;
18438 SymbolKind.Interface = 11;
18439 SymbolKind.Function = 12;
18440 SymbolKind.Variable = 13;
18441 SymbolKind.Constant = 14;
18442 SymbolKind.String = 15;
18443 SymbolKind.Number = 16;
18444 SymbolKind.Boolean = 17;
18445 SymbolKind.Array = 18;
18446 SymbolKind.Object = 19;
18447 SymbolKind.Key = 20;
18448 SymbolKind.Null = 21;
18449 SymbolKind.EnumMember = 22;
18450 SymbolKind.Struct = 23;
18451 SymbolKind.Event = 24;
18452 SymbolKind.Operator = 25;
18453 SymbolKind.TypeParameter = 26;
18454 })(SymbolKind || (SymbolKind = {}));
18456 * Symbol tags are extra annotations that tweak the rendering of a symbol.
18460 (function (SymbolTag) {
18462 * Render a symbol as obsolete, usually using a strike-out.
18464 SymbolTag.Deprecated = 1;
18465 })(SymbolTag || (SymbolTag = {}));
18466 var SymbolInformation;
18467 (function (SymbolInformation) {
18469 * Creates a new symbol information literal.
18471 * @param name The name of the symbol.
18472 * @param kind The kind of the symbol.
18473 * @param range The range of the location of the symbol.
18474 * @param uri The resource of the location of symbol, defaults to the current document.
18475 * @param containerName The name of the symbol containing the symbol.
18477 function create(name, kind, range, uri, containerName) {
18481 location: { uri: uri, range: range }
18483 if (containerName) {
18484 result.containerName = containerName;
18488 SymbolInformation.create = create;
18489 })(SymbolInformation || (SymbolInformation = {}));
18490 var DocumentSymbol;
18491 (function (DocumentSymbol) {
18493 * Creates a new symbol information literal.
18495 * @param name The name of the symbol.
18496 * @param detail The detail of the symbol.
18497 * @param kind The kind of the symbol.
18498 * @param range The range of the symbol.
18499 * @param selectionRange The selectionRange of the symbol.
18500 * @param children Children of the symbol.
18502 function create(name, detail, kind, range, selectionRange, children) {
18508 selectionRange: selectionRange
18510 if (children !== undefined) {
18511 result.children = children;
18515 DocumentSymbol.create = create;
18517 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
18519 function is(value) {
18520 var candidate = value;
18521 return candidate &&
18522 Is.string(candidate.name) && Is.number(candidate.kind) &&
18523 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
18524 (candidate.detail === undefined || Is.string(candidate.detail)) &&
18525 (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
18526 (candidate.children === undefined || Array.isArray(candidate.children)) &&
18527 (candidate.tags === undefined || Array.isArray(candidate.tags));
18529 DocumentSymbol.is = is;
18530 })(DocumentSymbol || (DocumentSymbol = {}));
18532 * A set of predefined code action kinds
18534 var CodeActionKind;
18535 (function (CodeActionKind) {
18539 CodeActionKind.Empty = '';
18541 * Base kind for quickfix actions: 'quickfix'
18543 CodeActionKind.QuickFix = 'quickfix';
18545 * Base kind for refactoring actions: 'refactor'
18547 CodeActionKind.Refactor = 'refactor';
18549 * Base kind for refactoring extraction actions: 'refactor.extract'
18551 * Example extract actions:
18554 * - Extract function
18555 * - Extract variable
18556 * - Extract interface from class
18559 CodeActionKind.RefactorExtract = 'refactor.extract';
18561 * Base kind for refactoring inline actions: 'refactor.inline'
18563 * Example inline actions:
18565 * - Inline function
18566 * - Inline variable
18567 * - Inline constant
18570 CodeActionKind.RefactorInline = 'refactor.inline';
18572 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
18574 * Example rewrite actions:
18576 * - Convert JavaScript function to class
18577 * - Add or remove parameter
18578 * - Encapsulate field
18579 * - Make method static
18580 * - Move method to base class
18583 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
18585 * Base kind for source actions: `source`
18587 * Source code actions apply to the entire file.
18589 CodeActionKind.Source = 'source';
18591 * Base kind for an organize imports source action: `source.organizeImports`
18593 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
18595 * Base kind for auto-fix source actions: `source.fixAll`.
18597 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
18598 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
18602 CodeActionKind.SourceFixAll = 'source.fixAll';
18603 })(CodeActionKind || (CodeActionKind = {}));
18605 * The CodeActionContext namespace provides helper functions to work with
18606 * [CodeActionContext](#CodeActionContext) literals.
18608 var CodeActionContext;
18609 (function (CodeActionContext) {
18611 * Creates a new CodeActionContext literal.
18613 function create(diagnostics, only) {
18614 var result = { diagnostics: diagnostics };
18615 if (only !== undefined && only !== null) {
18616 result.only = only;
18620 CodeActionContext.create = create;
18622 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
18624 function is(value) {
18625 var candidate = value;
18626 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string));
18628 CodeActionContext.is = is;
18629 })(CodeActionContext || (CodeActionContext = {}));
18631 (function (CodeAction) {
18632 function create(title, kindOrCommandOrEdit, kind) {
18633 var result = { title: title };
18634 var checkKind = true;
18635 if (typeof kindOrCommandOrEdit === 'string') {
18637 result.kind = kindOrCommandOrEdit;
18639 else if (Command.is(kindOrCommandOrEdit)) {
18640 result.command = kindOrCommandOrEdit;
18643 result.edit = kindOrCommandOrEdit;
18645 if (checkKind && kind !== undefined) {
18646 result.kind = kind;
18650 CodeAction.create = create;
18651 function is(value) {
18652 var candidate = value;
18653 return candidate && Is.string(candidate.title) &&
18654 (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
18655 (candidate.kind === undefined || Is.string(candidate.kind)) &&
18656 (candidate.edit !== undefined || candidate.command !== undefined) &&
18657 (candidate.command === undefined || Command.is(candidate.command)) &&
18658 (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
18659 (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
18661 CodeAction.is = is;
18662 })(CodeAction || (CodeAction = {}));
18664 * The CodeLens namespace provides helper functions to work with
18665 * [CodeLens](#CodeLens) literals.
18668 (function (CodeLens) {
18670 * Creates a new CodeLens literal.
18672 function create(range, data) {
18673 var result = { range: range };
18674 if (Is.defined(data)) {
18675 result.data = data;
18679 CodeLens.create = create;
18681 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
18683 function is(value) {
18684 var candidate = value;
18685 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
18688 })(CodeLens || (CodeLens = {}));
18690 * The FormattingOptions namespace provides helper functions to work with
18691 * [FormattingOptions](#FormattingOptions) literals.
18693 var FormattingOptions;
18694 (function (FormattingOptions) {
18696 * Creates a new FormattingOptions literal.
18698 function create(tabSize, insertSpaces) {
18699 return { tabSize: tabSize, insertSpaces: insertSpaces };
18701 FormattingOptions.create = create;
18703 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
18705 function is(value) {
18706 var candidate = value;
18707 return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
18709 FormattingOptions.is = is;
18710 })(FormattingOptions || (FormattingOptions = {}));
18712 * The DocumentLink namespace provides helper functions to work with
18713 * [DocumentLink](#DocumentLink) literals.
18716 (function (DocumentLink) {
18718 * Creates a new DocumentLink literal.
18720 function create(range, target, data) {
18721 return { range: range, target: target, data: data };
18723 DocumentLink.create = create;
18725 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
18727 function is(value) {
18728 var candidate = value;
18729 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
18731 DocumentLink.is = is;
18732 })(DocumentLink || (DocumentLink = {}));
18734 * The SelectionRange namespace provides helper function to work with
18735 * SelectionRange literals.
18737 var SelectionRange;
18738 (function (SelectionRange) {
18740 * Creates a new SelectionRange
18741 * @param range the range.
18742 * @param parent an optional parent.
18744 function create(range, parent) {
18745 return { range: range, parent: parent };
18747 SelectionRange.create = create;
18748 function is(value) {
18749 var candidate = value;
18750 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
18752 SelectionRange.is = is;
18753 })(SelectionRange || (SelectionRange = {}));
18754 var EOL = ['\n', '\r\n', '\r'];
18756 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
18759 (function (TextDocument) {
18761 * Creates a new ITextDocument literal from the given uri and content.
18762 * @param uri The document's uri.
18763 * @param languageId The document's language Id.
18764 * @param content The document's content.
18766 function create(uri, languageId, version, content) {
18767 return new FullTextDocument(uri, languageId, version, content);
18769 TextDocument.create = create;
18771 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
18773 function is(value) {
18774 var candidate = value;
18775 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
18776 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
18778 TextDocument.is = is;
18779 function applyEdits(document, edits) {
18780 var text = document.getText();
18781 var sortedEdits = mergeSort(edits, function (a, b) {
18782 var diff = a.range.start.line - b.range.start.line;
18784 return a.range.start.character - b.range.start.character;
18788 var lastModifiedOffset = text.length;
18789 for (var i = sortedEdits.length - 1; i >= 0; i--) {
18790 var e = sortedEdits[i];
18791 var startOffset = document.offsetAt(e.range.start);
18792 var endOffset = document.offsetAt(e.range.end);
18793 if (endOffset <= lastModifiedOffset) {
18794 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
18797 throw new Error('Overlapping edit');
18799 lastModifiedOffset = startOffset;
18803 TextDocument.applyEdits = applyEdits;
18804 function mergeSort(data, compare) {
18805 if (data.length <= 1) {
18809 var p = (data.length / 2) | 0;
18810 var left = data.slice(0, p);
18811 var right = data.slice(p);
18812 mergeSort(left, compare);
18813 mergeSort(right, compare);
18817 while (leftIdx < left.length && rightIdx < right.length) {
18818 var ret = compare(left[leftIdx], right[rightIdx]);
18820 // smaller_equal -> take left to preserve order
18821 data[i++] = left[leftIdx++];
18824 // greater -> take right
18825 data[i++] = right[rightIdx++];
18828 while (leftIdx < left.length) {
18829 data[i++] = left[leftIdx++];
18831 while (rightIdx < right.length) {
18832 data[i++] = right[rightIdx++];
18836 })(TextDocument || (TextDocument = {}));
18838 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
18840 var FullTextDocument = /** @class */ (function () {
18841 function FullTextDocument(uri, languageId, version, content) {
18843 this._languageId = languageId;
18844 this._version = version;
18845 this._content = content;
18846 this._lineOffsets = undefined;
18848 Object.defineProperty(FullTextDocument.prototype, "uri", {
18855 Object.defineProperty(FullTextDocument.prototype, "languageId", {
18857 return this._languageId;
18862 Object.defineProperty(FullTextDocument.prototype, "version", {
18864 return this._version;
18869 FullTextDocument.prototype.getText = function (range) {
18871 var start = this.offsetAt(range.start);
18872 var end = this.offsetAt(range.end);
18873 return this._content.substring(start, end);
18875 return this._content;
18877 FullTextDocument.prototype.update = function (event, version) {
18878 this._content = event.text;
18879 this._version = version;
18880 this._lineOffsets = undefined;
18882 FullTextDocument.prototype.getLineOffsets = function () {
18883 if (this._lineOffsets === undefined) {
18884 var lineOffsets = [];
18885 var text = this._content;
18886 var isLineStart = true;
18887 for (var i = 0; i < text.length; i++) {
18889 lineOffsets.push(i);
18890 isLineStart = false;
18892 var ch = text.charAt(i);
18893 isLineStart = (ch === '\r' || ch === '\n');
18894 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
18898 if (isLineStart && text.length > 0) {
18899 lineOffsets.push(text.length);
18901 this._lineOffsets = lineOffsets;
18903 return this._lineOffsets;
18905 FullTextDocument.prototype.positionAt = function (offset) {
18906 offset = Math.max(Math.min(offset, this._content.length), 0);
18907 var lineOffsets = this.getLineOffsets();
18908 var low = 0, high = lineOffsets.length;
18910 return Position.create(0, offset);
18912 while (low < high) {
18913 var mid = Math.floor((low + high) / 2);
18914 if (lineOffsets[mid] > offset) {
18921 // low is the least x for which the line offset is larger than the current offset
18922 // or array.length if no line offset is larger than the current offset
18923 var line = low - 1;
18924 return Position.create(line, offset - lineOffsets[line]);
18926 FullTextDocument.prototype.offsetAt = function (position) {
18927 var lineOffsets = this.getLineOffsets();
18928 if (position.line >= lineOffsets.length) {
18929 return this._content.length;
18931 else if (position.line < 0) {
18934 var lineOffset = lineOffsets[position.line];
18935 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
18936 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
18938 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
18940 return this.getLineOffsets().length;
18945 return FullTextDocument;
18949 var toString = Object.prototype.toString;
18950 function defined(value) {
18951 return typeof value !== 'undefined';
18953 Is.defined = defined;
18954 function undefined(value) {
18955 return typeof value === 'undefined';
18957 Is.undefined = undefined;
18958 function boolean(value) {
18959 return value === true || value === false;
18961 Is.boolean = boolean;
18962 function string(value) {
18963 return toString.call(value) === '[object String]';
18965 Is.string = string;
18966 function number(value) {
18967 return toString.call(value) === '[object Number]';
18969 Is.number = number;
18970 function numberRange(value, min, max) {
18971 return toString.call(value) === '[object Number]' && min <= value && value <= max;
18973 Is.numberRange = numberRange;
18974 function integer(value) {
18975 return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
18977 Is.integer = integer;
18978 function uinteger(value) {
18979 return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
18981 Is.uinteger = uinteger;
18982 function func(value) {
18983 return toString.call(value) === '[object Function]';
18986 function objectLiteral(value) {
18987 // Strictly speaking class instances pass this check as well. Since the LSP
18988 // doesn't use classes we ignore this for now. If we do we need to add something
18989 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
18990 return value !== null && typeof value === 'object';
18992 Is.objectLiteral = objectLiteral;
18993 function typedArray(value, check) {
18994 return Array.isArray(value) && value.every(check);
18996 Is.typedArray = typedArray;
18997 })(Is || (Is = {}));
19002 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19004 __webpack_require__.r(__webpack_exports__);
19005 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19006 /* harmony export */ "TextDocument": () => /* binding */ TextDocument
19007 /* harmony export */ });
19008 /* --------------------------------------------------------------------------------------------
19009 * Copyright (c) Microsoft Corporation. All rights reserved.
19010 * Licensed under the MIT License. See License.txt in the project root for license information.
19011 * ------------------------------------------------------------------------------------------ */
19013 var FullTextDocument = /** @class */ (function () {
19014 function FullTextDocument(uri, languageId, version, content) {
19016 this._languageId = languageId;
19017 this._version = version;
19018 this._content = content;
19019 this._lineOffsets = undefined;
19021 Object.defineProperty(FullTextDocument.prototype, "uri", {
19028 Object.defineProperty(FullTextDocument.prototype, "languageId", {
19030 return this._languageId;
19035 Object.defineProperty(FullTextDocument.prototype, "version", {
19037 return this._version;
19042 FullTextDocument.prototype.getText = function (range) {
19044 var start = this.offsetAt(range.start);
19045 var end = this.offsetAt(range.end);
19046 return this._content.substring(start, end);
19048 return this._content;
19050 FullTextDocument.prototype.update = function (changes, version) {
19051 for (var _i = 0, changes_1 = changes; _i < changes_1.length; _i++) {
19052 var change = changes_1[_i];
19053 if (FullTextDocument.isIncremental(change)) {
19054 // makes sure start is before end
19055 var range = getWellformedRange(change.range);
19057 var startOffset = this.offsetAt(range.start);
19058 var endOffset = this.offsetAt(range.end);
19059 this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
19060 // update the offsets
19061 var startLine = Math.max(range.start.line, 0);
19062 var endLine = Math.max(range.end.line, 0);
19063 var lineOffsets = this._lineOffsets;
19064 var addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
19065 if (endLine - startLine === addedLineOffsets.length) {
19066 for (var i = 0, len = addedLineOffsets.length; i < len; i++) {
19067 lineOffsets[i + startLine + 1] = addedLineOffsets[i];
19071 if (addedLineOffsets.length < 10000) {
19072 lineOffsets.splice.apply(lineOffsets, [startLine + 1, endLine - startLine].concat(addedLineOffsets));
19074 else { // avoid too many arguments for splice
19075 this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
19078 var diff = change.text.length - (endOffset - startOffset);
19080 for (var i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
19081 lineOffsets[i] = lineOffsets[i] + diff;
19085 else if (FullTextDocument.isFull(change)) {
19086 this._content = change.text;
19087 this._lineOffsets = undefined;
19090 throw new Error('Unknown change event received');
19093 this._version = version;
19095 FullTextDocument.prototype.getLineOffsets = function () {
19096 if (this._lineOffsets === undefined) {
19097 this._lineOffsets = computeLineOffsets(this._content, true);
19099 return this._lineOffsets;
19101 FullTextDocument.prototype.positionAt = function (offset) {
19102 offset = Math.max(Math.min(offset, this._content.length), 0);
19103 var lineOffsets = this.getLineOffsets();
19104 var low = 0, high = lineOffsets.length;
19106 return { line: 0, character: offset };
19108 while (low < high) {
19109 var mid = Math.floor((low + high) / 2);
19110 if (lineOffsets[mid] > offset) {
19117 // low is the least x for which the line offset is larger than the current offset
19118 // or array.length if no line offset is larger than the current offset
19119 var line = low - 1;
19120 return { line: line, character: offset - lineOffsets[line] };
19122 FullTextDocument.prototype.offsetAt = function (position) {
19123 var lineOffsets = this.getLineOffsets();
19124 if (position.line >= lineOffsets.length) {
19125 return this._content.length;
19127 else if (position.line < 0) {
19130 var lineOffset = lineOffsets[position.line];
19131 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
19132 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
19134 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
19136 return this.getLineOffsets().length;
19141 FullTextDocument.isIncremental = function (event) {
19142 var candidate = event;
19143 return candidate !== undefined && candidate !== null &&
19144 typeof candidate.text === 'string' && candidate.range !== undefined &&
19145 (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
19147 FullTextDocument.isFull = function (event) {
19148 var candidate = event;
19149 return candidate !== undefined && candidate !== null &&
19150 typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
19152 return FullTextDocument;
19155 (function (TextDocument) {
19157 * Creates a new text document.
19159 * @param uri The document's uri.
19160 * @param languageId The document's language Id.
19161 * @param version The document's initial version number.
19162 * @param content The document's content.
19164 function create(uri, languageId, version, content) {
19165 return new FullTextDocument(uri, languageId, version, content);
19167 TextDocument.create = create;
19169 * Updates a TextDocument by modifing its content.
19171 * @param document the document to update. Only documents created by TextDocument.create are valid inputs.
19172 * @param changes the changes to apply to the document.
19173 * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
19176 function update(document, changes, version) {
19177 if (document instanceof FullTextDocument) {
19178 document.update(changes, version);
19182 throw new Error('TextDocument.update: document must be created by TextDocument.create');
19185 TextDocument.update = update;
19186 function applyEdits(document, edits) {
19187 var text = document.getText();
19188 var sortedEdits = mergeSort(edits.map(getWellformedEdit), function (a, b) {
19189 var diff = a.range.start.line - b.range.start.line;
19191 return a.range.start.character - b.range.start.character;
19195 var lastModifiedOffset = 0;
19197 for (var _i = 0, sortedEdits_1 = sortedEdits; _i < sortedEdits_1.length; _i++) {
19198 var e = sortedEdits_1[_i];
19199 var startOffset = document.offsetAt(e.range.start);
19200 if (startOffset < lastModifiedOffset) {
19201 throw new Error('Overlapping edit');
19203 else if (startOffset > lastModifiedOffset) {
19204 spans.push(text.substring(lastModifiedOffset, startOffset));
19206 if (e.newText.length) {
19207 spans.push(e.newText);
19209 lastModifiedOffset = document.offsetAt(e.range.end);
19211 spans.push(text.substr(lastModifiedOffset));
19212 return spans.join('');
19214 TextDocument.applyEdits = applyEdits;
19215 })(TextDocument || (TextDocument = {}));
19216 function mergeSort(data, compare) {
19217 if (data.length <= 1) {
19221 var p = (data.length / 2) | 0;
19222 var left = data.slice(0, p);
19223 var right = data.slice(p);
19224 mergeSort(left, compare);
19225 mergeSort(right, compare);
19229 while (leftIdx < left.length && rightIdx < right.length) {
19230 var ret = compare(left[leftIdx], right[rightIdx]);
19232 // smaller_equal -> take left to preserve order
19233 data[i++] = left[leftIdx++];
19236 // greater -> take right
19237 data[i++] = right[rightIdx++];
19240 while (leftIdx < left.length) {
19241 data[i++] = left[leftIdx++];
19243 while (rightIdx < right.length) {
19244 data[i++] = right[rightIdx++];
19248 function computeLineOffsets(text, isAtLineStart, textOffset) {
19249 if (textOffset === void 0) { textOffset = 0; }
19250 var result = isAtLineStart ? [textOffset] : [];
19251 for (var i = 0; i < text.length; i++) {
19252 var ch = text.charCodeAt(i);
19253 if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
19254 if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {
19257 result.push(textOffset + i + 1);
19262 function getWellformedRange(range) {
19263 var start = range.start;
19264 var end = range.end;
19265 if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
19266 return { start: end, end: start };
19270 function getWellformedEdit(textEdit) {
19271 var range = getWellformedRange(textEdit.range);
19272 if (range !== textEdit.range) {
19273 return { newText: textEdit.newText, range: range };
19281 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19283 __webpack_require__.r(__webpack_exports__);
19284 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19285 /* harmony export */ "PathCompletionParticipant": () => /* binding */ PathCompletionParticipant
19286 /* harmony export */ });
19287 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(88);
19288 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75);
19289 /* harmony import */ var _utils_resources__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92);
19290 /*---------------------------------------------------------------------------------------------
19291 * Copyright (c) Microsoft Corporation. All rights reserved.
19292 * Licensed under the MIT License. See License.txt in the project root for license information.
19293 *--------------------------------------------------------------------------------------------*/
19294 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
19295 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19296 return new (P || (P = Promise))(function (resolve, reject) {
19297 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19298 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19299 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19300 step((generator = generator.apply(thisArg, _arguments || [])).next());
19303 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
19304 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
19305 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
19306 function verb(n) { return function (v) { return step([n, v]); }; }
19307 function step(op) {
19308 if (f) throw new TypeError("Generator is already executing.");
19310 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19311 if (y = 0, t) op = [op[0] & 2, t.value];
19313 case 0: case 1: t = op; break;
19314 case 4: _.label++; return { value: op[1], done: false };
19315 case 5: _.label++; y = op[1]; op = [0]; continue;
19316 case 7: op = _.ops.pop(); _.trys.pop(); continue;
19318 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
19319 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
19320 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
19321 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
19322 if (t[2]) _.ops.pop();
19323 _.trys.pop(); continue;
19325 op = body.call(thisArg, _);
19326 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
19327 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
19333 var PathCompletionParticipant = /** @class */ (function () {
19334 function PathCompletionParticipant(readDirectory) {
19335 this.readDirectory = readDirectory;
19336 this.literalCompletions = [];
19337 this.importCompletions = [];
19339 PathCompletionParticipant.prototype.onCssURILiteralValue = function (context) {
19340 this.literalCompletions.push(context);
19342 PathCompletionParticipant.prototype.onCssImportPath = function (context) {
19343 this.importCompletions.push(context);
19345 PathCompletionParticipant.prototype.computeCompletions = function (document, documentContext) {
19346 return __awaiter(this, void 0, void 0, function () {
19347 var result, _i, _a, literalCompletion, uriValue, fullValue, items, _b, items_1, item, _c, _d, importCompletion, pathValue, fullValue, suggestions, _e, suggestions_1, item;
19348 return __generator(this, function (_f) {
19349 switch (_f.label) {
19351 result = { items: [], isIncomplete: false };
19352 _i = 0, _a = this.literalCompletions;
19355 if (!(_i < _a.length)) return [3 /*break*/, 5];
19356 literalCompletion = _a[_i];
19357 uriValue = literalCompletion.uriValue;
19358 fullValue = stripQuotes(uriValue);
19359 if (!(fullValue === '.' || fullValue === '..')) return [3 /*break*/, 2];
19360 result.isIncomplete = true;
19361 return [3 /*break*/, 4];
19362 case 2: return [4 /*yield*/, this.providePathSuggestions(uriValue, literalCompletion.position, literalCompletion.range, document, documentContext)];
19365 for (_b = 0, items_1 = items; _b < items_1.length; _b++) {
19366 item = items_1[_b];
19367 result.items.push(item);
19372 return [3 /*break*/, 1];
19374 _c = 0, _d = this.importCompletions;
19377 if (!(_c < _d.length)) return [3 /*break*/, 10];
19378 importCompletion = _d[_c];
19379 pathValue = importCompletion.pathValue;
19380 fullValue = stripQuotes(pathValue);
19381 if (!(fullValue === '.' || fullValue === '..')) return [3 /*break*/, 7];
19382 result.isIncomplete = true;
19383 return [3 /*break*/, 9];
19384 case 7: return [4 /*yield*/, this.providePathSuggestions(pathValue, importCompletion.position, importCompletion.range, document, documentContext)];
19386 suggestions = _f.sent();
19387 if (document.languageId === 'scss') {
19388 suggestions.forEach(function (s) {
19389 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(s.label, '_') && (0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.endsWith)(s.label, '.scss')) {
19391 s.textEdit.newText = s.label.slice(1, -5);
19394 s.label = s.label.slice(1, -5);
19399 for (_e = 0, suggestions_1 = suggestions; _e < suggestions_1.length; _e++) {
19400 item = suggestions_1[_e];
19401 result.items.push(item);
19406 return [3 /*break*/, 6];
19407 case 10: return [2 /*return*/, result];
19412 PathCompletionParticipant.prototype.providePathSuggestions = function (pathValue, position, range, document, documentContext) {
19413 return __awaiter(this, void 0, void 0, function () {
19414 var fullValue, isValueQuoted, valueBeforeCursor, currentDocUri, fullValueRange, replaceRange, valueBeforeLastSlash, parentDir, result, infos, _i, infos_1, _a, name, type, e_1;
19415 return __generator(this, function (_b) {
19416 switch (_b.label) {
19418 fullValue = stripQuotes(pathValue);
19419 isValueQuoted = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(pathValue, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(pathValue, "\"");
19420 valueBeforeCursor = isValueQuoted
19421 ? fullValue.slice(0, position.character - (range.start.character + 1))
19422 : fullValue.slice(0, position.character - range.start.character);
19423 currentDocUri = document.uri;
19424 fullValueRange = isValueQuoted ? shiftRange(range, 1, -1) : range;
19425 replaceRange = pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange);
19426 valueBeforeLastSlash = valueBeforeCursor.substring(0, valueBeforeCursor.lastIndexOf('/') + 1);
19427 parentDir = documentContext.resolveReference(valueBeforeLastSlash || '.', currentDocUri);
19428 if (!parentDir) return [3 /*break*/, 4];
19431 _b.trys.push([1, 3, , 4]);
19433 return [4 /*yield*/, this.readDirectory(parentDir)];
19436 for (_i = 0, infos_1 = infos; _i < infos_1.length; _i++) {
19437 _a = infos_1[_i], name = _a[0], type = _a[1];
19438 // Exclude paths that start with `.`
19439 if (name.charCodeAt(0) !== CharCode_dot && (type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FileType.Directory || (0,_utils_resources__WEBPACK_IMPORTED_MODULE_2__.joinPath)(parentDir, name) !== currentDocUri)) {
19440 result.push(createCompletionItem(name, type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FileType.Directory, replaceRange));
19443 return [2 /*return*/, result];
19446 return [3 /*break*/, 4];
19447 case 4: return [2 /*return*/, []];
19452 return PathCompletionParticipant;
19455 var CharCode_dot = '.'.charCodeAt(0);
19456 function stripQuotes(fullValue) {
19457 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(fullValue, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(fullValue, "\"")) {
19458 return fullValue.slice(1, -1);
19464 function pathToReplaceRange(valueBeforeCursor, fullValue, fullValueRange) {
19466 var lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/');
19467 if (lastIndexOfSlash === -1) {
19468 replaceRange = fullValueRange;
19471 // For cases where cursor is in the middle of attribute value, like <script src="./s|rc/test.js">
19472 // Find the last slash before cursor, and calculate the start of replace range from there
19473 var valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
19474 var startPos = shiftPosition(fullValueRange.end, -valueAfterLastSlash.length);
19475 // If whitespace exists, replace until it
19476 var whitespaceIndex = valueAfterLastSlash.indexOf(' ');
19477 var endPos = void 0;
19478 if (whitespaceIndex !== -1) {
19479 endPos = shiftPosition(startPos, whitespaceIndex);
19482 endPos = fullValueRange.end;
19484 replaceRange = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(startPos, endPos);
19486 return replaceRange;
19488 function createCompletionItem(name, isDir, replaceRange) {
19492 label: escapePath(name),
19493 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind.Folder,
19494 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(replaceRange, escapePath(name)),
19497 command: 'editor.action.triggerSuggest'
19503 label: escapePath(name),
19504 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind.File,
19505 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(replaceRange, escapePath(name))
19509 // Escape https://www.w3.org/TR/CSS1/#url
19510 function escapePath(p) {
19511 return p.replace(/(\s|\(|\)|,|"|')/g, '\\$1');
19513 function shiftPosition(pos, offset) {
19514 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Position.create(pos.line, pos.character + offset);
19516 function shiftRange(range, startOffset, endOffset) {
19517 var start = shiftPosition(range.start, startOffset);
19518 var end = shiftPosition(range.end, endOffset);
19519 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(start, end);
19525 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19527 __webpack_require__.r(__webpack_exports__);
19528 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19529 /* harmony export */ "dirname": () => /* binding */ dirname,
19530 /* harmony export */ "joinPath": () => /* binding */ joinPath
19531 /* harmony export */ });
19532 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93);
19533 /*---------------------------------------------------------------------------------------------
19534 * Copyright (c) Microsoft Corporation. All rights reserved.
19535 * Licensed under the MIT License. See License.txt in the project root for license information.
19536 *--------------------------------------------------------------------------------------------*/
19537 var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
19538 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
19539 for (var r = Array(s), k = 0, i = 0; i < il; i++)
19540 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
19545 function dirname(uriString) {
19546 return vscode_uri__WEBPACK_IMPORTED_MODULE_0__.Utils.dirname(vscode_uri__WEBPACK_IMPORTED_MODULE_0__.URI.parse(uriString)).toString();
19548 function joinPath(uriString) {
19550 for (var _i = 1; _i < arguments.length; _i++) {
19551 paths[_i - 1] = arguments[_i];
19553 return vscode_uri__WEBPACK_IMPORTED_MODULE_0__.Utils.joinPath.apply(vscode_uri__WEBPACK_IMPORTED_MODULE_0__.Utils, __spreadArrays([vscode_uri__WEBPACK_IMPORTED_MODULE_0__.URI.parse(uriString)], paths)).toString();
19559 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19561 __webpack_require__.r(__webpack_exports__);
19562 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19563 /* harmony export */ "URI": () => /* binding */ URI,
19564 /* harmony export */ "Utils": () => /* binding */ Utils
19565 /* harmony export */ });
19566 var LIB;LIB=(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",o=0,i=-1,a=0,h=0;h<=t.length;++h){if(h<t.length)r=t.charCodeAt(h);else{if(47===r)break;r=47}if(47===r){if(i===h-1||1===a);else if(i!==h-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var s=n.lastIndexOf("/");if(s!==n.length-1){-1===s?(n="",o=0):o=(n=n.slice(0,s)).length-1-n.lastIndexOf("/"),i=h,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=h,a=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,h):n=t.slice(i+1,h),o=h-i-1;i=h,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var t,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&o&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var o=arguments[r];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,h=1;h<r.length&&47===r.charCodeAt(h);++h);for(var s=r.length-h,f=a<s?a:s,u=-1,c=0;c<=f;++c){if(c===f){if(s>f){if(47===r.charCodeAt(h+c))return r.slice(h+c+1);if(0===c)return r.slice(h+c)}else a>f&&(47===t.charCodeAt(o+c)?u=c:0===c&&(u=0));break}var l=t.charCodeAt(o+c);if(l!==r.charCodeAt(h+c))break;47===l&&(u=c)}var p="";for(c=o+u+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(h+u):(h+=u,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var h=r.length-1,s=-1;for(n=t.length-1;n>=0;--n){var f=t.charCodeAt(n);if(47===f){if(!a){o=n+1;break}}else-1===s&&(a=!1,s=n+1),h>=0&&(f===r.charCodeAt(h)?-1==--h&&(i=n):(h=-1,i=s))}return o===i?i=s:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,h=t.length-1;h>=0;--h){var s=t.charCodeAt(h);if(47!==s)-1===o&&(i=!1,o=h+1),46===s?-1===r?r=h:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=h+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":t.slice(r,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,o=t.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,h=0,s=-1,f=!0,u=t.length-1,c=0;u>=n;--u)if(47!==(o=t.charCodeAt(u)))-1===s&&(f=!1,s=u+1),46===o?-1===a?a=u:1!==c&&(c=1):-1!==a&&(c=-1);else if(!f){h=u+1;break}return-1===a||-1===s||0===c||1===c&&a===s-1&&a===h+1?-1!==s&&(r.base=r.name=0===h&&i?t.slice(1,s):t.slice(h,s)):(0===h&&i?(r.name=t.slice(1,a),r.base=t.slice(1,s)):(r.name=t.slice(h,a),r.base=t.slice(h,s)),r.ext=t.slice(a,s)),h>0?r.dir=t.slice(0,h-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},447:(t,e,r)=>{var n;if(r.r(e),r.d(e,{URI:()=>g,Utils:()=>O}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var o=navigator.userAgent;n=o.indexOf("Windows")>=0}var i,a,h=(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=/^\w[\w\d+.-]*$/,f=/^\//,u=/^\/\//,c="",l="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function t(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||c,this.authority=t.authority||c,this.path=t.path||c,this.query=t.query||c,this.fragment=t.fragment||c):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||c,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==l&&(e=l+e):e=l}return e}(this.scheme,r||c),this.query=n||c,this.fragment=o||c,function(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+t.authority+'", path: "'+t.path+'", query: "'+t.query+'", fragment: "'+t.fragment+'"}');if(t.scheme&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!f.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(u.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,i))}return t.isUri=function(e){return e instanceof t||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"function"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString},Object.defineProperty(t.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),t.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=c),void 0===r?r=this.authority:null===r&&(r=c),void 0===n?n=this.path:null===n&&(n=c),void 0===o?o=this.query:null===o&&(o=c),void 0===i?i=this.fragment:null===i&&(i=c),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},t.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||c,x(r[4]||c),x(r[5]||c),x(r[7]||c),x(r[9]||c),e):new v(c,c,c,c,c)},t.file=function(t){var e=c;if(n&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){var r=t.indexOf(l,2);-1===r?(e=t.substring(2),t=l):(e=t.substring(2,r),t=t.substring(r)||l)}return new v("file",e,t,c,c)},t.from=function(t){return new v(t.scheme,t.authority,t.path,t.query,t.fragment)},t.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var r=new v(e);return r._formatted=e.external,r._fsPath=e._sep===d?e.fsPath:null,r}return e},t}(),d=n?1:void 0,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return h(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=d),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(g),m=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function y(t,e){for(var r=void 0,n=-1,o=0;o<t.length;o++){var i=t.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||e&&47===i)-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),void 0!==r&&(r+=t.charAt(o));else{void 0===r&&(r=t.substr(0,o));var a=m[i];void 0!==a?(-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),r+=a):-1===n&&(n=o)}}return-1!==n&&(r+=encodeURIComponent(t.substring(n))),void 0!==r?r:t}function b(t){for(var e=void 0,r=0;r<t.length;r++){var n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=m[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function C(t,e){var r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?"//"+t.authority+t.path:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n&&(r=r.replace(/\//g,"\\")),r}function A(t,e){var r=e?b:y,n="",o=t.scheme,i=t.authority,a=t.path,h=t.query,s=t.fragment;if(o&&(n+=o,n+=":"),(i||"file"===o)&&(n+=l,n+=l),i){var f=i.indexOf("@");if(-1!==f){var u=i.substr(0,f);i=i.substr(f+1),-1===(f=u.indexOf(":"))?n+=r(u,!1):(n+=r(u.substr(0,f),!1),n+=":",n+=r(u.substr(f+1),!1)),n+="@"}-1===(f=(i=i.toLowerCase()).indexOf(":"))?n+=r(i,!1):(n+=r(i.substr(0,f),!1),n+=i.substr(f))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(c=a.charCodeAt(1))>=65&&c<=90&&(a="/"+String.fromCharCode(c+32)+":"+a.substr(3));else if(a.length>=2&&58===a.charCodeAt(1)){var c;(c=a.charCodeAt(0))>=65&&c<=90&&(a=String.fromCharCode(c+32)+":"+a.substr(2))}n+=r(a,!0)}return h&&(n+="?",n+=r(h,!1)),s&&(n+="#",n+=e?s:y(s,!1)),n}function w(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}var _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(t){return t.match(_)?t.replace(_,(function(t){return w(t)})):t}var O,P=r(470),j=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,h=i.length;a<h;a++,o++)n[o]=i[a];return n},U=P.posix||P;!function(t){t.joinPath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t.with({path:U.join.apply(U,j([t.path],e))})},t.resolvePath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.path||"/";return t.with({path:U.resolve.apply(U,j([n],e))})},t.dirname=function(t){var e=U.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)?t:t.with({path:e})},t.basename=function(t){return U.basename(t.path)},t.extname=function(t){return U.extname(t.path)}}(O||(O={}))}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(447)})();const{URI,Utils}=LIB;
19567 //# sourceMappingURL=index.js.map
19571 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19573 __webpack_require__.r(__webpack_exports__);
19574 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19575 /* harmony export */ "CSSHover": () => /* binding */ CSSHover
19576 /* harmony export */ });
19577 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
19578 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80);
19579 /* harmony import */ var _selectorPrinting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95);
19580 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75);
19581 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88);
19582 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84);
19583 /*---------------------------------------------------------------------------------------------
19584 * Copyright (c) Microsoft Corporation. All rights reserved.
19585 * Licensed under the MIT License. See License.txt in the project root for license information.
19586 *--------------------------------------------------------------------------------------------*/
19594 var CSSHover = /** @class */ (function () {
19595 function CSSHover(clientCapabilities, cssDataManager) {
19596 this.clientCapabilities = clientCapabilities;
19597 this.cssDataManager = cssDataManager;
19598 this.selectorPrinting = new _selectorPrinting__WEBPACK_IMPORTED_MODULE_2__.SelectorPrinting(cssDataManager);
19600 CSSHover.prototype.doHover = function (document, position, stylesheet, settings) {
19601 function getRange(node) {
19602 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.Range.create(document.positionAt(node.offset), document.positionAt(node.end));
19604 var offset = document.offsetAt(position);
19605 var nodepath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.getNodePath(stylesheet, offset);
19607 * nodepath is top-down
19608 * Build up the hover by appending inner node's information
19611 for (var i = 0; i < nodepath.length; i++) {
19612 var node = nodepath[i];
19613 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Selector) {
19615 contents: this.selectorPrinting.selectorToMarkedString(node),
19616 range: getRange(node)
19620 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector) {
19622 * Some sass specific at rules such as `@at-root` are parsed as `SimpleSelector`
19624 if (!(0,_utils_strings__WEBPACK_IMPORTED_MODULE_3__.startsWith)(node.getText(), '@')) {
19626 contents: this.selectorPrinting.simpleSelectorToMarkedString(node),
19627 range: getRange(node)
19632 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration) {
19633 var propertyName = node.getFullPropertyName();
19634 var entry = this.cssDataManager.getProperty(propertyName);
19636 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
19639 contents: contents,
19640 range: getRange(node)
19649 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.UnknownAtRule) {
19650 var atRuleName = node.getText();
19651 var entry = this.cssDataManager.getAtDirective(atRuleName);
19653 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
19656 contents: contents,
19657 range: getRange(node)
19666 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Node && node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.PseudoSelector) {
19667 var selectorName = node.getText();
19668 var entry = selectorName.slice(0, 2) === '::'
19669 ? this.cssDataManager.getPseudoElement(selectorName)
19670 : this.cssDataManager.getPseudoClass(selectorName);
19672 var contents = _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
19675 contents: contents,
19676 range: getRange(node)
19687 hover.contents = this.convertContents(hover.contents);
19691 CSSHover.prototype.convertContents = function (contents) {
19692 if (!this.doesSupportMarkdown()) {
19693 if (typeof contents === 'string') {
19697 else if ('kind' in contents) {
19700 value: contents.value
19704 else if (Array.isArray(contents)) {
19705 return contents.map(function (c) {
19706 return typeof c === 'string' ? c : c.value;
19711 return contents.value;
19716 CSSHover.prototype.doesSupportMarkdown = function () {
19717 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_5__.isDefined)(this.supportsMarkdown)) {
19718 if (!(0,_utils_objects__WEBPACK_IMPORTED_MODULE_5__.isDefined)(this.clientCapabilities)) {
19719 this.supportsMarkdown = true;
19720 return this.supportsMarkdown;
19722 var hover = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
19723 this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_4__.MarkupKind.Markdown) !== -1;
19725 return this.supportsMarkdown;
19734 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19736 __webpack_require__.r(__webpack_exports__);
19737 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19738 /* harmony export */ "Element": () => /* binding */ Element,
19739 /* harmony export */ "RootElement": () => /* binding */ RootElement,
19740 /* harmony export */ "LabelElement": () => /* binding */ LabelElement,
19741 /* harmony export */ "toElement": () => /* binding */ toElement,
19742 /* harmony export */ "SelectorPrinting": () => /* binding */ SelectorPrinting,
19743 /* harmony export */ "selectorToElement": () => /* binding */ selectorToElement
19744 /* harmony export */ });
19745 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
19746 /* harmony import */ var _parser_cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73);
19747 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77);
19748 /*---------------------------------------------------------------------------------------------
19749 * Copyright (c) Microsoft Corporation. All rights reserved.
19750 * Licensed under the MIT License. See License.txt in the project root for license information.
19751 *--------------------------------------------------------------------------------------------*/
19753 var __extends = (undefined && undefined.__extends) || (function () {
19754 var extendStatics = function (d, b) {
19755 extendStatics = Object.setPrototypeOf ||
19756 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19757 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19758 return extendStatics(d, b);
19760 return function (d, b) {
19761 extendStatics(d, b);
19762 function __() { this.constructor = d; }
19763 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19769 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_2__.loadMessageBundle();
19770 var Element = /** @class */ (function () {
19771 function Element() {
19772 this.parent = null;
19773 this.children = null;
19774 this.attributes = null;
19776 Element.prototype.findAttribute = function (name) {
19777 if (this.attributes) {
19778 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
19779 var attribute = _a[_i];
19780 if (attribute.name === name) {
19781 return attribute.value;
19787 Element.prototype.addChild = function (child) {
19788 if (child instanceof Element) {
19789 child.parent = this;
19791 if (!this.children) {
19792 this.children = [];
19794 this.children.push(child);
19796 Element.prototype.append = function (text) {
19797 if (this.attributes) {
19798 var last = this.attributes[this.attributes.length - 1];
19799 last.value = last.value + text;
19802 Element.prototype.prepend = function (text) {
19803 if (this.attributes) {
19804 var first = this.attributes[0];
19805 first.value = text + first.value;
19808 Element.prototype.findRoot = function () {
19810 while (curr.parent && !(curr.parent instanceof RootElement)) {
19811 curr = curr.parent;
19815 Element.prototype.removeChild = function (child) {
19816 if (this.children) {
19817 var index = this.children.indexOf(child);
19818 if (index !== -1) {
19819 this.children.splice(index, 1);
19825 Element.prototype.addAttr = function (name, value) {
19826 if (!this.attributes) {
19827 this.attributes = [];
19829 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
19830 var attribute = _a[_i];
19831 if (attribute.name === name) {
19832 attribute.value += ' ' + value;
19836 this.attributes.push({ name: name, value: value });
19838 Element.prototype.clone = function (cloneChildren) {
19839 if (cloneChildren === void 0) { cloneChildren = true; }
19840 var elem = new Element();
19841 if (this.attributes) {
19842 elem.attributes = [];
19843 for (var _i = 0, _a = this.attributes; _i < _a.length; _i++) {
19844 var attribute = _a[_i];
19845 elem.addAttr(attribute.name, attribute.value);
19848 if (cloneChildren && this.children) {
19849 elem.children = [];
19850 for (var index = 0; index < this.children.length; index++) {
19851 elem.addChild(this.children[index].clone());
19856 Element.prototype.cloneWithParent = function () {
19857 var clone = this.clone(false);
19858 if (this.parent && !(this.parent instanceof RootElement)) {
19859 var parentClone = this.parent.cloneWithParent();
19860 parentClone.addChild(clone);
19867 var RootElement = /** @class */ (function (_super) {
19868 __extends(RootElement, _super);
19869 function RootElement() {
19870 return _super !== null && _super.apply(this, arguments) || this;
19872 return RootElement;
19875 var LabelElement = /** @class */ (function (_super) {
19876 __extends(LabelElement, _super);
19877 function LabelElement(label) {
19878 var _this = _super.call(this) || this;
19879 _this.addAttr('name', label);
19882 return LabelElement;
19885 var MarkedStringPrinter = /** @class */ (function () {
19886 function MarkedStringPrinter(quote) {
19887 this.quote = quote;
19891 MarkedStringPrinter.prototype.print = function (element) {
19893 if (element instanceof RootElement) {
19894 if (element.children) {
19895 this.doPrint(element.children, 0);
19899 this.doPrint([element], 0);
19901 var value = this.result.join('\n');
19902 return [{ language: 'html', value: value }];
19904 MarkedStringPrinter.prototype.doPrint = function (elements, indent) {
19905 for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
19906 var element = elements_1[_i];
19907 this.doPrintElement(element, indent);
19908 if (element.children) {
19909 this.doPrint(element.children, indent + 1);
19913 MarkedStringPrinter.prototype.writeLine = function (level, content) {
19914 var indent = new Array(level + 1).join(' ');
19915 this.result.push(indent + content);
19917 MarkedStringPrinter.prototype.doPrintElement = function (element, indent) {
19918 var name = element.findAttribute('name');
19919 // special case: a simple label
19920 if (element instanceof LabelElement || name === '\u2026') {
19921 this.writeLine(indent, name);
19925 var content = ['<'];
19928 content.push(name);
19931 content.push('element');
19934 if (element.attributes) {
19935 for (var _i = 0, _a = element.attributes; _i < _a.length; _i++) {
19937 if (attr.name !== 'name') {
19939 content.push(attr.name);
19940 var value = attr.value;
19943 content.push(quotes.ensure(value, this.quote));
19949 this.writeLine(indent, content.join(''));
19951 return MarkedStringPrinter;
19954 (function (quotes) {
19955 function ensure(value, which) {
19956 return which + remove(value) + which;
19958 quotes.ensure = ensure;
19959 function remove(value) {
19960 var match = value.match(/^['"](.*)["']$/);
19966 quotes.remove = remove;
19967 })(quotes || (quotes = {}));
19968 var Specificity = /** @class */ (function () {
19969 function Specificity() {
19970 /** Count of identifiers (e.g., `#app`) */
19972 /** Count of attributes (`[type="number"]`), classes (`.container-fluid`), and pseudo-classes (`:hover`) */
19974 /** Count of tag names (`div`), and pseudo-elements (`::before`) */
19977 return Specificity;
19979 function toElement(node, parentElement) {
19980 var result = new Element();
19981 for (var _i = 0, _a = node.getChildren(); _i < _a.length; _i++) {
19982 var child = _a[_i];
19983 switch (child.type) {
19984 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinator:
19985 if (parentElement) {
19986 var segments = child.getText().split('&');
19987 if (segments.length === 1) {
19988 // should not happen
19989 result.addAttr('name', segments[0]);
19992 result = parentElement.cloneWithParent();
19994 var root = result.findRoot();
19995 root.prepend(segments[0]);
19997 for (var i = 1; i < segments.length; i++) {
19999 var clone = parentElement.cloneWithParent();
20000 result.addChild(clone.findRoot());
20003 result.append(segments[i]);
20007 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorPlaceholder:
20008 if (child.matches('@at-root')) {
20012 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ElementNameSelector:
20013 var text = child.getText();
20014 result.addAttr('name', text === '*' ? 'element' : unescape(text));
20016 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ClassSelector:
20017 result.addAttr('class', unescape(child.getText().substring(1)));
20019 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.IdentifierSelector:
20020 result.addAttr('id', unescape(child.getText().substring(1)));
20022 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.MixinDeclaration:
20023 result.addAttr('class', child.getName());
20025 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.PseudoSelector:
20026 result.addAttr(unescape(child.getText()), '');
20028 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.AttributeSelector:
20029 var selector = child;
20030 var identifier = selector.getIdentifier();
20032 var expression = selector.getValue();
20033 var operator = selector.getOperator();
20034 var value = void 0;
20035 if (expression && operator) {
20036 switch (unescape(operator.getText())) {
20038 // excatly or followed by -words
20039 value = quotes.remove(unescape(expression.getText())) + "-\u2026";
20043 value = quotes.remove(unescape(expression.getText())) + "\u2026";
20047 value = "\u2026" + quotes.remove(unescape(expression.getText()));
20050 // one of a list of words
20051 value = " \u2026 " + quotes.remove(unescape(expression.getText())) + " \u2026 ";
20055 value = "\u2026" + quotes.remove(unescape(expression.getText())) + "\u2026";
20058 value = quotes.remove(unescape(expression.getText()));
20062 result.addAttr(unescape(identifier.getText()), value);
20069 function unescape(content) {
20070 var scanner = new _parser_cssScanner__WEBPACK_IMPORTED_MODULE_1__.Scanner();
20071 scanner.setSource(content);
20072 var token = scanner.scanUnquotedString();
20078 var SelectorPrinting = /** @class */ (function () {
20079 function SelectorPrinting(cssDataManager) {
20080 this.cssDataManager = cssDataManager;
20082 SelectorPrinting.prototype.selectorToMarkedString = function (node) {
20083 var root = selectorToElement(node);
20085 var markedStrings = new MarkedStringPrinter('"').print(root);
20086 markedStrings.push(this.selectorToSpecificityMarkedString(node));
20087 return markedStrings;
20093 SelectorPrinting.prototype.simpleSelectorToMarkedString = function (node) {
20094 var element = toElement(node);
20095 var markedStrings = new MarkedStringPrinter('"').print(element);
20096 markedStrings.push(this.selectorToSpecificityMarkedString(node));
20097 return markedStrings;
20099 SelectorPrinting.prototype.isPseudoElementIdentifier = function (text) {
20100 var match = text.match(/^::?([\w-]+)/);
20104 return !!this.cssDataManager.getPseudoElement("::" + match[1]);
20106 SelectorPrinting.prototype.selectorToSpecificityMarkedString = function (node) {
20108 //https://www.w3.org/TR/selectors-3/#specificity
20109 var calculateScore = function (node) {
20110 for (var _i = 0, _a = node.getChildren(); _i < _a.length; _i++) {
20111 var element = _a[_i];
20112 switch (element.type) {
20113 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.IdentifierSelector:
20116 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ClassSelector:
20117 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.AttributeSelector:
20118 specificity.attr++;
20120 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.ElementNameSelector:
20121 //ignore universal selector
20122 if (element.matches("*")) {
20127 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.PseudoSelector:
20128 var text = element.getText();
20129 if (_this.isPseudoElementIdentifier(text)) {
20130 specificity.tag++; // pseudo element
20133 //ignore psuedo class NOT
20134 if (text.match(/^:not/i)) {
20137 specificity.attr++; //pseudo class
20141 if (element.getChildren().length > 0) {
20142 calculateScore(element);
20146 var specificity = new Specificity();
20147 calculateScore(node);
20148 return localize('specificity', "[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", specificity.id, specificity.attr, specificity.tag);
20150 return SelectorPrinting;
20153 var SelectorElementBuilder = /** @class */ (function () {
20154 function SelectorElementBuilder(element) {
20156 this.element = element;
20158 SelectorElementBuilder.prototype.processSelector = function (selector) {
20159 var parentElement = null;
20160 if (!(this.element instanceof RootElement)) {
20161 if (selector.getChildren().some(function (c) { return c.hasChildren() && c.getChild(0).type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinator; })) {
20162 var curr = this.element.findRoot();
20163 if (curr.parent instanceof RootElement) {
20164 parentElement = this.element;
20165 this.element = curr.parent;
20166 this.element.removeChild(curr);
20171 for (var _i = 0, _a = selector.getChildren(); _i < _a.length; _i++) {
20172 var selectorChild = _a[_i];
20173 if (selectorChild instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector) {
20174 if (this.prev instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector) {
20175 var labelElement = new LabelElement('\u2026');
20176 this.element.addChild(labelElement);
20177 this.element = labelElement;
20179 else if (this.prev && (this.prev.matches('+') || this.prev.matches('~')) && this.element.parent) {
20180 this.element = this.element.parent;
20182 if (this.prev && this.prev.matches('~')) {
20183 this.element.addChild(new LabelElement('\u22EE'));
20185 var thisElement = toElement(selectorChild, parentElement);
20186 var root = thisElement.findRoot();
20187 this.element.addChild(root);
20188 this.element = thisElement;
20190 if (selectorChild instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.SimpleSelector ||
20191 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinatorParent ||
20192 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinatorShadowPiercingDescendant ||
20193 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinatorSibling ||
20194 selectorChild.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.SelectorCombinatorAllSiblings) {
20195 this.prev = selectorChild;
20199 return SelectorElementBuilder;
20201 function isNewSelectorContext(node) {
20202 switch (node.type) {
20203 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.MixinDeclaration:
20204 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.NodeType.Stylesheet:
20209 function selectorToElement(node) {
20210 if (node.matches('@at-root')) {
20213 var root = new RootElement();
20214 var parentRuleSets = [];
20215 var ruleSet = node.getParent();
20216 if (ruleSet instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
20217 var parent = ruleSet.getParent(); // parent of the selector's ruleset
20218 while (parent && !isNewSelectorContext(parent)) {
20219 if (parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.RuleSet) {
20220 if (parent.getSelectors().matches('@at-root')) {
20223 parentRuleSets.push(parent);
20225 parent = parent.getParent();
20228 var builder = new SelectorElementBuilder(root);
20229 for (var i = parentRuleSets.length - 1; i >= 0; i--) {
20230 var selector = parentRuleSets[i].getSelectors().getChild(0);
20232 builder.processSelector(selector);
20235 builder.processSelector(node);
20242 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20244 __webpack_require__.r(__webpack_exports__);
20245 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20246 /* harmony export */ "CSSNavigation": () => /* binding */ CSSNavigation
20247 /* harmony export */ });
20248 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(88);
20249 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77);
20250 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74);
20251 /* harmony import */ var _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86);
20252 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80);
20253 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75);
20254 /* harmony import */ var _utils_resources__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92);
20255 /*---------------------------------------------------------------------------------------------
20256 * Copyright (c) Microsoft Corporation. All rights reserved.
20257 * Licensed under the MIT License. See License.txt in the project root for license information.
20258 *--------------------------------------------------------------------------------------------*/
20260 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
20261 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20262 return new (P || (P = Promise))(function (resolve, reject) {
20263 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20264 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20265 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20266 step((generator = generator.apply(thisArg, _arguments || [])).next());
20269 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
20270 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
20271 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
20272 function verb(n) { return function (v) { return step([n, v]); }; }
20273 function step(op) {
20274 if (f) throw new TypeError("Generator is already executing.");
20276 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
20277 if (y = 0, t) op = [op[0] & 2, t.value];
20279 case 0: case 1: t = op; break;
20280 case 4: _.label++; return { value: op[1], done: false };
20281 case 5: _.label++; y = op[1]; op = [0]; continue;
20282 case 7: op = _.ops.pop(); _.trys.pop(); continue;
20284 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
20285 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
20286 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20287 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
20288 if (t[2]) _.ops.pop();
20289 _.trys.pop(); continue;
20291 op = body.call(thisArg, _);
20292 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
20293 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
20303 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__.loadMessageBundle();
20304 var CSSNavigation = /** @class */ (function () {
20305 function CSSNavigation(fileSystemProvider) {
20306 this.fileSystemProvider = fileSystemProvider;
20308 CSSNavigation.prototype.findDefinition = function (document, position, stylesheet) {
20309 var symbols = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__.Symbols(stylesheet);
20310 var offset = document.offsetAt(position);
20311 var node = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.getNodeAtOffset(stylesheet, offset);
20315 var symbol = symbols.findSymbolFromNode(node);
20321 range: getRange(symbol.node, document)
20324 CSSNavigation.prototype.findReferences = function (document, position, stylesheet) {
20325 var highlights = this.findDocumentHighlights(document, position, stylesheet);
20326 return highlights.map(function (h) {
20333 CSSNavigation.prototype.findDocumentHighlights = function (document, position, stylesheet) {
20335 var offset = document.offsetAt(position);
20336 var node = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.getNodeAtOffset(stylesheet, offset);
20337 if (!node || node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Stylesheet || node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Declarations) {
20340 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Identifier && node.parent && node.parent.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.ClassSelector) {
20341 node = node.parent;
20343 var symbols = new _parser_cssSymbolScope__WEBPACK_IMPORTED_MODULE_3__.Symbols(stylesheet);
20344 var symbol = symbols.findSymbolFromNode(node);
20345 var name = node.getText();
20346 stylesheet.accept(function (candidate) {
20348 if (symbols.matchesSymbol(candidate, symbol)) {
20350 kind: getHighlightKind(candidate),
20351 range: getRange(candidate, document)
20356 else if (node && node.type === candidate.type && candidate.matches(name)) {
20357 // Same node type and data
20359 kind: getHighlightKind(candidate),
20360 range: getRange(candidate, document)
20367 CSSNavigation.prototype.isRawStringDocumentLinkNode = function (node) {
20368 return node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Import;
20370 CSSNavigation.prototype.findDocumentLinks = function (document, stylesheet, documentContext) {
20371 var links = this.findUnresolvedLinks(document, stylesheet);
20372 for (var i = 0; i < links.length; i++) {
20373 var target = links[i].target;
20374 if (target && !(/^\w+:\/\//g.test(target))) {
20375 var resolved = documentContext.resolveReference(target, document.uri);
20377 links[i].target = resolved;
20383 CSSNavigation.prototype.findDocumentLinks2 = function (document, stylesheet, documentContext) {
20384 return __awaiter(this, void 0, void 0, function () {
20385 var links, resolvedLinks, _i, links_1, link, target, resolvedTarget;
20386 return __generator(this, function (_a) {
20387 switch (_a.label) {
20389 links = this.findUnresolvedLinks(document, stylesheet);
20390 resolvedLinks = [];
20391 _i = 0, links_1 = links;
20394 if (!(_i < links_1.length)) return [3 /*break*/, 5];
20395 link = links_1[_i];
20396 target = link.target;
20397 if (!(target && !(/^\w+:\/\//g.test(target)))) return [3 /*break*/, 3];
20398 return [4 /*yield*/, this.resolveRelativeReference(target, document.uri, documentContext)];
20400 resolvedTarget = _a.sent();
20401 if (resolvedTarget !== undefined) {
20402 link.target = resolvedTarget;
20403 resolvedLinks.push(link);
20405 return [3 /*break*/, 4];
20407 resolvedLinks.push(link);
20411 return [3 /*break*/, 1];
20412 case 5: return [2 /*return*/, resolvedLinks];
20417 CSSNavigation.prototype.findUnresolvedLinks = function (document, stylesheet) {
20420 var collect = function (uriStringNode) {
20421 var rawUri = uriStringNode.getText();
20422 var range = getRange(uriStringNode, document);
20423 // Make sure the range is not empty
20424 if (range.start.line === range.end.line && range.start.character === range.end.character) {
20427 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.startsWith)(rawUri, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.startsWith)(rawUri, "\"")) {
20428 rawUri = rawUri.slice(1, -1);
20430 result.push({ target: rawUri, range: range });
20432 stylesheet.accept(function (candidate) {
20433 if (candidate.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.URILiteral) {
20434 var first = candidate.getChild(0);
20441 * In @import, it is possible to include links that do not use `url()`
20442 * For example, `@import 'foo.css';`
20444 if (candidate.parent && _this.isRawStringDocumentLinkNode(candidate.parent)) {
20445 var rawText = candidate.getText();
20446 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.startsWith)(rawText, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.startsWith)(rawText, "\"")) {
20447 collect(candidate);
20455 CSSNavigation.prototype.findDocumentSymbols = function (document, stylesheet) {
20457 stylesheet.accept(function (node) {
20460 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Class,
20463 var locationNode = node;
20464 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Selector) {
20465 entry.name = node.getText();
20466 locationNode = node.findAParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Ruleset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.ExtendsReference);
20467 if (locationNode) {
20468 entry.location = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Location.create(document.uri, getRange(locationNode, document));
20469 result.push(entry);
20473 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.VariableDeclaration) {
20474 entry.name = node.getName();
20475 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Variable;
20477 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.MixinDeclaration) {
20478 entry.name = node.getName();
20479 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Method;
20481 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.FunctionDeclaration) {
20482 entry.name = node.getName();
20483 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Function;
20485 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Keyframe) {
20486 entry.name = localize('literal.keyframes', "@keyframes {0}", node.getName());
20488 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.FontFace) {
20489 entry.name = localize('literal.fontface', "@font-face");
20491 else if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Media) {
20492 var mediaList = node.getChild(0);
20493 if (mediaList instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Medialist) {
20494 entry.name = '@media ' + mediaList.getText();
20495 entry.kind = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Module;
20499 entry.location = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Location.create(document.uri, getRange(locationNode, document));
20500 result.push(entry);
20506 CSSNavigation.prototype.findDocumentColors = function (document, stylesheet) {
20508 stylesheet.accept(function (node) {
20509 var colorInfo = getColorInformation(node, document);
20511 result.push(colorInfo);
20517 CSSNavigation.prototype.getColorPresentations = function (document, stylesheet, color, range) {
20519 var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
20521 if (color.alpha === 1) {
20522 label = "rgb(" + red256 + ", " + green256 + ", " + blue256 + ")";
20525 label = "rgba(" + red256 + ", " + green256 + ", " + blue256 + ", " + color.alpha + ")";
20527 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(range, label) });
20528 if (color.alpha === 1) {
20529 label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256);
20532 label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256) + toTwoDigitHex(Math.round(color.alpha * 255));
20534 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(range, label) });
20535 var hsl = (0,_languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__.hslFromColor)(color);
20537 label = "hsl(" + hsl.h + ", " + Math.round(hsl.s * 100) + "%, " + Math.round(hsl.l * 100) + "%)";
20540 label = "hsla(" + hsl.h + ", " + Math.round(hsl.s * 100) + "%, " + Math.round(hsl.l * 100) + "%, " + hsl.a + ")";
20542 result.push({ label: label, textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(range, label) });
20545 CSSNavigation.prototype.doRename = function (document, position, newName, stylesheet) {
20547 var highlights = this.findDocumentHighlights(document, position, stylesheet);
20548 var edits = highlights.map(function (h) { return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(h.range, newName); });
20550 changes: (_a = {}, _a[document.uri] = edits, _a)
20553 CSSNavigation.prototype.resolveRelativeReference = function (ref, documentUri, documentContext) {
20554 return __awaiter(this, void 0, void 0, function () {
20555 var moduleName, rootFolderUri, documentFolderUri, modulePath, pathWithinModule;
20556 return __generator(this, function (_a) {
20557 switch (_a.label) {
20559 if (!(ref[0] === '~' && ref[1] !== '/' && this.fileSystemProvider)) return [3 /*break*/, 3];
20560 ref = ref.substring(1);
20561 if (!(0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.startsWith)(documentUri, 'file://')) return [3 /*break*/, 2];
20562 moduleName = getModuleNameFromPath(ref);
20563 rootFolderUri = documentContext.resolveReference('/', documentUri);
20564 documentFolderUri = (0,_utils_resources__WEBPACK_IMPORTED_MODULE_6__.dirname)(documentUri);
20565 return [4 /*yield*/, this.resolvePathToModule(moduleName, documentFolderUri, rootFolderUri)];
20567 modulePath = _a.sent();
20569 pathWithinModule = ref.substring(moduleName.length + 1);
20570 return [2 /*return*/, (0,_utils_resources__WEBPACK_IMPORTED_MODULE_6__.joinPath)(modulePath, pathWithinModule)];
20573 case 2: return [2 /*return*/, documentContext.resolveReference(ref, documentUri)];
20574 case 3: return [2 /*return*/, documentContext.resolveReference(ref, documentUri)];
20579 CSSNavigation.prototype.resolvePathToModule = function (_moduleName, documentFolderUri, rootFolderUri) {
20580 return __awaiter(this, void 0, void 0, function () {
20582 return __generator(this, function (_a) {
20583 switch (_a.label) {
20585 packPath = (0,_utils_resources__WEBPACK_IMPORTED_MODULE_6__.joinPath)(documentFolderUri, 'node_modules', _moduleName, 'package.json');
20586 return [4 /*yield*/, this.fileExists(packPath)];
20589 return [2 /*return*/, (0,_utils_resources__WEBPACK_IMPORTED_MODULE_6__.dirname)(packPath)];
20591 else if (rootFolderUri && documentFolderUri.startsWith(rootFolderUri) && (documentFolderUri.length !== rootFolderUri.length)) {
20592 return [2 /*return*/, this.resolvePathToModule(_moduleName, (0,_utils_resources__WEBPACK_IMPORTED_MODULE_6__.dirname)(documentFolderUri), rootFolderUri)];
20594 return [2 /*return*/, undefined];
20599 CSSNavigation.prototype.fileExists = function (uri) {
20600 return __awaiter(this, void 0, void 0, function () {
20602 return __generator(this, function (_a) {
20603 switch (_a.label) {
20605 if (!this.fileSystemProvider) {
20606 return [2 /*return*/, false];
20610 _a.trys.push([1, 3, , 4]);
20611 return [4 /*yield*/, this.fileSystemProvider.stat(uri)];
20614 if (stat.type === _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FileType.Unknown && stat.size === -1) {
20615 return [2 /*return*/, false];
20617 return [2 /*return*/, true];
20620 return [2 /*return*/, false];
20621 case 4: return [2 /*return*/];
20626 return CSSNavigation;
20629 function getColorInformation(node, document) {
20630 var color = (0,_languageFacts_facts__WEBPACK_IMPORTED_MODULE_4__.getColorValue)(node);
20632 var range = getRange(node, document);
20633 return { color: color, range: range };
20637 function getRange(node, document) {
20638 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(document.positionAt(node.offset), document.positionAt(node.end));
20640 function getHighlightKind(node) {
20641 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Selector) {
20642 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind.Write;
20644 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Identifier) {
20645 if (node.parent && node.parent instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Property) {
20646 if (node.isCustomProperty) {
20647 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind.Write;
20652 switch (node.parent.type) {
20653 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.FunctionDeclaration:
20654 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.MixinDeclaration:
20655 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Keyframe:
20656 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.VariableDeclaration:
20657 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.FunctionParameter:
20658 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind.Write;
20661 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind.Read;
20663 function toTwoDigitHex(n) {
20664 var r = n.toString(16);
20665 return r.length !== 2 ? '0' + r : r;
20667 function getModuleNameFromPath(path) {
20668 // If a scoped module (starts with @) then get up until second instance of '/', otherwise get until first instance of '/'
20669 if (path[0] === '@') {
20670 return path.substring(0, path.indexOf('/', path.indexOf('/') + 1));
20672 return path.substring(0, path.indexOf('/'));
20678 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20680 __webpack_require__.r(__webpack_exports__);
20681 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20682 /* harmony export */ "CSSCodeActions": () => /* binding */ CSSCodeActions
20683 /* harmony export */ });
20684 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
20685 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75);
20686 /* harmony import */ var _services_lintRules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(98);
20687 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(88);
20688 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77);
20689 /*---------------------------------------------------------------------------------------------
20690 * Copyright (c) Microsoft Corporation. All rights reserved.
20691 * Licensed under the MIT License. See License.txt in the project root for license information.
20692 *--------------------------------------------------------------------------------------------*/
20699 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_4__.loadMessageBundle();
20700 var CSSCodeActions = /** @class */ (function () {
20701 function CSSCodeActions(cssDataManager) {
20702 this.cssDataManager = cssDataManager;
20704 CSSCodeActions.prototype.doCodeActions = function (document, range, context, stylesheet) {
20705 return this.doCodeActions2(document, range, context, stylesheet).map(function (ca) {
20706 var textDocumentEdit = ca.edit && ca.edit.documentChanges && ca.edit.documentChanges[0];
20707 return _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Command.create(ca.title, '_css.applyCodeAction', document.uri, document.version, textDocumentEdit && textDocumentEdit.edits);
20710 CSSCodeActions.prototype.doCodeActions2 = function (document, range, context, stylesheet) {
20712 if (context.diagnostics) {
20713 for (var _i = 0, _a = context.diagnostics; _i < _a.length; _i++) {
20714 var diagnostic = _a[_i];
20715 this.appendFixesForMarker(document, stylesheet, diagnostic, result);
20720 CSSCodeActions.prototype.getFixesForUnknownProperty = function (document, property, marker, result) {
20721 var propertyName = property.getName();
20722 var candidates = [];
20723 this.cssDataManager.getProperties().forEach(function (p) {
20724 var score = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.difference)(propertyName, p.name);
20725 if (score >= propertyName.length / 2 /*score_lim*/) {
20726 candidates.push({ property: p.name, score: score });
20729 // Sort in descending order.
20730 candidates.sort(function (a, b) {
20731 return b.score - a.score || a.property.localeCompare(b.property);
20733 var maxActions = 3;
20734 for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
20735 var candidate = candidates_1[_i];
20736 var propertyName_1 = candidate.property;
20737 var title = localize('css.codeaction.rename', "Rename to '{0}'", propertyName_1);
20738 var edit = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextEdit.replace(marker.range, propertyName_1);
20739 var documentIdentifier = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.VersionedTextDocumentIdentifier.create(document.uri, document.version);
20740 var workspaceEdit = { documentChanges: [_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TextDocumentEdit.create(documentIdentifier, [edit])] };
20741 var codeAction = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CodeAction.create(title, workspaceEdit, _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.CodeActionKind.QuickFix);
20742 codeAction.diagnostics = [marker];
20743 result.push(codeAction);
20744 if (--maxActions <= 0) {
20749 CSSCodeActions.prototype.appendFixesForMarker = function (document, stylesheet, marker, result) {
20750 if (marker.code !== _services_lintRules__WEBPACK_IMPORTED_MODULE_2__.Rules.UnknownProperty.id) {
20753 var offset = document.offsetAt(marker.range.start);
20754 var end = document.offsetAt(marker.range.end);
20755 var nodepath = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.getNodePath(stylesheet, offset);
20756 for (var i = nodepath.length - 1; i >= 0; i--) {
20757 var node = nodepath[i];
20758 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Declaration) {
20759 var property = node.getProperty();
20760 if (property && property.offset === offset && property.end === end) {
20761 this.getFixesForUnknownProperty(document, property, marker, result);
20767 return CSSCodeActions;
20774 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20776 __webpack_require__.r(__webpack_exports__);
20777 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20778 /* harmony export */ "Rule": () => /* binding */ Rule,
20779 /* harmony export */ "Setting": () => /* binding */ Setting,
20780 /* harmony export */ "Rules": () => /* binding */ Rules,
20781 /* harmony export */ "Settings": () => /* binding */ Settings,
20782 /* harmony export */ "LintConfigurationSettings": () => /* binding */ LintConfigurationSettings
20783 /* harmony export */ });
20784 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
20785 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77);
20786 /*---------------------------------------------------------------------------------------------
20787 * Copyright (c) Microsoft Corporation. All rights reserved.
20788 * Licensed under the MIT License. See License.txt in the project root for license information.
20789 *--------------------------------------------------------------------------------------------*/
20793 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_1__.loadMessageBundle();
20794 var Warning = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Warning;
20795 var Error = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Error;
20796 var Ignore = _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Ignore;
20797 var Rule = /** @class */ (function () {
20798 function Rule(id, message, defaultValue) {
20800 this.message = message;
20801 this.defaultValue = defaultValue;
20807 var Setting = /** @class */ (function () {
20808 function Setting(id, message, defaultValue) {
20810 this.message = message;
20811 this.defaultValue = defaultValue;
20818 AllVendorPrefixes: new Rule('compatibleVendorPrefixes', localize('rule.vendorprefixes.all', "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"), Ignore),
20819 IncludeStandardPropertyWhenUsingVendorPrefix: new Rule('vendorPrefix', localize('rule.standardvendorprefix.all', "When using a vendor-specific prefix also include the standard property"), Warning),
20820 DuplicateDeclarations: new Rule('duplicateProperties', localize('rule.duplicateDeclarations', "Do not use duplicate style definitions"), Ignore),
20821 EmptyRuleSet: new Rule('emptyRules', localize('rule.emptyRuleSets', "Do not use empty rulesets"), Warning),
20822 ImportStatemement: new Rule('importStatement', localize('rule.importDirective', "Import statements do not load in parallel"), Ignore),
20823 BewareOfBoxModelSize: new Rule('boxModel', localize('rule.bewareOfBoxModelSize', "Do not use width or height when using padding or border"), Ignore),
20824 UniversalSelector: new Rule('universalSelector', localize('rule.universalSelector', "The universal selector (*) is known to be slow"), Ignore),
20825 ZeroWithUnit: new Rule('zeroUnits', localize('rule.zeroWidthUnit', "No unit for zero needed"), Ignore),
20826 RequiredPropertiesForFontFace: new Rule('fontFaceProperties', localize('rule.fontFaceProperties', "@font-face rule must define 'src' and 'font-family' properties"), Warning),
20827 HexColorLength: new Rule('hexColorLength', localize('rule.hexColor', "Hex colors must consist of three, four, six or eight hex numbers"), Error),
20828 ArgsInColorFunction: new Rule('argumentsInColorFunction', localize('rule.colorFunction', "Invalid number of parameters"), Error),
20829 UnknownProperty: new Rule('unknownProperties', localize('rule.unknownProperty', "Unknown property."), Warning),
20830 UnknownAtRules: new Rule('unknownAtRules', localize('rule.unknownAtRules', "Unknown at-rule."), Warning),
20831 IEStarHack: new Rule('ieHack', localize('rule.ieHack', "IE hacks are only necessary when supporting IE7 and older"), Ignore),
20832 UnknownVendorSpecificProperty: new Rule('unknownVendorSpecificProperties', localize('rule.unknownVendorSpecificProperty', "Unknown vendor specific property."), Ignore),
20833 PropertyIgnoredDueToDisplay: new Rule('propertyIgnoredDueToDisplay', localize('rule.propertyIgnoredDueToDisplay', "Property is ignored due to the display."), Warning),
20834 AvoidImportant: new Rule('important', localize('rule.avoidImportant', "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."), Ignore),
20835 AvoidFloat: new Rule('float', localize('rule.avoidFloat', "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."), Ignore),
20836 AvoidIdSelector: new Rule('idSelector', localize('rule.avoidIdSelector', "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."), Ignore),
20839 ValidProperties: new Setting('validProperties', localize('rule.validProperties', "A list of properties that are not validated against the `unknownProperties` rule."), [])
20841 var LintConfigurationSettings = /** @class */ (function () {
20842 function LintConfigurationSettings(conf) {
20843 if (conf === void 0) { conf = {}; }
20846 LintConfigurationSettings.prototype.getRule = function (rule) {
20847 if (this.conf.hasOwnProperty(rule.id)) {
20848 var level = toLevel(this.conf[rule.id]);
20853 return rule.defaultValue;
20855 LintConfigurationSettings.prototype.getSetting = function (setting) {
20856 return this.conf[setting.id];
20858 return LintConfigurationSettings;
20861 function toLevel(level) {
20863 case 'ignore': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Ignore;
20864 case 'warning': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Warning;
20865 case 'error': return _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Error;
20873 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20875 __webpack_require__.r(__webpack_exports__);
20876 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20877 /* harmony export */ "CSSValidation": () => /* binding */ CSSValidation
20878 /* harmony export */ });
20879 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74);
20880 /* harmony import */ var _lintRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98);
20881 /* harmony import */ var _lint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(100);
20882 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(88);
20883 /*---------------------------------------------------------------------------------------------
20884 * Copyright (c) Microsoft Corporation. All rights reserved.
20885 * Licensed under the MIT License. See License.txt in the project root for license information.
20886 *--------------------------------------------------------------------------------------------*/
20892 var CSSValidation = /** @class */ (function () {
20893 function CSSValidation(cssDataManager) {
20894 this.cssDataManager = cssDataManager;
20896 CSSValidation.prototype.configure = function (settings) {
20897 this.settings = settings;
20899 CSSValidation.prototype.doValidation = function (document, stylesheet, settings) {
20900 if (settings === void 0) { settings = this.settings; }
20901 if (settings && settings.validate === false) {
20905 entries.push.apply(entries, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.ParseErrorCollector.entries(stylesheet));
20906 entries.push.apply(entries, _lint__WEBPACK_IMPORTED_MODULE_2__.LintVisitor.entries(stylesheet, document, new _lintRules__WEBPACK_IMPORTED_MODULE_1__.LintConfigurationSettings(settings && settings.lint), this.cssDataManager));
20908 for (var r in _lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules) {
20909 ruleIds.push(_lintRules__WEBPACK_IMPORTED_MODULE_1__.Rules[r].id);
20911 function toDiagnostic(marker) {
20912 var range = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Range.create(document.positionAt(marker.getOffset()), document.positionAt(marker.getOffset() + marker.getLength()));
20913 var source = document.languageId;
20915 code: marker.getRule().id,
20917 message: marker.getMessage(),
20918 severity: marker.getLevel() === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Warning ? _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning : _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Error,
20922 return entries.filter(function (entry) { return entry.getLevel() !== _parser_cssNodes__WEBPACK_IMPORTED_MODULE_0__.Level.Ignore; }).map(toDiagnostic);
20924 return CSSValidation;
20931 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20933 __webpack_require__.r(__webpack_exports__);
20934 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20935 /* harmony export */ "LintVisitor": () => /* binding */ LintVisitor
20936 /* harmony export */ });
20937 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
20938 /* harmony import */ var _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80);
20939 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74);
20940 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(87);
20941 /* harmony import */ var _lintRules__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98);
20942 /* harmony import */ var _lintUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(101);
20943 /*---------------------------------------------------------------------------------------------
20944 * Copyright (c) Microsoft Corporation. All rights reserved.
20945 * Licensed under the MIT License. See License.txt in the project root for license information.
20946 *--------------------------------------------------------------------------------------------*/
20954 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__.loadMessageBundle();
20955 var NodesByRootMap = /** @class */ (function () {
20956 function NodesByRootMap() {
20959 NodesByRootMap.prototype.add = function (root, name, node) {
20960 var entry = this.data[root];
20962 entry = { nodes: [], names: [] };
20963 this.data[root] = entry;
20965 entry.names.push(name);
20967 entry.nodes.push(node);
20970 return NodesByRootMap;
20972 var LintVisitor = /** @class */ (function () {
20973 function LintVisitor(document, settings, cssDataManager) {
20975 this.cssDataManager = cssDataManager;
20976 this.warnings = [];
20977 this.settings = settings;
20978 this.documentText = document.getText();
20979 this.keyframes = new NodesByRootMap();
20980 this.validProperties = {};
20981 var properties = settings.getSetting(_lintRules__WEBPACK_IMPORTED_MODULE_4__.Settings.ValidProperties);
20982 if (Array.isArray(properties)) {
20983 properties.forEach(function (p) {
20984 if (typeof p === 'string') {
20985 var name = p.trim().toLowerCase();
20987 _this.validProperties[name] = true;
20993 LintVisitor.entries = function (node, document, settings, cssDataManager, entryFilter) {
20994 var visitor = new LintVisitor(document, settings, cssDataManager);
20995 node.acceptVisitor(visitor);
20996 visitor.completeValidations();
20997 return visitor.getEntries(entryFilter);
20999 LintVisitor.prototype.isValidPropertyDeclaration = function (element) {
21000 var propertyName = element.fullPropertyName;
21001 return this.validProperties[propertyName];
21003 LintVisitor.prototype.fetch = function (input, s) {
21005 for (var _i = 0, input_1 = input; _i < input_1.length; _i++) {
21006 var curr = input_1[_i];
21007 if (curr.fullPropertyName === s) {
21008 elements.push(curr);
21013 LintVisitor.prototype.fetchWithValue = function (input, s, v) {
21015 for (var _i = 0, input_2 = input; _i < input_2.length; _i++) {
21016 var inputElement = input_2[_i];
21017 if (inputElement.fullPropertyName === s) {
21018 var expression = inputElement.node.getValue();
21019 if (expression && this.findValueInExpression(expression, v)) {
21020 elements.push(inputElement);
21026 LintVisitor.prototype.findValueInExpression = function (expression, v) {
21028 expression.accept(function (node) {
21029 if (node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Identifier && node.matches(v)) {
21036 LintVisitor.prototype.getEntries = function (filter) {
21037 if (filter === void 0) { filter = (_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Level.Warning | _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Level.Error); }
21038 return this.warnings.filter(function (entry) {
21039 return (entry.getLevel() & filter) !== 0;
21042 LintVisitor.prototype.addEntry = function (node, rule, details) {
21043 var entry = new _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Marker(node, rule, this.settings.getRule(rule), details);
21044 this.warnings.push(entry);
21046 LintVisitor.prototype.getMissingNames = function (expected, actual) {
21047 var expectedClone = expected.slice(0); // clone
21048 for (var i = 0; i < actual.length; i++) {
21049 var k = expectedClone.indexOf(actual[i]);
21051 expectedClone[k] = null;
21055 for (var i = 0; i < expectedClone.length; i++) {
21056 var curr = expectedClone[i];
21058 if (result === null) {
21059 result = localize('namelist.single', "'{0}'", curr);
21062 result = localize('namelist.concatenated', "{0}, '{1}'", result, curr);
21068 LintVisitor.prototype.visitNode = function (node) {
21069 switch (node.type) {
21070 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.UnknownAtRule:
21071 return this.visitUnknownAtRule(node);
21072 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Keyframe:
21073 return this.visitKeyframe(node);
21074 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.FontFace:
21075 return this.visitFontFace(node);
21076 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Ruleset:
21077 return this.visitRuleSet(node);
21078 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.SimpleSelector:
21079 return this.visitSimpleSelector(node);
21080 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Function:
21081 return this.visitFunction(node);
21082 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.NumericValue:
21083 return this.visitNumericValue(node);
21084 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Import:
21085 return this.visitImport(node);
21086 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.HexColorValue:
21087 return this.visitHexColorValue(node);
21088 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Prio:
21089 return this.visitPrio(node);
21090 case _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.IdentifierSelector:
21091 return this.visitIdentifierSelector(node);
21095 LintVisitor.prototype.completeValidations = function () {
21096 this.validateKeyframes();
21098 LintVisitor.prototype.visitUnknownAtRule = function (node) {
21099 var atRuleName = node.getChild(0);
21103 var atDirective = this.cssDataManager.getAtDirective(atRuleName.getText());
21107 this.addEntry(atRuleName, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.UnknownAtRules, "Unknown at rule " + atRuleName.getText());
21110 LintVisitor.prototype.visitKeyframe = function (node) {
21111 var keyword = node.getKeyword();
21115 var text = keyword.getText();
21116 this.keyframes.add(node.getName(), text, (text !== '@keyframes') ? keyword : null);
21119 LintVisitor.prototype.validateKeyframes = function () {
21120 // @keyframe and it's vendor specific alternatives
21121 // @keyframe should be included
21122 var expected = ['@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes'];
21123 for (var name in this.keyframes.data) {
21124 var actual = this.keyframes.data[name].names;
21125 var needsStandard = (actual.indexOf('@keyframes') === -1);
21126 if (!needsStandard && actual.length === 1) {
21127 continue; // only the non-vendor specific keyword is used, that's fine, no warning
21129 var missingVendorSpecific = this.getMissingNames(expected, actual);
21130 if (missingVendorSpecific || needsStandard) {
21131 for (var _i = 0, _a = this.keyframes.data[name].nodes; _i < _a.length; _i++) {
21133 if (needsStandard) {
21134 var message = localize('keyframes.standardrule.missing', "Always define standard rule '@keyframes' when defining keyframes.");
21135 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.IncludeStandardPropertyWhenUsingVendorPrefix, message);
21137 if (missingVendorSpecific) {
21138 var message = localize('keyframes.vendorspecific.missing', "Always include all vendor specific rules: Missing: {0}", missingVendorSpecific);
21139 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.AllVendorPrefixes, message);
21146 LintVisitor.prototype.visitSimpleSelector = function (node) {
21147 /////////////////////////////////////////////////////////////
21148 // Lint - The universal selector (*) is known to be slow.
21149 /////////////////////////////////////////////////////////////
21150 var firstChar = this.documentText.charAt(node.offset);
21151 if (node.length === 1 && firstChar === '*') {
21152 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.UniversalSelector);
21156 LintVisitor.prototype.visitIdentifierSelector = function (node) {
21157 /////////////////////////////////////////////////////////////
21158 // Lint - Avoid id selectors
21159 /////////////////////////////////////////////////////////////
21160 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.AvoidIdSelector);
21163 LintVisitor.prototype.visitImport = function (node) {
21164 /////////////////////////////////////////////////////////////
21165 // Lint - Import statements shouldn't be used, because they aren't offering parallel downloads.
21166 /////////////////////////////////////////////////////////////
21167 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.ImportStatemement);
21170 LintVisitor.prototype.visitRuleSet = function (node) {
21171 /////////////////////////////////////////////////////////////
21172 // Lint - Don't use empty rulesets.
21173 /////////////////////////////////////////////////////////////
21174 var declarations = node.getDeclarations();
21175 if (!declarations) {
21179 if (!declarations.hasChildren()) {
21180 this.addEntry(node.getSelectors(), _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.EmptyRuleSet);
21182 var propertyTable = [];
21183 for (var _i = 0, _a = declarations.getChildren(); _i < _a.length; _i++) {
21184 var element = _a[_i];
21185 if (element instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Declaration) {
21186 propertyTable.push(new _lintUtil__WEBPACK_IMPORTED_MODULE_5__.Element(element));
21189 /////////////////////////////////////////////////////////////
21190 // the rule warns when it finds:
21191 // width being used with border, border-left, border-right, padding, padding-left, or padding-right
21192 // height being used with border, border-top, border-bottom, padding, padding-top, or padding-bottom
21193 // No error when box-sizing property is specified, as it assumes the user knows what he's doing.
21194 // see https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size
21195 /////////////////////////////////////////////////////////////
21196 var boxModel = (0,_lintUtil__WEBPACK_IMPORTED_MODULE_5__.default)(propertyTable);
21197 if (boxModel.width) {
21198 var properties = [];
21199 if (boxModel.right.value) {
21200 properties = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_3__.union)(properties, boxModel.right.properties);
21202 if (boxModel.left.value) {
21203 properties = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_3__.union)(properties, boxModel.left.properties);
21205 if (properties.length !== 0) {
21206 for (var _b = 0, properties_1 = properties; _b < properties_1.length; _b++) {
21207 var item = properties_1[_b];
21208 this.addEntry(item.node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.BewareOfBoxModelSize);
21210 this.addEntry(boxModel.width.node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.BewareOfBoxModelSize);
21213 if (boxModel.height) {
21214 var properties = [];
21215 if (boxModel.top.value) {
21216 properties = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_3__.union)(properties, boxModel.top.properties);
21218 if (boxModel.bottom.value) {
21219 properties = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_3__.union)(properties, boxModel.bottom.properties);
21221 if (properties.length !== 0) {
21222 for (var _c = 0, properties_2 = properties; _c < properties_2.length; _c++) {
21223 var item = properties_2[_c];
21224 this.addEntry(item.node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.BewareOfBoxModelSize);
21226 this.addEntry(boxModel.height.node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.BewareOfBoxModelSize);
21229 /////////////////////////////////////////////////////////////
21230 // Properties ignored due to display
21231 /////////////////////////////////////////////////////////////
21232 // With 'display: inline-block', 'float' has no effect
21233 var displayElems = this.fetchWithValue(propertyTable, 'display', 'inline-block');
21234 if (displayElems.length > 0) {
21235 var elem = this.fetch(propertyTable, 'float');
21236 for (var index = 0; index < elem.length; index++) {
21237 var node_1 = elem[index].node;
21238 var value = node_1.getValue();
21239 if (value && !value.matches('none')) {
21240 this.addEntry(node_1, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.PropertyIgnoredDueToDisplay, localize('rule.propertyIgnoredDueToDisplayInlineBlock', "inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'"));
21244 // With 'display: block', 'vertical-align' has no effect
21245 displayElems = this.fetchWithValue(propertyTable, 'display', 'block');
21246 if (displayElems.length > 0) {
21247 var elem = this.fetch(propertyTable, 'vertical-align');
21248 for (var index = 0; index < elem.length; index++) {
21249 this.addEntry(elem[index].node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.PropertyIgnoredDueToDisplay, localize('rule.propertyIgnoredDueToDisplayBlock', "Property is ignored due to the display. With 'display: block', vertical-align should not be used."));
21252 /////////////////////////////////////////////////////////////
21254 /////////////////////////////////////////////////////////////
21255 var elements = this.fetch(propertyTable, 'float');
21256 for (var index = 0; index < elements.length; index++) {
21257 var element = elements[index];
21258 if (!this.isValidPropertyDeclaration(element)) {
21259 this.addEntry(element.node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.AvoidFloat);
21262 /////////////////////////////////////////////////////////////
21263 // Don't use duplicate declarations.
21264 /////////////////////////////////////////////////////////////
21265 for (var i = 0; i < propertyTable.length; i++) {
21266 var element = propertyTable[i];
21267 if (element.fullPropertyName !== 'background' && !this.validProperties[element.fullPropertyName]) {
21268 var value = element.node.getValue();
21269 if (value && this.documentText.charAt(value.offset) !== '-') {
21270 var elements_1 = this.fetch(propertyTable, element.fullPropertyName);
21271 if (elements_1.length > 1) {
21272 for (var k = 0; k < elements_1.length; k++) {
21273 var value_1 = elements_1[k].node.getValue();
21274 if (value_1 && this.documentText.charAt(value_1.offset) !== '-' && elements_1[k] !== element) {
21275 this.addEntry(element.node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.DuplicateDeclarations);
21282 /////////////////////////////////////////////////////////////
21283 // Unknown propery & When using a vendor-prefixed gradient, make sure to use them all.
21284 /////////////////////////////////////////////////////////////
21285 var isExportBlock = node.getSelectors().matches(":export");
21286 if (!isExportBlock) {
21287 var propertiesBySuffix = new NodesByRootMap();
21288 var containsUnknowns = false;
21289 for (var _d = 0, propertyTable_1 = propertyTable; _d < propertyTable_1.length; _d++) {
21290 var element = propertyTable_1[_d];
21291 var decl = element.node;
21292 if (this.isCSSDeclaration(decl)) {
21293 var name = element.fullPropertyName;
21294 var firstChar = name.charAt(0);
21295 if (firstChar === '-') {
21296 if (name.charAt(1) !== '-') { // avoid css variables
21297 if (!this.cssDataManager.isKnownProperty(name) && !this.validProperties[name]) {
21298 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.UnknownVendorSpecificProperty);
21300 var nonPrefixedName = decl.getNonPrefixedPropertyName();
21301 propertiesBySuffix.add(nonPrefixedName, name, decl.getProperty());
21305 var fullName = name;
21306 if (firstChar === '*' || firstChar === '_') {
21307 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.IEStarHack);
21308 name = name.substr(1);
21310 // _property and *property might be contributed via custom data
21311 if (!this.cssDataManager.isKnownProperty(fullName) && !this.cssDataManager.isKnownProperty(name)) {
21312 if (!this.validProperties[name]) {
21313 this.addEntry(decl.getProperty(), _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.UnknownProperty, localize('property.unknownproperty.detailed', "Unknown property: '{0}'", decl.getFullPropertyName()));
21316 propertiesBySuffix.add(name, name, null); // don't pass the node as we don't show errors on the standard
21320 containsUnknowns = true;
21323 if (!containsUnknowns) { // don't perform this test if there are
21324 for (var suffix in propertiesBySuffix.data) {
21325 var entry = propertiesBySuffix.data[suffix];
21326 var actual = entry.names;
21327 var needsStandard = this.cssDataManager.isStandardProperty(suffix) && (actual.indexOf(suffix) === -1);
21328 if (!needsStandard && actual.length === 1) {
21329 continue; // only the non-vendor specific rule is used, that's fine, no warning
21332 for (var i = 0, len = LintVisitor.prefixes.length; i < len; i++) {
21333 var prefix = LintVisitor.prefixes[i];
21334 if (this.cssDataManager.isStandardProperty(prefix + suffix)) {
21335 expected.push(prefix + suffix);
21338 var missingVendorSpecific = this.getMissingNames(expected, actual);
21339 if (missingVendorSpecific || needsStandard) {
21340 for (var _e = 0, _f = entry.nodes; _e < _f.length; _e++) {
21341 var node_2 = _f[_e];
21342 if (needsStandard) {
21343 var message = localize('property.standard.missing', "Also define the standard property '{0}' for compatibility", suffix);
21344 this.addEntry(node_2, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.IncludeStandardPropertyWhenUsingVendorPrefix, message);
21346 if (missingVendorSpecific) {
21347 var message = localize('property.vendorspecific.missing', "Always include all vendor specific properties: Missing: {0}", missingVendorSpecific);
21348 this.addEntry(node_2, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.AllVendorPrefixes, message);
21357 LintVisitor.prototype.visitPrio = function (node) {
21358 /////////////////////////////////////////////////////////////
21359 // Don't use !important
21360 /////////////////////////////////////////////////////////////
21361 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.AvoidImportant);
21364 LintVisitor.prototype.visitNumericValue = function (node) {
21365 /////////////////////////////////////////////////////////////
21366 // 0 has no following unit
21367 /////////////////////////////////////////////////////////////
21368 var funcDecl = node.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Function);
21369 if (funcDecl && funcDecl.getName() === 'calc') {
21372 var decl = node.findParent(_parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.NodeType.Declaration);
21374 var declValue = decl.getValue();
21376 var value = node.getValue();
21377 if (!value.unit || _languageFacts_facts__WEBPACK_IMPORTED_MODULE_1__.units.length.indexOf(value.unit.toLowerCase()) === -1) {
21380 if (parseFloat(value.value) === 0.0 && !!value.unit && !this.validProperties[decl.getFullPropertyName()]) {
21381 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.ZeroWithUnit);
21387 LintVisitor.prototype.visitFontFace = function (node) {
21388 var declarations = node.getDeclarations();
21389 if (!declarations) {
21393 var definesSrc = false, definesFontFamily = false;
21394 var containsUnknowns = false;
21395 for (var _i = 0, _a = declarations.getChildren(); _i < _a.length; _i++) {
21396 var node_3 = _a[_i];
21397 if (this.isCSSDeclaration(node_3)) {
21398 var name = node_3.getProperty().getName().toLowerCase();
21399 if (name === 'src') {
21402 if (name === 'font-family') {
21403 definesFontFamily = true;
21407 containsUnknowns = true;
21410 if (!containsUnknowns && (!definesSrc || !definesFontFamily)) {
21411 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.RequiredPropertiesForFontFace);
21415 LintVisitor.prototype.isCSSDeclaration = function (node) {
21416 if (node instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.Declaration) {
21417 if (!node.getValue()) {
21420 var property = node.getProperty();
21424 var identifier = property.getIdentifier();
21425 if (!identifier || identifier.containsInterpolation()) {
21432 LintVisitor.prototype.visitHexColorValue = function (node) {
21433 // Rule: #eeff0011 or #eeff00 or #ef01 or #ef0
21434 var length = node.length;
21435 if (length !== 9 && length !== 7 && length !== 5 && length !== 4) {
21436 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.HexColorLength);
21440 LintVisitor.prototype.visitFunction = function (node) {
21441 var fnName = node.getName().toLowerCase();
21442 var expectedAttrCount = -1;
21443 var actualAttrCount = 0;
21447 expectedAttrCount = 3;
21451 expectedAttrCount = 4;
21454 if (expectedAttrCount !== -1) {
21455 node.getArguments().accept(function (n) {
21456 if (n instanceof _parser_cssNodes__WEBPACK_IMPORTED_MODULE_2__.BinaryExpression) {
21457 actualAttrCount += 1;
21462 if (actualAttrCount !== expectedAttrCount) {
21463 this.addEntry(node, _lintRules__WEBPACK_IMPORTED_MODULE_4__.Rules.ArgsInColorFunction);
21468 LintVisitor.prefixes = [
21469 '-ms-', '-moz-', '-o-', '-webkit-',
21471 return LintVisitor;
21478 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21480 __webpack_require__.r(__webpack_exports__);
21481 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21482 /* harmony export */ "Element": () => /* binding */ Element,
21483 /* harmony export */ "default": () => /* binding */ calculateBoxModel
21484 /* harmony export */ });
21485 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87);
21486 /*---------------------------------------------------------------------------------------------
21487 * Copyright (c) Microsoft Corporation. All rights reserved.
21488 * Licensed under the MIT License. See License.txt in the project root for license information.
21489 *--------------------------------------------------------------------------------------------*/
21492 var Element = /** @class */ (function () {
21493 function Element(decl) {
21494 this.fullPropertyName = decl.getFullPropertyName().toLowerCase();
21500 function setSide(model, side, value, property) {
21501 var state = model[side];
21502 state.value = value;
21504 if (!(0,_utils_arrays__WEBPACK_IMPORTED_MODULE_0__.includes)(state.properties, property)) {
21505 state.properties.push(property);
21509 function setAllSides(model, value, property) {
21510 setSide(model, 'top', value, property);
21511 setSide(model, 'right', value, property);
21512 setSide(model, 'bottom', value, property);
21513 setSide(model, 'left', value, property);
21515 function updateModelWithValue(model, side, value, property) {
21516 if (side === 'top' || side === 'right' ||
21517 side === 'bottom' || side === 'left') {
21518 setSide(model, side, value, property);
21521 setAllSides(model, value, property);
21524 function updateModelWithList(model, values, property) {
21525 switch (values.length) {
21527 updateModelWithValue(model, undefined, values[0], property);
21530 updateModelWithValue(model, 'top', values[0], property);
21531 updateModelWithValue(model, 'bottom', values[0], property);
21532 updateModelWithValue(model, 'right', values[1], property);
21533 updateModelWithValue(model, 'left', values[1], property);
21536 updateModelWithValue(model, 'top', values[0], property);
21537 updateModelWithValue(model, 'right', values[1], property);
21538 updateModelWithValue(model, 'left', values[1], property);
21539 updateModelWithValue(model, 'bottom', values[2], property);
21542 updateModelWithValue(model, 'top', values[0], property);
21543 updateModelWithValue(model, 'right', values[1], property);
21544 updateModelWithValue(model, 'bottom', values[2], property);
21545 updateModelWithValue(model, 'left', values[3], property);
21549 function matches(value, candidates) {
21550 for (var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++) {
21551 var candidate = candidates_1[_i];
21552 if (value.matches(candidate)) {
21559 * @param allowsKeywords whether the initial value of property is zero, so keywords `initial` and `unset` count as zero
21560 * @return `true` if this node represents a non-zero border; otherwise, `false`
21562 function checkLineWidth(value, allowsKeywords) {
21563 if (allowsKeywords === void 0) { allowsKeywords = true; }
21564 if (allowsKeywords && matches(value, ['initial', 'unset'])) {
21567 // a <length> is a value and a unit
21568 // so use `parseFloat` to strip the unit
21569 return parseFloat(value.getText()) !== 0;
21571 function checkLineWidthList(nodes, allowsKeywords) {
21572 if (allowsKeywords === void 0) { allowsKeywords = true; }
21573 return nodes.map(function (node) { return checkLineWidth(node, allowsKeywords); });
21576 * @param allowsKeywords whether keywords `initial` and `unset` count as zero
21577 * @return `true` if this node represents a non-zero border; otherwise, `false`
21579 function checkLineStyle(valueNode, allowsKeywords) {
21580 if (allowsKeywords === void 0) { allowsKeywords = true; }
21581 if (matches(valueNode, ['none', 'hidden'])) {
21584 if (allowsKeywords && matches(valueNode, ['initial', 'unset'])) {
21589 function checkLineStyleList(nodes, allowsKeywords) {
21590 if (allowsKeywords === void 0) { allowsKeywords = true; }
21591 return nodes.map(function (node) { return checkLineStyle(node, allowsKeywords); });
21593 function checkBorderShorthand(node) {
21594 var children = node.getChildren();
21595 // the only child can be a keyword, a <line-width>, or a <line-style>
21596 // if either check returns false, the result is no border
21597 if (children.length === 1) {
21598 var value = children[0];
21599 return checkLineWidth(value) && checkLineStyle(value);
21601 // multiple children can't contain keywords
21602 // if any child means no border, the result is no border
21603 for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
21604 var child = children_1[_i];
21606 if (!checkLineWidth(value, /* allowsKeywords: */ false) ||
21607 !checkLineStyle(value, /* allowsKeywords: */ false)) {
21613 function calculateBoxModel(propertyTable) {
21615 top: { value: false, properties: [] },
21616 right: { value: false, properties: [] },
21617 bottom: { value: false, properties: [] },
21618 left: { value: false, properties: [] },
21620 for (var _i = 0, propertyTable_1 = propertyTable; _i < propertyTable_1.length; _i++) {
21621 var property = propertyTable_1[_i];
21622 var value = property.node.value;
21623 if (typeof value === 'undefined') {
21626 switch (property.fullPropertyName) {
21628 // has `box-sizing`, bail out
21630 top: { value: false, properties: [] },
21631 right: { value: false, properties: [] },
21632 bottom: { value: false, properties: [] },
21633 left: { value: false, properties: [] },
21636 model.width = property;
21639 model.height = property;
21642 var segments = property.fullPropertyName.split('-');
21643 switch (segments[0]) {
21645 switch (segments[1]) {
21651 switch (segments[2]) {
21653 updateModelWithValue(model, segments[1], checkBorderShorthand(value), property);
21656 // the initial value of `border-width` is `medium`, not zero
21657 updateModelWithValue(model, segments[1], checkLineWidth(value, false), property);
21660 // the initial value of `border-style` is `none`
21661 updateModelWithValue(model, segments[1], checkLineStyle(value, true), property);
21666 // the initial value of `border-width` is `medium`, not zero
21667 updateModelWithList(model, checkLineWidthList(value.getChildren(), false), property);
21670 // the initial value of `border-style` is `none`
21671 updateModelWithList(model, checkLineStyleList(value.getChildren(), true), property);
21676 if (segments.length === 1) {
21677 // the initial value of `padding` is zero
21678 updateModelWithList(model, checkLineWidthList(value.getChildren(), true), property);
21681 // the initial value of `padding` is zero
21682 updateModelWithValue(model, segments[1], checkLineWidth(value, true), property);
21695 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
21697 __webpack_require__.r(__webpack_exports__);
21698 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21699 /* harmony export */ "SCSSParser": () => /* binding */ SCSSParser
21700 /* harmony export */ });
21701 /* harmony import */ var _scssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(103);
21702 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73);
21703 /* harmony import */ var _cssParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(72);
21704 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74);
21705 /* harmony import */ var _scssErrors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(104);
21706 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76);
21707 /*---------------------------------------------------------------------------------------------
21708 * Copyright (c) Microsoft Corporation. All rights reserved.
21709 * Licensed under the MIT License. See License.txt in the project root for license information.
21710 *--------------------------------------------------------------------------------------------*/
21712 var __extends = (undefined && undefined.__extends) || (function () {
21713 var extendStatics = function (d, b) {
21714 extendStatics = Object.setPrototypeOf ||
21715 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21716 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21717 return extendStatics(d, b);
21719 return function (d, b) {
21720 extendStatics(d, b);
21721 function __() { this.constructor = d; }
21722 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21732 /// A parser for scss
21733 /// http://sass-lang.com/documentation/file.SASS_REFERENCE.html
21735 var SCSSParser = /** @class */ (function (_super) {
21736 __extends(SCSSParser, _super);
21737 function SCSSParser() {
21738 return _super.call(this, new _scssScanner__WEBPACK_IMPORTED_MODULE_0__.SCSSScanner()) || this;
21740 SCSSParser.prototype._parseStylesheetStatement = function (isNested) {
21741 if (isNested === void 0) { isNested = false; }
21742 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
21743 return this._parseWarnAndDebug() // @warn, @debug and @error statements
21744 || this._parseControlStatement() // @if, @while, @for, @each
21745 || this._parseMixinDeclaration() // @mixin
21746 || this._parseMixinContent() // @content
21747 || this._parseMixinReference() // @include
21748 || this._parseFunctionDeclaration() // @function
21749 || this._parseForward() // @forward
21750 || this._parseUse() // @use
21751 || this._parseRuleset(isNested) // @at-rule
21752 || _super.prototype._parseStylesheetAtStatement.call(this, isNested);
21754 return this._parseRuleset(true) || this._parseVariableDeclaration();
21756 SCSSParser.prototype._parseImport = function () {
21757 if (!this.peekKeyword('@import')) {
21760 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Import);
21761 this.consumeToken();
21762 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
21763 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.URIOrStringExpected);
21765 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21766 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
21767 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.URIOrStringExpected);
21770 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
21771 node.setMedialist(this._parseMediaQueryList());
21773 return this.finish(node);
21775 // scss variables: $font-size: 12px;
21776 SCSSParser.prototype._parseVariableDeclaration = function (panic) {
21777 if (panic === void 0) { panic = []; }
21778 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.VariableName)) {
21781 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.VariableDeclaration);
21782 if (!node.setVariable(this._parseVariable())) {
21785 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
21786 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ColonExpected);
21788 if (this.prevToken) {
21789 node.colonPosition = this.prevToken.offset;
21791 if (!node.setValue(this._parseExpr())) {
21792 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableValueExpected, [], panic);
21794 while (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Exclamation)) {
21795 if (node.addChild(this._tryParsePrio())) {
21799 this.consumeToken();
21800 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident, /^(default|global)$/)) {
21801 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
21803 this.consumeToken();
21806 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
21807 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
21809 return this.finish(node);
21811 SCSSParser.prototype._parseMediaContentStart = function () {
21812 return this._parseInterpolation();
21814 SCSSParser.prototype._parseMediaFeatureName = function () {
21815 return this._parseModuleMember()
21816 || this._parseFunction() // function before ident
21817 || this._parseIdent()
21818 || this._parseVariable();
21820 SCSSParser.prototype._parseKeyframeSelector = function () {
21821 return this._tryParseKeyframeSelector()
21822 || this._parseControlStatement(this._parseKeyframeSelector.bind(this))
21823 || this._parseVariableDeclaration()
21824 || this._parseMixinContent();
21826 SCSSParser.prototype._parseVariable = function () {
21827 if (!this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.VariableName)) {
21830 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Variable);
21831 this.consumeToken();
21834 SCSSParser.prototype._parseModuleMember = function () {
21835 var pos = this.mark();
21836 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Module);
21837 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Module]))) {
21840 if (this.hasWhitespace()
21841 || !this.acceptDelim('.')
21842 || this.hasWhitespace()) {
21843 this.restoreAtMark(pos);
21846 if (!node.addChild(this._parseVariable() || this._parseFunction())) {
21847 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierOrVariableExpected);
21851 SCSSParser.prototype._parseIdent = function (referenceTypes) {
21853 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident) && !this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.InterpolationFunction) && !this.peekDelim('-')) {
21856 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
21857 node.referenceTypes = referenceTypes;
21858 node.isCustomProperty = this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident, /^--/);
21859 var hasContent = false;
21860 var indentInterpolation = function () {
21861 var pos = _this.mark();
21862 if (_this.acceptDelim('-')) {
21863 if (!_this.hasWhitespace()) {
21864 _this.acceptDelim('-');
21866 if (_this.hasWhitespace()) {
21867 _this.restoreAtMark(pos);
21871 return _this._parseInterpolation();
21873 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident) || node.addChild(indentInterpolation()) || (hasContent && this.acceptRegexp(/^[\w-]/))) {
21875 if (this.hasWhitespace()) {
21879 return hasContent ? this.finish(node) : null;
21881 SCSSParser.prototype._parseTermExpression = function () {
21882 return this._parseModuleMember() ||
21883 this._parseVariable() ||
21884 this._parseSelectorCombinator() ||
21885 //this._tryParsePrio() ||
21886 _super.prototype._parseTermExpression.call(this);
21888 SCSSParser.prototype._parseInterpolation = function () {
21889 if (this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.InterpolationFunction)) {
21890 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Interpolation);
21891 this.consumeToken();
21892 if (!node.addChild(this._parseExpr()) && !this._parseSelectorCombinator()) {
21893 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR)) {
21894 return this.finish(node);
21896 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
21898 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR)) {
21899 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightCurlyExpected);
21901 return this.finish(node);
21905 SCSSParser.prototype._parseOperator = function () {
21906 if (this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.EqualsOperator) || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.NotEqualsOperator)
21907 || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.GreaterEqualsOperator) || this.peek(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.SmallerEqualsOperator)
21908 || this.peekDelim('>') || this.peekDelim('<')
21909 || this.peekIdent('and') || this.peekIdent('or')
21910 || this.peekDelim('%')) {
21911 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Operator);
21912 this.consumeToken();
21913 return this.finish(node);
21915 return _super.prototype._parseOperator.call(this);
21917 SCSSParser.prototype._parseUnaryOperator = function () {
21918 if (this.peekIdent('not')) {
21919 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
21920 this.consumeToken();
21921 return this.finish(node);
21923 return _super.prototype._parseUnaryOperator.call(this);
21925 SCSSParser.prototype._parseRuleSetDeclaration = function () {
21926 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
21927 return this._parseKeyframe() // nested @keyframe
21928 || this._parseImport() // nested @import
21929 || this._parseMedia(true) // nested @media
21930 || this._parseFontFace() // nested @font-face
21931 || this._parseWarnAndDebug() // @warn, @debug and @error statements
21932 || this._parseControlStatement() // @if, @while, @for, @each
21933 || this._parseFunctionDeclaration() // @function
21934 || this._parseExtends() // @extends
21935 || this._parseMixinReference() // @include
21936 || this._parseMixinContent() // @content
21937 || this._parseMixinDeclaration() // nested @mixin
21938 || this._parseRuleset(true) // @at-rule
21939 || this._parseSupports(true) // @supports
21940 || _super.prototype._parseRuleSetDeclarationAtStatement.call(this);
21942 return this._parseVariableDeclaration() // variable declaration
21943 || this._tryParseRuleset(true) // nested ruleset
21944 || _super.prototype._parseRuleSetDeclaration.call(this); // try css ruleset declaration as last so in the error case, the ast will contain a declaration
21946 SCSSParser.prototype._parseDeclaration = function (stopTokens) {
21947 var custonProperty = this._tryParseCustomPropertyDeclaration(stopTokens);
21948 if (custonProperty) {
21949 return custonProperty;
21951 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Declaration);
21952 if (!node.setProperty(this._parseProperty())) {
21955 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
21956 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ColonExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon], stopTokens || [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon]);
21958 if (this.prevToken) {
21959 node.colonPosition = this.prevToken.offset;
21961 var hasContent = false;
21962 if (node.setValue(this._parseExpr())) {
21964 node.addChild(this._parsePrio());
21966 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
21967 node.setNestedProperties(this._parseNestedProperties());
21971 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.PropertyValueExpected);
21974 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
21975 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
21977 return this.finish(node);
21979 SCSSParser.prototype._parseNestedProperties = function () {
21980 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NestedProperties);
21981 return this._parseBody(node, this._parseDeclaration.bind(this));
21983 SCSSParser.prototype._parseExtends = function () {
21984 if (this.peekKeyword('@extend')) {
21985 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ExtendsReference);
21986 this.consumeToken();
21987 if (!node.getSelectors().addChild(this._parseSimpleSelector())) {
21988 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.SelectorExpected);
21990 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
21991 node.getSelectors().addChild(this._parseSimpleSelector());
21993 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Exclamation)) {
21994 if (!this.acceptIdent('optional')) {
21995 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
21998 return this.finish(node);
22002 SCSSParser.prototype._parseSimpleSelectorBody = function () {
22003 return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || _super.prototype._parseSimpleSelectorBody.call(this);
22005 SCSSParser.prototype._parseSelectorCombinator = function () {
22006 if (this.peekDelim('&')) {
22007 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorCombinator);
22008 this.consumeToken();
22009 while (!this.hasWhitespace() && (this.acceptDelim('-') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Num) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Dimension) || node.addChild(this._parseIdent()) || this.acceptDelim('&'))) {
22012 return this.finish(node);
22016 SCSSParser.prototype._parseSelectorPlaceholder = function () {
22017 if (this.peekDelim('%')) {
22018 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorPlaceholder);
22019 this.consumeToken();
22020 this._parseIdent();
22021 return this.finish(node);
22023 else if (this.peekKeyword('@at-root')) {
22024 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorPlaceholder);
22025 this.consumeToken();
22026 return this.finish(node);
22030 SCSSParser.prototype._parseElementName = function () {
22031 var pos = this.mark();
22032 var node = _super.prototype._parseElementName.call(this);
22033 if (node && !this.hasWhitespace() && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) { // for #49589
22034 this.restoreAtMark(pos);
22039 SCSSParser.prototype._tryParsePseudoIdentifier = function () {
22040 return this._parseInterpolation() || _super.prototype._tryParsePseudoIdentifier.call(this); // for #49589
22042 SCSSParser.prototype._parseWarnAndDebug = function () {
22043 if (!this.peekKeyword('@debug')
22044 && !this.peekKeyword('@warn')
22045 && !this.peekKeyword('@error')) {
22048 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Debug);
22049 this.consumeToken(); // @debug, @warn or @error
22050 node.addChild(this._parseExpr()); // optional
22051 return this.finish(node);
22053 SCSSParser.prototype._parseControlStatement = function (parseStatement) {
22054 if (parseStatement === void 0) { parseStatement = this._parseRuleSetDeclaration.bind(this); }
22055 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
22058 return this._parseIfStatement(parseStatement) || this._parseForStatement(parseStatement)
22059 || this._parseEachStatement(parseStatement) || this._parseWhileStatement(parseStatement);
22061 SCSSParser.prototype._parseIfStatement = function (parseStatement) {
22062 if (!this.peekKeyword('@if')) {
22065 return this._internalParseIfStatement(parseStatement);
22067 SCSSParser.prototype._internalParseIfStatement = function (parseStatement) {
22068 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.IfStatement);
22069 this.consumeToken(); // @if or if
22070 if (!node.setExpression(this._parseExpr(true))) {
22071 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
22073 this._parseBody(node, parseStatement);
22074 if (this.acceptKeyword('@else')) {
22075 if (this.peekIdent('if')) {
22076 node.setElseClause(this._internalParseIfStatement(parseStatement));
22078 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
22079 var elseNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ElseStatement);
22080 this._parseBody(elseNode, parseStatement);
22081 node.setElseClause(elseNode);
22084 return this.finish(node);
22086 SCSSParser.prototype._parseForStatement = function (parseStatement) {
22087 if (!this.peekKeyword('@for')) {
22090 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ForStatement);
22091 this.consumeToken(); // @for
22092 if (!node.setVariable(this._parseVariable())) {
22093 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22095 if (!this.acceptIdent('from')) {
22096 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__.SCSSParseError.FromExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22098 if (!node.addChild(this._parseBinaryExpr())) {
22099 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22101 if (!this.acceptIdent('to') && !this.acceptIdent('through')) {
22102 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__.SCSSParseError.ThroughOrToExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22104 if (!node.addChild(this._parseBinaryExpr())) {
22105 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22107 return this._parseBody(node, parseStatement);
22109 SCSSParser.prototype._parseEachStatement = function (parseStatement) {
22110 if (!this.peekKeyword('@each')) {
22113 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.EachStatement);
22114 this.consumeToken(); // @each
22115 var variables = node.getVariables();
22116 if (!variables.addChild(this._parseVariable())) {
22117 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22119 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22120 if (!variables.addChild(this._parseVariable())) {
22121 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22124 this.finish(variables);
22125 if (!this.acceptIdent('in')) {
22126 return this.finish(node, _scssErrors__WEBPACK_IMPORTED_MODULE_4__.SCSSParseError.InExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22128 if (!node.addChild(this._parseExpr())) {
22129 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22131 return this._parseBody(node, parseStatement);
22133 SCSSParser.prototype._parseWhileStatement = function (parseStatement) {
22134 if (!this.peekKeyword('@while')) {
22137 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.WhileStatement);
22138 this.consumeToken(); // @while
22139 if (!node.addChild(this._parseBinaryExpr())) {
22140 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22142 return this._parseBody(node, parseStatement);
22144 SCSSParser.prototype._parseFunctionBodyDeclaration = function () {
22145 return this._parseVariableDeclaration() || this._parseReturnStatement() || this._parseWarnAndDebug()
22146 || this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this));
22148 SCSSParser.prototype._parseFunctionDeclaration = function () {
22149 if (!this.peekKeyword('@function')) {
22152 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionDeclaration);
22153 this.consumeToken(); // @function
22154 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Function]))) {
22155 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22157 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22158 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22160 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
22161 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22162 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22165 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
22166 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
22170 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22171 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22173 return this._parseBody(node, this._parseFunctionBodyDeclaration.bind(this));
22175 SCSSParser.prototype._parseReturnStatement = function () {
22176 if (!this.peekKeyword('@return')) {
22179 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.ReturnStatement);
22180 this.consumeToken(); // @function
22181 if (!node.addChild(this._parseExpr())) {
22182 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
22184 return this.finish(node);
22186 SCSSParser.prototype._parseMixinDeclaration = function () {
22187 if (!this.peekKeyword('@mixin')) {
22190 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinDeclaration);
22191 this.consumeToken();
22192 if (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin]))) {
22193 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22195 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22196 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
22197 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22198 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22201 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
22202 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
22206 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22207 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22210 return this._parseBody(node, this._parseRuleSetDeclaration.bind(this));
22212 SCSSParser.prototype._parseParameterDeclaration = function () {
22213 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionParameter);
22214 if (!node.setIdentifier(this._parseVariable())) {
22217 if (this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis)) {
22220 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
22221 if (!node.setDefaultValue(this._parseExpr(true))) {
22222 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableValueExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma, _cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
22225 return this.finish(node);
22227 SCSSParser.prototype._parseMixinContent = function () {
22228 if (!this.peekKeyword('@content')) {
22231 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinContentReference);
22232 this.consumeToken();
22233 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22234 if (node.getArguments().addChild(this._parseFunctionArgument())) {
22235 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22236 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22239 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
22240 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
22244 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22245 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
22248 return this.finish(node);
22250 SCSSParser.prototype._parseMixinReference = function () {
22251 if (!this.peekKeyword('@include')) {
22254 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinReference);
22255 this.consumeToken();
22256 // Could be module or mixin identifier, set as mixin as default.
22257 var firstIdent = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin]);
22258 if (!node.setIdentifier(firstIdent)) {
22259 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22261 // Is a module accessor.
22262 if (!this.hasWhitespace() && this.acceptDelim('.') && !this.hasWhitespace()) {
22263 var secondIdent = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin]);
22264 if (!secondIdent) {
22265 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR]);
22267 var moduleToken = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Module);
22268 // Re-purpose first matched ident as identifier for module token.
22269 firstIdent.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Module];
22270 moduleToken.setIdentifier(firstIdent);
22271 // Override identifier with second ident.
22272 node.setIdentifier(secondIdent);
22273 node.addChild(moduleToken);
22275 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22276 if (node.getArguments().addChild(this._parseFunctionArgument())) {
22277 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22278 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22281 if (!node.getArguments().addChild(this._parseFunctionArgument())) {
22282 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
22286 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22287 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
22290 if (this.peekIdent('using') || this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
22291 node.setContent(this._parseMixinContentDeclaration());
22293 return this.finish(node);
22295 SCSSParser.prototype._parseMixinContentDeclaration = function () {
22296 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinContentDeclaration);
22297 if (this.acceptIdent('using')) {
22298 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22299 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL]);
22301 if (node.getParameters().addChild(this._parseParameterDeclaration())) {
22302 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22303 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22306 if (!node.getParameters().addChild(this._parseParameterDeclaration())) {
22307 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
22311 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22312 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL]);
22315 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
22316 this._parseBody(node, this._parseMixinReferenceBodyStatement.bind(this));
22318 return this.finish(node);
22320 SCSSParser.prototype._parseMixinReferenceBodyStatement = function () {
22321 return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
22323 SCSSParser.prototype._parseFunctionArgument = function () {
22324 // [variableName ':'] expression | variableName '...'
22325 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionArgument);
22326 var pos = this.mark();
22327 var argument = this._parseVariable();
22329 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
22330 if (this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis)) { // optional
22331 node.setValue(argument);
22332 return this.finish(node);
22335 this.restoreAtMark(pos);
22339 node.setIdentifier(argument);
22342 if (node.setValue(this._parseExpr(true))) {
22343 this.accept(_scssScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis); // #43746
22344 node.addChild(this._parsePrio()); // #9859
22345 return this.finish(node);
22347 else if (node.setValue(this._tryParsePrio())) {
22348 return this.finish(node);
22352 SCSSParser.prototype._parseURLArgument = function () {
22353 var pos = this.mark();
22354 var node = _super.prototype._parseURLArgument.call(this);
22355 if (!node || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22356 this.restoreAtMark(pos);
22357 var node_1 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
22358 node_1.addChild(this._parseBinaryExpr());
22359 return this.finish(node_1);
22363 SCSSParser.prototype._parseOperation = function () {
22364 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22367 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
22368 this.consumeToken();
22369 while (node.addChild(this._parseListElement())) {
22370 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma); // optional
22372 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22373 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
22375 return this.finish(node);
22377 SCSSParser.prototype._parseListElement = function () {
22378 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ListEntry);
22379 var child = this._parseBinaryExpr();
22383 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
22384 node.setKey(child);
22385 if (!node.setValue(this._parseBinaryExpr())) {
22386 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.ExpressionExpected);
22390 node.setValue(child);
22392 return this.finish(node);
22394 SCSSParser.prototype._parseUse = function () {
22395 if (!this.peekKeyword('@use')) {
22398 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Use);
22399 this.consumeToken(); // @use
22400 if (!node.addChild(this._parseStringLiteral())) {
22401 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.StringLiteralExpected);
22403 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
22404 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident, /as|with/)) {
22405 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
22407 if (this.acceptIdent('as') &&
22408 (!node.setIdentifier(this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Module])) && !this.acceptDelim('*'))) {
22409 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierOrWildcardExpected);
22411 if (this.acceptIdent('with')) {
22412 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22413 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
22415 // First variable statement, no comma.
22416 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
22417 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
22419 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22420 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22423 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
22424 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
22427 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22428 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
22432 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
22433 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.SemiColonExpected);
22435 return this.finish(node);
22437 SCSSParser.prototype._parseModuleConfigDeclaration = function () {
22438 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ModuleConfiguration);
22439 if (!node.setIdentifier(this._parseVariable())) {
22442 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon) || !node.setValue(this._parseExpr(true))) {
22443 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableValueExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma, _cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
22445 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Exclamation)) {
22446 if (this.hasWhitespace() || !this.acceptIdent('default')) {
22447 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
22450 return this.finish(node);
22452 SCSSParser.prototype._parseForward = function () {
22453 if (!this.peekKeyword('@forward')) {
22456 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Forward);
22457 this.consumeToken();
22458 if (!node.addChild(this._parseStringLiteral())) {
22459 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.StringLiteralExpected);
22461 if (this.acceptIdent('with')) {
22462 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
22463 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.LeftParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
22465 // First variable statement, no comma.
22466 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
22467 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
22469 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
22470 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22473 if (!node.getParameters().addChild(this._parseModuleConfigDeclaration())) {
22474 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.VariableNameExpected);
22477 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
22478 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.RightParenthesisExpected);
22481 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
22482 if (!this.peekRegExp(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident, /as|hide|show/)) {
22483 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.UnknownKeyword);
22485 if (this.acceptIdent('as')) {
22486 var identifier = this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Forward]);
22487 if (!node.setIdentifier(identifier)) {
22488 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierExpected);
22490 // Wildcard must be the next character after the identifier string.
22491 if (this.hasWhitespace() || !this.acceptDelim('*')) {
22492 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.WildcardExpected);
22495 if (this.peekIdent('hide') || this.peekIdent('show')) {
22496 if (!node.addChild(this._parseForwardVisibility())) {
22497 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.IdentifierOrVariableExpected);
22501 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
22502 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_5__.ParseError.SemiColonExpected);
22504 return this.finish(node);
22506 SCSSParser.prototype._parseForwardVisibility = function () {
22507 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ForwardVisibility);
22508 // Assume to be "hide" or "show".
22509 node.setIdentifier(this._parseIdent());
22510 while (node.addChild(this._parseVariable() || this._parseIdent())) {
22511 // Consume all variables and idents ahead.
22512 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma);
22514 // More than just identifier
22515 return node.getChildren().length > 1 ? node : null;
22517 SCSSParser.prototype._parseSupportsCondition = function () {
22518 return this._parseInterpolation() || _super.prototype._parseSupportsCondition.call(this);
22521 }(_cssParser__WEBPACK_IMPORTED_MODULE_2__.Parser));
22527 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22529 __webpack_require__.r(__webpack_exports__);
22530 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22531 /* harmony export */ "VariableName": () => /* binding */ VariableName,
22532 /* harmony export */ "InterpolationFunction": () => /* binding */ InterpolationFunction,
22533 /* harmony export */ "Default": () => /* binding */ Default,
22534 /* harmony export */ "EqualsOperator": () => /* binding */ EqualsOperator,
22535 /* harmony export */ "NotEqualsOperator": () => /* binding */ NotEqualsOperator,
22536 /* harmony export */ "GreaterEqualsOperator": () => /* binding */ GreaterEqualsOperator,
22537 /* harmony export */ "SmallerEqualsOperator": () => /* binding */ SmallerEqualsOperator,
22538 /* harmony export */ "Ellipsis": () => /* binding */ Ellipsis,
22539 /* harmony export */ "Module": () => /* binding */ Module,
22540 /* harmony export */ "SCSSScanner": () => /* binding */ SCSSScanner
22541 /* harmony export */ });
22542 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
22543 /*---------------------------------------------------------------------------------------------
22544 * Copyright (c) Microsoft Corporation. All rights reserved.
22545 * Licensed under the MIT License. See License.txt in the project root for license information.
22546 *--------------------------------------------------------------------------------------------*/
22548 var __extends = (undefined && undefined.__extends) || (function () {
22549 var extendStatics = function (d, b) {
22550 extendStatics = Object.setPrototypeOf ||
22551 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22552 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22553 return extendStatics(d, b);
22555 return function (d, b) {
22556 extendStatics(d, b);
22557 function __() { this.constructor = d; }
22558 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22562 var _FSL = '/'.charCodeAt(0);
22563 var _NWL = '\n'.charCodeAt(0);
22564 var _CAR = '\r'.charCodeAt(0);
22565 var _LFD = '\f'.charCodeAt(0);
22566 var _DLR = '$'.charCodeAt(0);
22567 var _HSH = '#'.charCodeAt(0);
22568 var _CUL = '{'.charCodeAt(0);
22569 var _EQS = '='.charCodeAt(0);
22570 var _BNG = '!'.charCodeAt(0);
22571 var _LAN = '<'.charCodeAt(0);
22572 var _RAN = '>'.charCodeAt(0);
22573 var _DOT = '.'.charCodeAt(0);
22574 var _ATS = '@'.charCodeAt(0);
22575 var customTokenValue = _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CustomToken;
22576 var VariableName = customTokenValue++;
22577 var InterpolationFunction = customTokenValue++;
22578 var Default = customTokenValue++;
22579 var EqualsOperator = customTokenValue++;
22580 var NotEqualsOperator = customTokenValue++;
22581 var GreaterEqualsOperator = customTokenValue++;
22582 var SmallerEqualsOperator = customTokenValue++;
22583 var Ellipsis = customTokenValue++;
22584 var Module = customTokenValue++;
22585 var SCSSScanner = /** @class */ (function (_super) {
22586 __extends(SCSSScanner, _super);
22587 function SCSSScanner() {
22588 return _super !== null && _super.apply(this, arguments) || this;
22590 SCSSScanner.prototype.scanNext = function (offset) {
22592 if (this.stream.advanceIfChar(_DLR)) {
22593 var content = ['$'];
22594 if (this.ident(content)) {
22595 return this.finishToken(offset, VariableName, content.join(''));
22598 this.stream.goBackTo(offset);
22601 // scss: interpolation function #{..})
22602 if (this.stream.advanceIfChars([_HSH, _CUL])) {
22603 return this.finishToken(offset, InterpolationFunction);
22606 if (this.stream.advanceIfChars([_EQS, _EQS])) {
22607 return this.finishToken(offset, EqualsOperator);
22610 if (this.stream.advanceIfChars([_BNG, _EQS])) {
22611 return this.finishToken(offset, NotEqualsOperator);
22614 if (this.stream.advanceIfChar(_LAN)) {
22615 if (this.stream.advanceIfChar(_EQS)) {
22616 return this.finishToken(offset, SmallerEqualsOperator);
22618 return this.finishToken(offset, _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Delim);
22620 // ooperators >, >=
22621 if (this.stream.advanceIfChar(_RAN)) {
22622 if (this.stream.advanceIfChar(_EQS)) {
22623 return this.finishToken(offset, GreaterEqualsOperator);
22625 return this.finishToken(offset, _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Delim);
22628 if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
22629 return this.finishToken(offset, Ellipsis);
22631 return _super.prototype.scanNext.call(this, offset);
22633 SCSSScanner.prototype.comment = function () {
22634 if (_super.prototype.comment.call(this)) {
22637 if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
22638 this.stream.advanceWhileChar(function (ch) {
22654 return SCSSScanner;
22655 }(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.Scanner));
22661 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22663 __webpack_require__.r(__webpack_exports__);
22664 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22665 /* harmony export */ "SCSSIssueType": () => /* binding */ SCSSIssueType,
22666 /* harmony export */ "SCSSParseError": () => /* binding */ SCSSParseError
22667 /* harmony export */ });
22668 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
22669 /*---------------------------------------------------------------------------------------------
22670 * Copyright (c) Microsoft Corporation. All rights reserved.
22671 * Licensed under the MIT License. See License.txt in the project root for license information.
22672 *--------------------------------------------------------------------------------------------*/
22675 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__.loadMessageBundle();
22676 var SCSSIssueType = /** @class */ (function () {
22677 function SCSSIssueType(id, message) {
22679 this.message = message;
22681 return SCSSIssueType;
22684 var SCSSParseError = {
22685 FromExpected: new SCSSIssueType('scss-fromexpected', localize('expected.from', "'from' expected")),
22686 ThroughOrToExpected: new SCSSIssueType('scss-throughexpected', localize('expected.through', "'through' or 'to' expected")),
22687 InExpected: new SCSSIssueType('scss-fromexpected', localize('expected.in', "'in' expected")),
22693 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22695 __webpack_require__.r(__webpack_exports__);
22696 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22697 /* harmony export */ "SCSSCompletion": () => /* binding */ SCSSCompletion
22698 /* harmony export */ });
22699 /* harmony import */ var _cssCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
22700 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
22701 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88);
22702 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77);
22703 /*---------------------------------------------------------------------------------------------
22704 * Copyright (c) Microsoft Corporation. All rights reserved.
22705 * Licensed under the MIT License. See License.txt in the project root for license information.
22706 *--------------------------------------------------------------------------------------------*/
22708 var __extends = (undefined && undefined.__extends) || (function () {
22709 var extendStatics = function (d, b) {
22710 extendStatics = Object.setPrototypeOf ||
22711 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22712 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22713 return extendStatics(d, b);
22715 return function (d, b) {
22716 extendStatics(d, b);
22717 function __() { this.constructor = d; }
22718 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22725 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__.loadMessageBundle();
22726 var SCSSCompletion = /** @class */ (function (_super) {
22727 __extends(SCSSCompletion, _super);
22728 function SCSSCompletion(lsServiceOptions, cssDataManager) {
22729 var _this = _super.call(this, '$', lsServiceOptions, cssDataManager) || this;
22730 addReferencesToDocumentation(SCSSCompletion.scssModuleLoaders);
22731 addReferencesToDocumentation(SCSSCompletion.scssModuleBuiltIns);
22734 SCSSCompletion.prototype.isImportPathParent = function (type) {
22735 return type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Forward
22736 || type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Use
22737 || _super.prototype.isImportPathParent.call(this, type);
22739 SCSSCompletion.prototype.getCompletionForImportPath = function (importPathNode, result) {
22740 var parentType = importPathNode.getParent().type;
22741 if (parentType === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Forward || parentType === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Use) {
22742 for (var _i = 0, _a = SCSSCompletion.scssModuleBuiltIns; _i < _a.length; _i++) {
22746 documentation: p.documentation,
22747 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TextEdit.replace(this.getCompletionRange(importPathNode), "'" + p.label + "'"),
22748 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Module
22750 result.items.push(item);
22753 return _super.prototype.getCompletionForImportPath.call(this, importPathNode, result);
22755 SCSSCompletion.prototype.createReplaceFunction = function () {
22756 var tabStopCounter = 1;
22757 return function (_match, p1) {
22758 return '\\' + p1 + ': ${' + tabStopCounter++ + ':' + (SCSSCompletion.variableDefaults[p1] || '') + '}';
22761 SCSSCompletion.prototype.createFunctionProposals = function (proposals, existingNode, sortToEnd, result) {
22762 for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) {
22763 var p = proposals_1[_i];
22764 var insertText = p.func.replace(/\[?(\$\w+)\]?/g, this.createReplaceFunction());
22765 var label = p.func.substr(0, p.func.indexOf('('));
22769 documentation: p.desc,
22770 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TextEdit.replace(this.getCompletionRange(existingNode), insertText),
22771 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
22772 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Function
22775 item.sortText = 'z';
22777 result.items.push(item);
22781 SCSSCompletion.prototype.getCompletionsForSelector = function (ruleSet, isNested, result) {
22782 this.createFunctionProposals(SCSSCompletion.selectorFuncs, null, true, result);
22783 return _super.prototype.getCompletionsForSelector.call(this, ruleSet, isNested, result);
22785 SCSSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
22786 var functions = SCSSCompletion.builtInFuncs;
22788 functions = functions.filter(function (f) { return !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1; });
22790 this.createFunctionProposals(functions, existingNode, true, result);
22791 return _super.prototype.getTermProposals.call(this, entry, existingNode, result);
22793 SCSSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
22794 this.createFunctionProposals(SCSSCompletion.colorProposals, existingNode, false, result);
22795 return _super.prototype.getColorProposals.call(this, entry, existingNode, result);
22797 SCSSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
22798 this.getCompletionForAtDirectives(result);
22799 this.getCompletionsForSelector(null, true, result);
22800 return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result);
22802 SCSSCompletion.prototype.getCompletionsForExtendsReference = function (_extendsRef, existingNode, result) {
22803 var symbols = this.getSymbolContext().findSymbolsAtOffset(this.offset, _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.ReferenceType.Rule);
22804 for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) {
22805 var symbol = symbols_1[_i];
22807 label: symbol.name,
22808 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TextEdit.replace(this.getCompletionRange(existingNode), symbol.name),
22809 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Function,
22811 result.items.push(suggest);
22815 SCSSCompletion.prototype.getCompletionForAtDirectives = function (result) {
22817 (_a = result.items).push.apply(_a, SCSSCompletion.scssAtDirectives);
22820 SCSSCompletion.prototype.getCompletionForTopLevel = function (result) {
22821 this.getCompletionForAtDirectives(result);
22822 this.getCompletionForModuleLoaders(result);
22823 _super.prototype.getCompletionForTopLevel.call(this, result);
22826 SCSSCompletion.prototype.getCompletionForModuleLoaders = function (result) {
22828 (_a = result.items).push.apply(_a, SCSSCompletion.scssModuleLoaders);
22831 SCSSCompletion.variableDefaults = {
22836 '$color': '#000000',
22839 '$saturation': '0%',
22840 '$lightness': '0%',
22844 '$substring': '"s"',
22848 SCSSCompletion.colorProposals = [
22849 { func: 'red($color)', desc: localize('scss.builtin.red', 'Gets the red component of a color.') },
22850 { func: 'green($color)', desc: localize('scss.builtin.green', 'Gets the green component of a color.') },
22851 { func: 'blue($color)', desc: localize('scss.builtin.blue', 'Gets the blue component of a color.') },
22852 { func: 'mix($color, $color, [$weight])', desc: localize('scss.builtin.mix', 'Mixes two colors together.') },
22853 { func: 'hue($color)', desc: localize('scss.builtin.hue', 'Gets the hue component of a color.') },
22854 { func: 'saturation($color)', desc: localize('scss.builtin.saturation', 'Gets the saturation component of a color.') },
22855 { func: 'lightness($color)', desc: localize('scss.builtin.lightness', 'Gets the lightness component of a color.') },
22856 { func: 'adjust-hue($color, $degrees)', desc: localize('scss.builtin.adjust-hue', 'Changes the hue of a color.') },
22857 { func: 'lighten($color, $amount)', desc: localize('scss.builtin.lighten', 'Makes a color lighter.') },
22858 { func: 'darken($color, $amount)', desc: localize('scss.builtin.darken', 'Makes a color darker.') },
22859 { func: 'saturate($color, $amount)', desc: localize('scss.builtin.saturate', 'Makes a color more saturated.') },
22860 { func: 'desaturate($color, $amount)', desc: localize('scss.builtin.desaturate', 'Makes a color less saturated.') },
22861 { func: 'grayscale($color)', desc: localize('scss.builtin.grayscale', 'Converts a color to grayscale.') },
22862 { func: 'complement($color)', desc: localize('scss.builtin.complement', 'Returns the complement of a color.') },
22863 { func: 'invert($color)', desc: localize('scss.builtin.invert', 'Returns the inverse of a color.') },
22864 { func: 'alpha($color)', desc: localize('scss.builtin.alpha', 'Gets the opacity component of a color.') },
22865 { func: 'opacity($color)', desc: 'Gets the alpha component (opacity) of a color.' },
22866 { func: 'rgba($color, $alpha)', desc: localize('scss.builtin.rgba', 'Changes the alpha component for a color.') },
22867 { func: 'opacify($color, $amount)', desc: localize('scss.builtin.opacify', 'Makes a color more opaque.') },
22868 { func: 'fade-in($color, $amount)', desc: localize('scss.builtin.fade-in', 'Makes a color more opaque.') },
22869 { func: 'transparentize($color, $amount)', desc: localize('scss.builtin.transparentize', 'Makes a color more transparent.') },
22870 { func: 'fade-out($color, $amount)', desc: localize('scss.builtin.fade-out', 'Makes a color more transparent.') },
22871 { func: 'adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])', desc: localize('scss.builtin.adjust-color', 'Increases or decreases one or more components of a color.') },
22872 { func: 'scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])', desc: localize('scss.builtin.scale-color', 'Fluidly scales one or more properties of a color.') },
22873 { func: 'change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])', desc: localize('scss.builtin.change-color', 'Changes one or more properties of a color.') },
22874 { func: 'ie-hex-str($color)', desc: localize('scss.builtin.ie-hex-str', 'Converts a color into the format understood by IE filters.') }
22876 SCSSCompletion.selectorFuncs = [
22877 { func: 'selector-nest($selectors…)', desc: localize('scss.builtin.selector-nest', 'Nests selector beneath one another like they would be nested in the stylesheet.') },
22878 { func: 'selector-append($selectors…)', desc: localize('scss.builtin.selector-append', 'Appends selectors to one another without spaces in between.') },
22879 { func: 'selector-extend($selector, $extendee, $extender)', desc: localize('scss.builtin.selector-extend', 'Extends $extendee with $extender within $selector.') },
22880 { func: 'selector-replace($selector, $original, $replacement)', desc: localize('scss.builtin.selector-replace', 'Replaces $original with $replacement within $selector.') },
22881 { func: 'selector-unify($selector1, $selector2)', desc: localize('scss.builtin.selector-unify', 'Unifies two selectors to produce a selector that matches elements matched by both.') },
22882 { func: 'is-superselector($super, $sub)', desc: localize('scss.builtin.is-superselector', 'Returns whether $super matches all the elements $sub does, and possibly more.') },
22883 { func: 'simple-selectors($selector)', desc: localize('scss.builtin.simple-selectors', 'Returns the simple selectors that comprise a compound selector.') },
22884 { func: 'selector-parse($selector)', desc: localize('scss.builtin.selector-parse', 'Parses a selector into the format returned by &.') }
22886 SCSSCompletion.builtInFuncs = [
22887 { func: 'unquote($string)', desc: localize('scss.builtin.unquote', 'Removes quotes from a string.') },
22888 { func: 'quote($string)', desc: localize('scss.builtin.quote', 'Adds quotes to a string.') },
22889 { func: 'str-length($string)', desc: localize('scss.builtin.str-length', 'Returns the number of characters in a string.') },
22890 { func: 'str-insert($string, $insert, $index)', desc: localize('scss.builtin.str-insert', 'Inserts $insert into $string at $index.') },
22891 { func: 'str-index($string, $substring)', desc: localize('scss.builtin.str-index', 'Returns the index of the first occurance of $substring in $string.') },
22892 { func: 'str-slice($string, $start-at, [$end-at])', desc: localize('scss.builtin.str-slice', 'Extracts a substring from $string.') },
22893 { func: 'to-upper-case($string)', desc: localize('scss.builtin.to-upper-case', 'Converts a string to upper case.') },
22894 { func: 'to-lower-case($string)', desc: localize('scss.builtin.to-lower-case', 'Converts a string to lower case.') },
22895 { func: 'percentage($number)', desc: localize('scss.builtin.percentage', 'Converts a unitless number to a percentage.'), type: 'percentage' },
22896 { func: 'round($number)', desc: localize('scss.builtin.round', 'Rounds a number to the nearest whole number.') },
22897 { func: 'ceil($number)', desc: localize('scss.builtin.ceil', 'Rounds a number up to the next whole number.') },
22898 { func: 'floor($number)', desc: localize('scss.builtin.floor', 'Rounds a number down to the previous whole number.') },
22899 { func: 'abs($number)', desc: localize('scss.builtin.abs', 'Returns the absolute value of a number.') },
22900 { func: 'min($numbers)', desc: localize('scss.builtin.min', 'Finds the minimum of several numbers.') },
22901 { func: 'max($numbers)', desc: localize('scss.builtin.max', 'Finds the maximum of several numbers.') },
22902 { func: 'random([$limit])', desc: localize('scss.builtin.random', 'Returns a random number.') },
22903 { func: 'length($list)', desc: localize('scss.builtin.length', 'Returns the length of a list.') },
22904 { func: 'nth($list, $n)', desc: localize('scss.builtin.nth', 'Returns a specific item in a list.') },
22905 { func: 'set-nth($list, $n, $value)', desc: localize('scss.builtin.set-nth', 'Replaces the nth item in a list.') },
22906 { func: 'join($list1, $list2, [$separator])', desc: localize('scss.builtin.join', 'Joins together two lists into one.') },
22907 { func: 'append($list1, $val, [$separator])', desc: localize('scss.builtin.append', 'Appends a single value onto the end of a list.') },
22908 { func: 'zip($lists)', desc: localize('scss.builtin.zip', 'Combines several lists into a single multidimensional list.') },
22909 { func: 'index($list, $value)', desc: localize('scss.builtin.index', 'Returns the position of a value within a list.') },
22910 { func: 'list-separator(#list)', desc: localize('scss.builtin.list-separator', 'Returns the separator of a list.') },
22911 { func: 'map-get($map, $key)', desc: localize('scss.builtin.map-get', 'Returns the value in a map associated with a given key.') },
22912 { func: 'map-merge($map1, $map2)', desc: localize('scss.builtin.map-merge', 'Merges two maps together into a new map.') },
22913 { func: 'map-remove($map, $keys)', desc: localize('scss.builtin.map-remove', 'Returns a new map with keys removed.') },
22914 { func: 'map-keys($map)', desc: localize('scss.builtin.map-keys', 'Returns a list of all keys in a map.') },
22915 { func: 'map-values($map)', desc: localize('scss.builtin.map-values', 'Returns a list of all values in a map.') },
22916 { func: 'map-has-key($map, $key)', desc: localize('scss.builtin.map-has-key', 'Returns whether a map has a value associated with a given key.') },
22917 { func: 'keywords($args)', desc: localize('scss.builtin.keywords', 'Returns the keywords passed to a function that takes variable arguments.') },
22918 { func: 'feature-exists($feature)', desc: localize('scss.builtin.feature-exists', 'Returns whether a feature exists in the current Sass runtime.') },
22919 { func: 'variable-exists($name)', desc: localize('scss.builtin.variable-exists', 'Returns whether a variable with the given name exists in the current scope.') },
22920 { func: 'global-variable-exists($name)', desc: localize('scss.builtin.global-variable-exists', 'Returns whether a variable with the given name exists in the global scope.') },
22921 { func: 'function-exists($name)', desc: localize('scss.builtin.function-exists', 'Returns whether a function with the given name exists.') },
22922 { func: 'mixin-exists($name)', desc: localize('scss.builtin.mixin-exists', 'Returns whether a mixin with the given name exists.') },
22923 { func: 'inspect($value)', desc: localize('scss.builtin.inspect', 'Returns the string representation of a value as it would be represented in Sass.') },
22924 { func: 'type-of($value)', desc: localize('scss.builtin.type-of', 'Returns the type of a value.') },
22925 { func: 'unit($number)', desc: localize('scss.builtin.unit', 'Returns the unit(s) associated with a number.') },
22926 { func: 'unitless($number)', desc: localize('scss.builtin.unitless', 'Returns whether a number has units.') },
22927 { func: 'comparable($number1, $number2)', desc: localize('scss.builtin.comparable', 'Returns whether two numbers can be added, subtracted, or compared.') },
22928 { func: 'call($name, $args…)', desc: localize('scss.builtin.call', 'Dynamically calls a Sass function.') }
22930 SCSSCompletion.scssAtDirectives = [
22933 documentation: localize("scss.builtin.@extend", "Inherits the styles of another selector."),
22934 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22938 documentation: localize("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."),
22939 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22943 documentation: localize("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),
22944 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22948 documentation: localize("scss.builtin.@warn", "Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),
22949 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22953 documentation: localize("scss.builtin.@error", "Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),
22954 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22958 documentation: localize("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."),
22959 insertText: "@if ${1:expr} {\n\t$0\n}",
22960 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
22961 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22965 documentation: localize("scss.builtin.@for", "For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),
22966 insertText: "@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",
22967 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
22968 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22972 documentation: localize("scss.builtin.@each", "Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),
22973 insertText: "@each \\$${1:var} in ${2:list} {\n\t$0\n}",
22974 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
22975 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22979 documentation: localize("scss.builtin.@while", "While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),
22980 insertText: "@while ${1:condition} {\n\t$0\n}",
22981 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
22982 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22986 documentation: localize("scss.builtin.@mixin", "Defines styles that can be re-used throughout the stylesheet with `@include`."),
22987 insertText: "@mixin ${1:name} {\n\t$0\n}",
22988 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
22989 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22993 documentation: localize("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."),
22994 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
22997 label: "@function",
22998 documentation: localize("scss.builtin.@function", "Defines complex operations that can be re-used throughout stylesheets."),
22999 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
23002 SCSSCompletion.scssModuleLoaders = [
23005 documentation: localize("scss.builtin.@use", "Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),
23006 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/at-rules/use' }],
23007 insertText: "@use '$0';",
23008 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
23009 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
23013 documentation: localize("scss.builtin.@forward", "Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),
23014 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/at-rules/forward' }],
23015 insertText: "@forward '$0';",
23016 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.InsertTextFormat.Snippet,
23017 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.CompletionItemKind.Keyword
23020 SCSSCompletion.scssModuleBuiltIns = [
23022 label: 'sass:math',
23023 documentation: localize('scss.builtin.sass:math', 'Provides functions that operate on numbers.'),
23024 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/math' }]
23027 label: 'sass:string',
23028 documentation: localize('scss.builtin.sass:string', 'Makes it easy to combine, search, or split apart strings.'),
23029 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/string' }]
23032 label: 'sass:color',
23033 documentation: localize('scss.builtin.sass:color', 'Generates new colors based on existing ones, making it easy to build color themes.'),
23034 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/color' }]
23037 label: 'sass:list',
23038 documentation: localize('scss.builtin.sass:list', 'Lets you access and modify values in lists.'),
23039 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/list' }]
23043 documentation: localize('scss.builtin.sass:map', 'Makes it possible to look up the value associated with a key in a map, and much more.'),
23044 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/map' }]
23047 label: 'sass:selector',
23048 documentation: localize('scss.builtin.sass:selector', 'Provides access to Sass’s powerful selector engine.'),
23049 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/selector' }]
23052 label: 'sass:meta',
23053 documentation: localize('scss.builtin.sass:meta', 'Exposes the details of Sass’s inner workings.'),
23054 references: [{ name: 'Sass documentation', url: 'https://sass-lang.com/documentation/modules/meta' }]
23057 return SCSSCompletion;
23058 }(_cssCompletion__WEBPACK_IMPORTED_MODULE_0__.CSSCompletion));
23061 * Todo @Pine: Remove this and do it through custom data
23063 function addReferencesToDocumentation(items) {
23064 items.forEach(function (i) {
23065 if (i.documentation && i.references && i.references.length > 0) {
23066 var markdownDoc = typeof i.documentation === 'string'
23067 ? { kind: 'markdown', value: i.documentation }
23068 : { kind: 'markdown', value: i.documentation.value };
23069 markdownDoc.value += '\n\n';
23070 markdownDoc.value += i.references
23071 .map(function (r) {
23072 return "[" + r.name + "](" + r.url + ")";
23075 i.documentation = markdownDoc;
23083 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23085 __webpack_require__.r(__webpack_exports__);
23086 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23087 /* harmony export */ "LESSParser": () => /* binding */ LESSParser
23088 /* harmony export */ });
23089 /* harmony import */ var _lessScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(107);
23090 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73);
23091 /* harmony import */ var _cssParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(72);
23092 /* harmony import */ var _cssNodes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74);
23093 /* harmony import */ var _cssErrors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76);
23094 /*---------------------------------------------------------------------------------------------
23095 * Copyright (c) Microsoft Corporation. All rights reserved.
23096 * Licensed under the MIT License. See License.txt in the project root for license information.
23097 *--------------------------------------------------------------------------------------------*/
23099 var __extends = (undefined && undefined.__extends) || (function () {
23100 var extendStatics = function (d, b) {
23101 extendStatics = Object.setPrototypeOf ||
23102 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23103 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
23104 return extendStatics(d, b);
23106 return function (d, b) {
23107 extendStatics(d, b);
23108 function __() { this.constructor = d; }
23109 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23118 /// A parser for LESS
23119 /// http://lesscss.org/
23121 var LESSParser = /** @class */ (function (_super) {
23122 __extends(LESSParser, _super);
23123 function LESSParser() {
23124 return _super.call(this, new _lessScanner__WEBPACK_IMPORTED_MODULE_0__.LESSScanner()) || this;
23126 LESSParser.prototype._parseStylesheetStatement = function (isNested) {
23127 if (isNested === void 0) { isNested = false; }
23128 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
23129 return this._parseVariableDeclaration()
23130 || this._parsePlugin()
23131 || _super.prototype._parseStylesheetAtStatement.call(this, isNested);
23133 return this._tryParseMixinDeclaration()
23134 || this._tryParseMixinReference()
23135 || this._parseFunction()
23136 || this._parseRuleset(true);
23138 LESSParser.prototype._parseImport = function () {
23139 if (!this.peekKeyword('@import') && !this.peekKeyword('@import-once') /* deprecated in less 1.4.1 */) {
23142 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Import);
23143 this.consumeToken();
23144 // less 1.4.1: @import (css) "lib"
23145 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
23146 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident)) {
23147 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.IdentifierExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon]);
23150 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
23153 } while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident));
23154 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23155 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon]);
23158 if (!node.addChild(this._parseURILiteral()) && !node.addChild(this._parseStringLiteral())) {
23159 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.URIOrStringExpected, [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon]);
23161 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
23162 node.setMedialist(this._parseMediaQueryList());
23164 return this.finish(node);
23166 LESSParser.prototype._parsePlugin = function () {
23167 if (!this.peekKeyword('@plugin')) {
23170 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Plugin);
23171 this.consumeToken(); // @import
23172 if (!node.addChild(this._parseStringLiteral())) {
23173 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.StringLiteralExpected);
23175 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
23176 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.SemiColonExpected);
23178 return this.finish(node);
23180 LESSParser.prototype._parseMediaQuery = function (resyncStopToken) {
23181 var node = _super.prototype._parseMediaQuery.call(this, resyncStopToken);
23183 var node_1 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MediaQuery);
23184 if (node_1.addChild(this._parseVariable())) {
23185 return this.finish(node_1);
23191 LESSParser.prototype._parseMediaDeclaration = function (isNested) {
23192 if (isNested === void 0) { isNested = false; }
23193 return this._tryParseRuleset(isNested)
23194 || this._tryToParseDeclaration()
23195 || this._tryParseMixinDeclaration()
23196 || this._tryParseMixinReference()
23197 || this._parseDetachedRuleSetMixin()
23198 || this._parseStylesheetStatement(isNested);
23200 LESSParser.prototype._parseMediaFeatureName = function () {
23201 return this._parseIdent() || this._parseVariable();
23203 LESSParser.prototype._parseVariableDeclaration = function (panic) {
23204 if (panic === void 0) { panic = []; }
23205 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.VariableDeclaration);
23206 var mark = this.mark();
23207 if (!node.setVariable(this._parseVariable(true))) {
23210 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
23211 if (this.prevToken) {
23212 node.colonPosition = this.prevToken.offset;
23214 if (node.setValue(this._parseDetachedRuleSet())) {
23215 node.needsSemicolon = false;
23217 else if (!node.setValue(this._parseExpr())) {
23218 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.VariableValueExpected, [], panic);
23220 node.addChild(this._parsePrio());
23223 this.restoreAtMark(mark);
23224 return null; // at keyword, but no ':', not a variable declaration but some at keyword
23226 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
23227 node.semicolonPosition = this.token.offset; // not part of the declaration, but useful information for code assist
23229 return this.finish(node);
23231 LESSParser.prototype._parseDetachedRuleSet = function () {
23232 var mark = this.mark();
23233 // "Anonymous mixin" used in each() and possibly a generic type in the future
23234 if (this.peekDelim('#') || this.peekDelim('.')) {
23235 this.consumeToken();
23236 if (!this.hasWhitespace() && this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
23237 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinDeclaration);
23238 if (node.getParameters().addChild(this._parseMixinParameter())) {
23239 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
23240 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23243 if (!node.getParameters().addChild(this._parseMixinParameter())) {
23244 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.IdentifierExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
23248 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23249 this.restoreAtMark(mark);
23254 this.restoreAtMark(mark);
23258 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
23261 var content = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.BodyDeclaration);
23262 this._parseBody(content, this._parseDetachedRuleSetBody.bind(this));
23263 return this.finish(content);
23265 LESSParser.prototype._parseDetachedRuleSetBody = function () {
23266 return this._tryParseKeyframeSelector() || this._parseRuleSetDeclaration();
23268 LESSParser.prototype._addLookupChildren = function (node) {
23269 if (!node.addChild(this._parseLookupValue())) {
23272 var expectsValue = false;
23274 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketL)) {
23275 expectsValue = true;
23277 if (!node.addChild(this._parseLookupValue())) {
23280 expectsValue = false;
23282 return !expectsValue;
23284 LESSParser.prototype._parseLookupValue = function () {
23285 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
23286 var mark = this.mark();
23287 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketL)) {
23288 this.restoreAtMark(mark);
23291 if (((node.addChild(this._parseVariable(false, true)) ||
23292 node.addChild(this._parsePropertyIdentifier())) &&
23293 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketR)) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketR)) {
23296 this.restoreAtMark(mark);
23299 LESSParser.prototype._parseVariable = function (declaration, insideLookup) {
23300 if (declaration === void 0) { declaration = false; }
23301 if (insideLookup === void 0) { insideLookup = false; }
23302 var isPropertyReference = !declaration && this.peekDelim('$');
23303 if (!this.peekDelim('@') && !isPropertyReference && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
23306 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Variable);
23307 var mark = this.mark();
23308 while (this.acceptDelim('@') || (!declaration && this.acceptDelim('$'))) {
23309 if (this.hasWhitespace()) {
23310 this.restoreAtMark(mark);
23314 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword) && !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident)) {
23315 this.restoreAtMark(mark);
23318 if (!insideLookup && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketL)) {
23319 if (!this._addLookupChildren(node)) {
23320 this.restoreAtMark(mark);
23326 LESSParser.prototype._parseTermExpression = function () {
23327 return this._parseVariable() ||
23328 this._parseEscaped() ||
23329 _super.prototype._parseTermExpression.call(this) || // preference for colors before mixin references
23330 this._tryParseMixinReference(false);
23332 LESSParser.prototype._parseEscaped = function () {
23333 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EscapedJavaScript) ||
23334 this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BadEscapedJavaScript)) {
23335 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.EscapedValue);
23336 this.consumeToken();
23337 return this.finish(node);
23339 if (this.peekDelim('~')) {
23340 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.EscapedValue);
23341 this.consumeToken();
23342 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.String) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EscapedJavaScript)) {
23343 return this.finish(node);
23346 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.TermExpected);
23351 LESSParser.prototype._parseOperator = function () {
23352 var node = this._parseGuardOperator();
23357 return _super.prototype._parseOperator.call(this);
23360 LESSParser.prototype._parseGuardOperator = function () {
23361 if (this.peekDelim('>')) {
23362 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Operator);
23363 this.consumeToken();
23364 this.acceptDelim('=');
23367 else if (this.peekDelim('=')) {
23368 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Operator);
23369 this.consumeToken();
23370 this.acceptDelim('<');
23373 else if (this.peekDelim('<')) {
23374 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Operator);
23375 this.consumeToken();
23376 this.acceptDelim('=');
23381 LESSParser.prototype._parseRuleSetDeclaration = function () {
23382 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
23383 return this._parseKeyframe()
23384 || this._parseMedia(true)
23385 || this._parseImport()
23386 || this._parseSupports(true) // @supports
23387 || this._parseDetachedRuleSetMixin() // less detached ruleset mixin
23388 || this._parseVariableDeclaration() // Variable declarations
23389 || _super.prototype._parseRuleSetDeclarationAtStatement.call(this);
23391 return this._tryParseMixinDeclaration()
23392 || this._tryParseRuleset(true) // nested ruleset
23393 || this._tryParseMixinReference() // less mixin reference
23394 || this._parseFunction()
23395 || this._parseExtend() // less extend declaration
23396 || _super.prototype._parseRuleSetDeclaration.call(this); // try css ruleset declaration as the last option
23398 LESSParser.prototype._parseKeyframeIdent = function () {
23399 return this._parseIdent([_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Keyframe]) || this._parseVariable();
23401 LESSParser.prototype._parseKeyframeSelector = function () {
23402 return this._parseDetachedRuleSetMixin() // less detached ruleset mixin
23403 || _super.prototype._parseKeyframeSelector.call(this);
23405 LESSParser.prototype._parseSimpleSelectorBody = function () {
23406 return this._parseSelectorCombinator() || _super.prototype._parseSimpleSelectorBody.call(this);
23408 LESSParser.prototype._parseSelector = function (isNested) {
23410 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Selector);
23411 var hasContent = false;
23413 // nested selectors can start with a combinator
23414 hasContent = node.addChild(this._parseCombinator());
23416 while (node.addChild(this._parseSimpleSelector())) {
23418 var mark = this.mark();
23419 if (node.addChild(this._parseGuard()) && this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
23422 this.restoreAtMark(mark);
23423 node.addChild(this._parseCombinator()); // optional
23425 return hasContent ? this.finish(node) : null;
23427 LESSParser.prototype._parseSelectorCombinator = function () {
23428 if (this.peekDelim('&')) {
23429 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorCombinator);
23430 this.consumeToken();
23431 while (!this.hasWhitespace() && (this.acceptDelim('-') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Num) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Dimension) || node.addChild(this._parseIdent()) || this.acceptDelim('&'))) {
23434 return this.finish(node);
23438 LESSParser.prototype._parseSelectorIdent = function () {
23439 if (!this.peekInterpolatedIdent()) {
23442 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.SelectorInterpolation);
23443 var hasContent = this._acceptInterpolatedIdent(node);
23444 return hasContent ? this.finish(node) : null;
23446 LESSParser.prototype._parsePropertyIdentifier = function (inLookup) {
23447 if (inLookup === void 0) { inLookup = false; }
23448 var propertyRegex = /^[\w-]+/;
23449 if (!this.peekInterpolatedIdent() && !this.peekRegExp(this.token.type, propertyRegex)) {
23452 var mark = this.mark();
23453 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
23454 node.isCustomProperty = this.acceptDelim('-') && this.acceptDelim('-');
23455 var childAdded = false;
23457 if (node.isCustomProperty) {
23458 childAdded = this._acceptInterpolatedIdent(node);
23461 childAdded = this._acceptInterpolatedIdent(node, propertyRegex);
23465 if (node.isCustomProperty) {
23466 childAdded = node.addChild(this._parseIdent());
23469 childAdded = node.addChild(this._parseRegexp(propertyRegex));
23473 this.restoreAtMark(mark);
23476 if (!inLookup && !this.hasWhitespace()) {
23477 this.acceptDelim('+');
23478 if (!this.hasWhitespace()) {
23479 this.acceptIdent('_');
23482 return this.finish(node);
23484 LESSParser.prototype.peekInterpolatedIdent = function () {
23485 return this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident) ||
23486 this.peekDelim('@') ||
23487 this.peekDelim('$') ||
23488 this.peekDelim('-');
23490 LESSParser.prototype._acceptInterpolatedIdent = function (node, identRegex) {
23492 var hasContent = false;
23493 var indentInterpolation = function () {
23494 var pos = _this.mark();
23495 if (_this.acceptDelim('-')) {
23496 if (!_this.hasWhitespace()) {
23497 _this.acceptDelim('-');
23499 if (_this.hasWhitespace()) {
23500 _this.restoreAtMark(pos);
23504 return _this._parseInterpolation();
23506 var accept = identRegex ?
23507 function () { return _this.acceptRegexp(identRegex); } :
23508 function () { return _this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Ident); };
23510 node.addChild(this._parseInterpolation() ||
23511 this.try(indentInterpolation))) {
23513 if (this.hasWhitespace()) {
23519 LESSParser.prototype._parseInterpolation = function () {
23520 // @{name} Variable or
23521 // ${name} Property
23522 var mark = this.mark();
23523 if (this.peekDelim('@') || this.peekDelim('$')) {
23524 var node = this.createNode(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.NodeType.Interpolation);
23525 this.consumeToken();
23526 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
23527 this.restoreAtMark(mark);
23530 if (!node.addChild(this._parseIdent())) {
23531 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.IdentifierExpected);
23533 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR)) {
23534 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightCurlyExpected);
23536 return this.finish(node);
23540 LESSParser.prototype._tryParseMixinDeclaration = function () {
23541 var mark = this.mark();
23542 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinDeclaration);
23543 if (!node.setIdentifier(this._parseMixinDeclarationIdentifier()) || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
23544 this.restoreAtMark(mark);
23547 if (node.getParameters().addChild(this._parseMixinParameter())) {
23548 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
23549 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23552 if (!node.getParameters().addChild(this._parseMixinParameter())) {
23553 this.markError(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.IdentifierExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
23557 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23558 this.restoreAtMark(mark);
23561 node.setGuard(this._parseGuard());
23562 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyL)) {
23563 this.restoreAtMark(mark);
23566 return this._parseBody(node, this._parseMixInBodyDeclaration.bind(this));
23568 LESSParser.prototype._parseMixInBodyDeclaration = function () {
23569 return this._parseFontFace() || this._parseRuleSetDeclaration();
23571 LESSParser.prototype._parseMixinDeclarationIdentifier = function () {
23573 if (this.peekDelim('#') || this.peekDelim('.')) {
23574 identifier = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
23575 this.consumeToken(); // # or .
23576 if (this.hasWhitespace() || !identifier.addChild(this._parseIdent())) {
23580 else if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Hash)) {
23581 identifier = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
23582 this.consumeToken(); // TokenType.Hash
23587 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin];
23588 return this.finish(identifier);
23590 LESSParser.prototype._parsePseudo = function () {
23591 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
23594 var mark = this.mark();
23595 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ExtendsReference);
23596 this.consumeToken(); // :
23597 if (this.acceptIdent('extend')) {
23598 return this._completeExtends(node);
23600 this.restoreAtMark(mark);
23601 return _super.prototype._parsePseudo.call(this);
23603 LESSParser.prototype._parseExtend = function () {
23604 if (!this.peekDelim('&')) {
23607 var mark = this.mark();
23608 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ExtendsReference);
23609 this.consumeToken(); // &
23610 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon) || !this.acceptIdent('extend')) {
23611 this.restoreAtMark(mark);
23614 return this._completeExtends(node);
23616 LESSParser.prototype._completeExtends = function (node) {
23617 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
23618 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.LeftParenthesisExpected);
23620 var selectors = node.getSelectors();
23621 if (!selectors.addChild(this._parseSelector(true))) {
23622 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.SelectorExpected);
23624 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
23625 if (!selectors.addChild(this._parseSelector(true))) {
23626 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.SelectorExpected);
23629 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23630 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
23632 return this.finish(node);
23634 LESSParser.prototype._parseDetachedRuleSetMixin = function () {
23635 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.AtKeyword)) {
23638 var mark = this.mark();
23639 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinReference);
23640 if (node.addChild(this._parseVariable(true)) && (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL))) {
23641 this.restoreAtMark(mark);
23644 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23645 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
23647 return this.finish(node);
23649 LESSParser.prototype._tryParseMixinReference = function (atRoot) {
23650 if (atRoot === void 0) { atRoot = true; }
23651 var mark = this.mark();
23652 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.MixinReference);
23653 var identifier = this._parseMixinDeclarationIdentifier();
23654 while (identifier) {
23655 this.acceptDelim('>');
23656 var nextId = this._parseMixinDeclarationIdentifier();
23658 node.getNamespaces().addChild(identifier);
23659 identifier = nextId;
23665 if (!node.setIdentifier(identifier)) {
23666 this.restoreAtMark(mark);
23669 var hasArguments = false;
23670 if (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
23671 hasArguments = true;
23672 if (node.getArguments().addChild(this._parseMixinArgument())) {
23673 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
23674 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23677 if (!node.getArguments().addChild(this._parseMixinArgument())) {
23678 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.ExpressionExpected);
23682 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23683 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
23685 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin];
23688 identifier.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Mixin, _cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Rule];
23690 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.BracketL)) {
23692 this._addLookupChildren(node);
23696 node.addChild(this._parsePrio());
23698 if (!hasArguments && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.CurlyR) && !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOF)) {
23699 this.restoreAtMark(mark);
23702 return this.finish(node);
23704 LESSParser.prototype._parseMixinArgument = function () {
23705 // [variableName ':'] expression | variableName '...'
23706 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionArgument);
23707 var pos = this.mark();
23708 var argument = this._parseVariable();
23710 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon)) {
23711 this.restoreAtMark(pos);
23714 node.setIdentifier(argument);
23717 if (node.setValue(this._parseDetachedRuleSet() || this._parseExpr(true))) {
23718 return this.finish(node);
23720 this.restoreAtMark(pos);
23723 LESSParser.prototype._parseMixinParameter = function () {
23724 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.FunctionParameter);
23725 // special rest variable: @rest...
23726 if (this.peekKeyword('@rest')) {
23727 var restNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
23728 this.consumeToken();
23729 if (!this.accept(_lessScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis)) {
23730 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.DotExpected, [], [_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma, _cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR]);
23732 node.setIdentifier(this.finish(restNode));
23733 return this.finish(node);
23735 // special const args: ...
23736 if (this.peek(_lessScanner__WEBPACK_IMPORTED_MODULE_0__.Ellipsis)) {
23737 var varargsNode = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
23738 this.consumeToken();
23739 node.setIdentifier(this.finish(varargsNode));
23740 return this.finish(node);
23742 var hasContent = false;
23743 // default variable declaration: @param: 12 or @name
23744 if (node.setIdentifier(this._parseVariable())) {
23745 this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Colon);
23748 if (!node.setDefaultValue(this._parseDetachedRuleSet() || this._parseExpr(true)) && !hasContent) {
23751 return this.finish(node);
23753 LESSParser.prototype._parseGuard = function () {
23754 if (!this.peekIdent('when')) {
23757 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.LessGuard);
23758 this.consumeToken(); // when
23759 node.isNegated = this.acceptIdent('not');
23760 if (!node.getConditions().addChild(this._parseGuardCondition())) {
23761 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.ConditionExpected);
23763 while (this.acceptIdent('and') || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma)) {
23764 if (!node.getConditions().addChild(this._parseGuardCondition())) {
23765 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.ConditionExpected);
23768 return this.finish(node);
23770 LESSParser.prototype._parseGuardCondition = function () {
23771 if (!this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
23774 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.GuardCondition);
23775 this.consumeToken(); // ParenthesisL
23776 if (!node.addChild(this._parseExpr())) {
23779 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23780 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
23782 return this.finish(node);
23784 LESSParser.prototype._parseFunction = function () {
23785 var pos = this.mark();
23786 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Function);
23787 if (!node.setIdentifier(this._parseFunctionIdentifier())) {
23790 if (this.hasWhitespace() || !this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisL)) {
23791 this.restoreAtMark(pos);
23794 if (node.getArguments().addChild(this._parseMixinArgument())) {
23795 while (this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comma) || this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.SemiColon)) {
23796 if (this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23799 if (!node.getArguments().addChild(this._parseMixinArgument())) {
23800 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.ExpressionExpected);
23804 if (!this.accept(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23805 return this.finish(node, _cssErrors__WEBPACK_IMPORTED_MODULE_4__.ParseError.RightParenthesisExpected);
23807 return this.finish(node);
23809 LESSParser.prototype._parseFunctionIdentifier = function () {
23810 if (this.peekDelim('%')) {
23811 var node = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Identifier);
23812 node.referenceTypes = [_cssNodes__WEBPACK_IMPORTED_MODULE_3__.ReferenceType.Function];
23813 this.consumeToken();
23814 return this.finish(node);
23816 return _super.prototype._parseFunctionIdentifier.call(this);
23818 LESSParser.prototype._parseURLArgument = function () {
23819 var pos = this.mark();
23820 var node = _super.prototype._parseURLArgument.call(this);
23821 if (!node || !this.peek(_cssScanner__WEBPACK_IMPORTED_MODULE_1__.TokenType.ParenthesisR)) {
23822 this.restoreAtMark(pos);
23823 var node_2 = this.create(_cssNodes__WEBPACK_IMPORTED_MODULE_3__.Node);
23824 node_2.addChild(this._parseBinaryExpr());
23825 return this.finish(node_2);
23830 }(_cssParser__WEBPACK_IMPORTED_MODULE_2__.Parser));
23836 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23838 __webpack_require__.r(__webpack_exports__);
23839 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23840 /* harmony export */ "Ellipsis": () => /* binding */ Ellipsis,
23841 /* harmony export */ "LESSScanner": () => /* binding */ LESSScanner
23842 /* harmony export */ });
23843 /* harmony import */ var _cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
23844 /*---------------------------------------------------------------------------------------------
23845 * Copyright (c) Microsoft Corporation. All rights reserved.
23846 * Licensed under the MIT License. See License.txt in the project root for license information.
23847 *--------------------------------------------------------------------------------------------*/
23849 var __extends = (undefined && undefined.__extends) || (function () {
23850 var extendStatics = function (d, b) {
23851 extendStatics = Object.setPrototypeOf ||
23852 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23853 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
23854 return extendStatics(d, b);
23856 return function (d, b) {
23857 extendStatics(d, b);
23858 function __() { this.constructor = d; }
23859 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23863 var _FSL = '/'.charCodeAt(0);
23864 var _NWL = '\n'.charCodeAt(0);
23865 var _CAR = '\r'.charCodeAt(0);
23866 var _LFD = '\f'.charCodeAt(0);
23867 var _TIC = '`'.charCodeAt(0);
23868 var _DOT = '.'.charCodeAt(0);
23869 var customTokenValue = _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CustomToken;
23870 var Ellipsis = customTokenValue++;
23871 var LESSScanner = /** @class */ (function (_super) {
23872 __extends(LESSScanner, _super);
23873 function LESSScanner() {
23874 return _super !== null && _super.apply(this, arguments) || this;
23876 LESSScanner.prototype.scanNext = function (offset) {
23877 // LESS: escaped JavaScript code `const a = "dddd"`
23878 var tokenType = this.escapedJavaScript();
23879 if (tokenType !== null) {
23880 return this.finishToken(offset, tokenType);
23882 if (this.stream.advanceIfChars([_DOT, _DOT, _DOT])) {
23883 return this.finishToken(offset, Ellipsis);
23885 return _super.prototype.scanNext.call(this, offset);
23887 LESSScanner.prototype.comment = function () {
23888 if (_super.prototype.comment.call(this)) {
23891 if (!this.inURL && this.stream.advanceIfChars([_FSL, _FSL])) {
23892 this.stream.advanceWhileChar(function (ch) {
23908 LESSScanner.prototype.escapedJavaScript = function () {
23909 var ch = this.stream.peekChar();
23911 this.stream.advance(1);
23912 this.stream.advanceWhileChar(function (ch) { return ch !== _TIC; });
23913 return this.stream.advanceIfChar(_TIC) ? _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EscapedJavaScript : _cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.BadEscapedJavaScript;
23917 return LESSScanner;
23918 }(_cssScanner__WEBPACK_IMPORTED_MODULE_0__.Scanner));
23924 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23926 __webpack_require__.r(__webpack_exports__);
23927 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23928 /* harmony export */ "LESSCompletion": () => /* binding */ LESSCompletion
23929 /* harmony export */ });
23930 /* harmony import */ var _cssCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
23931 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88);
23932 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77);
23933 /*---------------------------------------------------------------------------------------------
23934 * Copyright (c) Microsoft Corporation. All rights reserved.
23935 * Licensed under the MIT License. See License.txt in the project root for license information.
23936 *--------------------------------------------------------------------------------------------*/
23938 var __extends = (undefined && undefined.__extends) || (function () {
23939 var extendStatics = function (d, b) {
23940 extendStatics = Object.setPrototypeOf ||
23941 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23942 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
23943 return extendStatics(d, b);
23945 return function (d, b) {
23946 extendStatics(d, b);
23947 function __() { this.constructor = d; }
23948 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23954 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_2__.loadMessageBundle();
23955 var LESSCompletion = /** @class */ (function (_super) {
23956 __extends(LESSCompletion, _super);
23957 function LESSCompletion(lsOptions, cssDataManager) {
23958 return _super.call(this, '@', lsOptions, cssDataManager) || this;
23960 LESSCompletion.prototype.createFunctionProposals = function (proposals, existingNode, sortToEnd, result) {
23961 for (var _i = 0, proposals_1 = proposals; _i < proposals_1.length; _i++) {
23962 var p = proposals_1[_i];
23966 documentation: p.description,
23967 textEdit: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(this.getCompletionRange(existingNode), p.name + '($0)'),
23968 insertTextFormat: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.Snippet,
23969 kind: _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Function
23972 item.sortText = 'z';
23974 result.items.push(item);
23978 LESSCompletion.prototype.getTermProposals = function (entry, existingNode, result) {
23979 var functions = LESSCompletion.builtInProposals;
23981 functions = functions.filter(function (f) { return !f.type || !entry.restrictions || entry.restrictions.indexOf(f.type) !== -1; });
23983 this.createFunctionProposals(functions, existingNode, true, result);
23984 return _super.prototype.getTermProposals.call(this, entry, existingNode, result);
23986 LESSCompletion.prototype.getColorProposals = function (entry, existingNode, result) {
23987 this.createFunctionProposals(LESSCompletion.colorProposals, existingNode, false, result);
23988 return _super.prototype.getColorProposals.call(this, entry, existingNode, result);
23990 LESSCompletion.prototype.getCompletionsForDeclarationProperty = function (declaration, result) {
23991 this.getCompletionsForSelector(null, true, result);
23992 return _super.prototype.getCompletionsForDeclarationProperty.call(this, declaration, result);
23994 LESSCompletion.builtInProposals = [
23995 // Boolean functions
23998 'example': 'if(condition, trueValue [, falseValue]);',
23999 'description': localize('less.builtin.if', 'returns one of two values depending on a condition.')
24003 'example': 'boolean(condition);',
24004 'description': localize('less.builtin.boolean', '"store" a boolean test for later evaluation in a guard or if().')
24009 'example': 'length(@list);',
24010 'description': localize('less.builtin.length', 'returns the number of elements in a value list')
24014 'example': 'extract(@list, index);',
24015 'description': localize('less.builtin.extract', 'returns a value at the specified position in the list')
24019 'example': 'range([start, ] end [, step]);',
24020 'description': localize('less.builtin.range', 'generate a list spanning a range of values')
24024 'example': 'each(@list, ruleset);',
24025 'description': localize('less.builtin.each', 'bind the evaluation of a ruleset to each member of a list.')
24030 'example': 'escape(@string);',
24031 'description': localize('less.builtin.escape', 'URL encodes a string')
24035 'example': 'e(@string);',
24036 'description': localize('less.builtin.e', 'escape string content')
24040 'example': 'replace(@string, @pattern, @replacement[, @flags]);',
24041 'description': localize('less.builtin.replace', 'string replace')
24045 'example': 'unit(@dimension, [@unit: \'\']);',
24046 'description': localize('less.builtin.unit', 'remove or change the unit of a dimension')
24050 'example': 'color(@string);',
24051 'description': localize('less.builtin.color', 'parses a string to a color'),
24056 'example': 'convert(@value, unit);',
24057 'description': localize('less.builtin.convert', 'converts numbers from one type into another')
24060 'name': 'data-uri',
24061 'example': 'data-uri([mimetype,] url);',
24062 'description': localize('less.builtin.data-uri', 'inlines a resource and falls back to `url()`'),
24067 'description': localize('less.builtin.abs', 'absolute value of a number'),
24068 'example': 'abs(number);'
24072 'description': localize('less.builtin.acos', 'arccosine - inverse of cosine function'),
24073 'example': 'acos(number);'
24077 'description': localize('less.builtin.asin', 'arcsine - inverse of sine function'),
24078 'example': 'asin(number);'
24082 'example': 'ceil(@number);',
24083 'description': localize('less.builtin.ceil', 'rounds up to an integer')
24087 'description': localize('less.builtin.cos', 'cosine function'),
24088 'example': 'cos(number);'
24092 'description': localize('less.builtin.floor', 'rounds down to an integer'),
24093 'example': 'floor(@number);'
24096 'name': 'percentage',
24097 'description': localize('less.builtin.percentage', 'converts to a %, e.g. 0.5 > 50%'),
24098 'example': 'percentage(@number);',
24099 'type': 'percentage'
24103 'description': localize('less.builtin.round', 'rounds a number to a number of places'),
24104 'example': 'round(number, [places: 0]);'
24108 'description': localize('less.builtin.sqrt', 'calculates square root of a number'),
24109 'example': 'sqrt(number);'
24113 'description': localize('less.builtin.sin', 'sine function'),
24114 'example': 'sin(number);'
24118 'description': localize('less.builtin.tan', 'tangent function'),
24119 'example': 'tan(number);'
24123 'description': localize('less.builtin.atan', 'arctangent - inverse of tangent function'),
24124 'example': 'atan(number);'
24128 'description': localize('less.builtin.pi', 'returns pi'),
24133 'description': localize('less.builtin.pow', 'first argument raised to the power of the second argument'),
24134 'example': 'pow(@base, @exponent);'
24138 'description': localize('less.builtin.mod', 'first argument modulus second argument'),
24139 'example': 'mod(number, number);'
24143 'description': localize('less.builtin.min', 'returns the lowest of one or more values'),
24144 'example': 'min(@x, @y);'
24148 'description': localize('less.builtin.max', 'returns the lowest of one or more values'),
24149 'example': 'max(@x, @y);'
24152 LESSCompletion.colorProposals = [
24155 'example': 'argb(@color);',
24156 'description': localize('less.builtin.argb', 'creates a #AARRGGBB')
24160 'example': 'hsl(@hue, @saturation, @lightness);',
24161 'description': localize('less.builtin.hsl', 'creates a color')
24165 'example': 'hsla(@hue, @saturation, @lightness, @alpha);',
24166 'description': localize('less.builtin.hsla', 'creates a color')
24170 'example': 'hsv(@hue, @saturation, @value);',
24171 'description': localize('less.builtin.hsv', 'creates a color')
24175 'example': 'hsva(@hue, @saturation, @value, @alpha);',
24176 'description': localize('less.builtin.hsva', 'creates a color')
24180 'example': 'hue(@color);',
24181 'description': localize('less.builtin.hue', 'returns the `hue` channel of `@color` in the HSL space')
24184 'name': 'saturation',
24185 'example': 'saturation(@color);',
24186 'description': localize('less.builtin.saturation', 'returns the `saturation` channel of `@color` in the HSL space')
24189 'name': 'lightness',
24190 'example': 'lightness(@color);',
24191 'description': localize('less.builtin.lightness', 'returns the `lightness` channel of `@color` in the HSL space')
24195 'example': 'hsvhue(@color);',
24196 'description': localize('less.builtin.hsvhue', 'returns the `hue` channel of `@color` in the HSV space')
24199 'name': 'hsvsaturation',
24200 'example': 'hsvsaturation(@color);',
24201 'description': localize('less.builtin.hsvsaturation', 'returns the `saturation` channel of `@color` in the HSV space')
24204 'name': 'hsvvalue',
24205 'example': 'hsvvalue(@color);',
24206 'description': localize('less.builtin.hsvvalue', 'returns the `value` channel of `@color` in the HSV space')
24210 'example': 'red(@color);',
24211 'description': localize('less.builtin.red', 'returns the `red` channel of `@color`')
24215 'example': 'green(@color);',
24216 'description': localize('less.builtin.green', 'returns the `green` channel of `@color`')
24220 'example': 'blue(@color);',
24221 'description': localize('less.builtin.blue', 'returns the `blue` channel of `@color`')
24225 'example': 'alpha(@color);',
24226 'description': localize('less.builtin.alpha', 'returns the `alpha` channel of `@color`')
24230 'example': 'luma(@color);',
24231 'description': localize('less.builtin.luma', 'returns the `luma` value (perceptual brightness) of `@color`')
24234 'name': 'saturate',
24235 'example': 'saturate(@color, 10%);',
24236 'description': localize('less.builtin.saturate', 'return `@color` 10% points more saturated')
24239 'name': 'desaturate',
24240 'example': 'desaturate(@color, 10%);',
24241 'description': localize('less.builtin.desaturate', 'return `@color` 10% points less saturated')
24245 'example': 'lighten(@color, 10%);',
24246 'description': localize('less.builtin.lighten', 'return `@color` 10% points lighter')
24250 'example': 'darken(@color, 10%);',
24251 'description': localize('less.builtin.darken', 'return `@color` 10% points darker')
24255 'example': 'fadein(@color, 10%);',
24256 'description': localize('less.builtin.fadein', 'return `@color` 10% points less transparent')
24260 'example': 'fadeout(@color, 10%);',
24261 'description': localize('less.builtin.fadeout', 'return `@color` 10% points more transparent')
24265 'example': 'fade(@color, 50%);',
24266 'description': localize('less.builtin.fade', 'return `@color` with 50% transparency')
24270 'example': 'spin(@color, 10);',
24271 'description': localize('less.builtin.spin', 'return `@color` with a 10 degree larger in hue')
24275 'example': 'mix(@color1, @color2, [@weight: 50%]);',
24276 'description': localize('less.builtin.mix', 'return a mix of `@color1` and `@color2`')
24279 'name': 'greyscale',
24280 'example': 'greyscale(@color);',
24281 'description': localize('less.builtin.greyscale', 'returns a grey, 100% desaturated color'),
24284 'name': 'contrast',
24285 'example': 'contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);',
24286 'description': localize('less.builtin.contrast', 'return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes')
24289 'name': 'multiply',
24290 'example': 'multiply(@color1, @color2);'
24294 'example': 'screen(@color1, @color2);'
24298 'example': 'overlay(@color1, @color2);'
24301 'name': 'softlight',
24302 'example': 'softlight(@color1, @color2);'
24305 'name': 'hardlight',
24306 'example': 'hardlight(@color1, @color2);'
24309 'name': 'difference',
24310 'example': 'difference(@color1, @color2);'
24313 'name': 'exclusion',
24314 'example': 'exclusion(@color1, @color2);'
24318 'example': 'average(@color1, @color2);'
24321 'name': 'negation',
24322 'example': 'negation(@color1, @color2);'
24325 return LESSCompletion;
24326 }(_cssCompletion__WEBPACK_IMPORTED_MODULE_0__.CSSCompletion));
24332 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24334 __webpack_require__.r(__webpack_exports__);
24335 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24336 /* harmony export */ "getFoldingRanges": () => /* binding */ getFoldingRanges
24337 /* harmony export */ });
24338 /* harmony import */ var _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
24339 /* harmony import */ var _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(103);
24340 /* harmony import */ var _parser_lessScanner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(107);
24341 /*---------------------------------------------------------------------------------------------
24342 * Copyright (c) Microsoft Corporation. All rights reserved.
24343 * Licensed under the MIT License. See License.txt in the project root for license information.
24344 *--------------------------------------------------------------------------------------------*/
24349 function getFoldingRanges(document, context) {
24350 var ranges = computeFoldingRanges(document);
24351 return limitFoldingRanges(ranges, context);
24353 function computeFoldingRanges(document) {
24354 function getStartLine(t) {
24355 return document.positionAt(t.offset).line;
24357 function getEndLine(t) {
24358 return document.positionAt(t.offset + t.len).line;
24360 function getScanner() {
24361 switch (document.languageId) {
24363 return new _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__.SCSSScanner();
24365 return new _parser_lessScanner__WEBPACK_IMPORTED_MODULE_2__.LESSScanner();
24367 return new _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.Scanner();
24370 function tokenToRange(t, kind) {
24371 var startLine = getStartLine(t);
24372 var endLine = getEndLine(t);
24373 if (startLine !== endLine) {
24375 startLine: startLine,
24385 var delimiterStack = [];
24386 var scanner = getScanner();
24387 scanner.ignoreComment = false;
24388 scanner.setSource(document.getText());
24389 var token = scanner.scan();
24390 var prevToken = null;
24391 var _loop_1 = function () {
24392 switch (token.type) {
24393 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyL:
24394 case _parser_scssScanner__WEBPACK_IMPORTED_MODULE_1__.InterpolationFunction:
24396 delimiterStack.push({ line: getStartLine(token), type: 'brace', isStart: true });
24399 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.CurlyR: {
24400 if (delimiterStack.length !== 0) {
24401 var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'brace');
24402 if (!prevDelimiter) {
24405 var endLine = getEndLine(token);
24406 if (prevDelimiter.type === 'brace') {
24408 * Other than the case when curly brace is not on a new line by itself, for example
24411 * Use endLine minus one to show ending curly brace
24413 if (prevToken && getEndLine(prevToken) !== endLine) {
24416 if (prevDelimiter.line !== endLine) {
24418 startLine: prevDelimiter.line,
24428 * In CSS, there is no single line comment prefixed with //
24429 * All comments are marked as `Comment`
24431 case _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comment: {
24432 var commentRegionMarkerToDelimiter_1 = function (marker) {
24433 if (marker === '#region') {
24434 return { line: getStartLine(token), type: 'comment', isStart: true };
24437 return { line: getEndLine(token), type: 'comment', isStart: false };
24440 var getCurrDelimiter = function (token) {
24441 var matches = token.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);
24443 return commentRegionMarkerToDelimiter_1(matches[1]);
24445 else if (document.languageId === 'scss' || document.languageId === 'less') {
24446 var matches_1 = token.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);
24448 return commentRegionMarkerToDelimiter_1(matches_1[1]);
24453 var currDelimiter = getCurrDelimiter(token);
24454 // /* */ comment region folding
24455 // All #region and #endregion cases
24456 if (currDelimiter) {
24457 if (currDelimiter.isStart) {
24458 delimiterStack.push(currDelimiter);
24461 var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'comment');
24462 if (!prevDelimiter) {
24465 if (prevDelimiter.type === 'comment') {
24466 if (prevDelimiter.line !== currDelimiter.line) {
24468 startLine: prevDelimiter.line,
24469 endLine: currDelimiter.line,
24476 // Multiline comment case
24478 var range = tokenToRange(token, 'comment');
24480 ranges.push(range);
24487 token = scanner.scan();
24489 while (token.type !== _parser_cssScanner__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOF) {
24494 function popPrevStartDelimiterOfType(stack, type) {
24495 if (stack.length === 0) {
24498 for (var i = stack.length - 1; i >= 0; i--) {
24499 if (stack[i].type === type && stack[i].isStart) {
24500 return stack.splice(i, 1)[0];
24507 * - Remove invalid regions (intersections)
24508 * - If limit exceeds, only return `rangeLimit` amount of ranges
24510 function limitFoldingRanges(ranges, context) {
24511 var maxRanges = context && context.rangeLimit || Number.MAX_VALUE;
24512 var sortedRanges = ranges.sort(function (r1, r2) {
24513 var diff = r1.startLine - r2.startLine;
24515 diff = r1.endLine - r2.endLine;
24519 var validRanges = [];
24520 var prevEndLine = -1;
24521 sortedRanges.forEach(function (r) {
24522 if (!(r.startLine < prevEndLine && prevEndLine < r.endLine)) {
24523 validRanges.push(r);
24524 prevEndLine = r.endLine;
24527 if (validRanges.length < maxRanges) {
24528 return validRanges;
24531 return validRanges.slice(0, maxRanges);
24538 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24540 __webpack_require__.r(__webpack_exports__);
24541 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24542 /* harmony export */ "CSSDataManager": () => /* binding */ CSSDataManager
24543 /* harmony export */ });
24544 /* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84);
24545 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(111);
24546 /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(112);
24547 /*---------------------------------------------------------------------------------------------
24548 * Copyright (c) Microsoft Corporation. All rights reserved.
24549 * Licensed under the MIT License. See License.txt in the project root for license information.
24550 *--------------------------------------------------------------------------------------------*/
24555 var CSSDataManager = /** @class */ (function () {
24556 function CSSDataManager(options) {
24557 this.dataProviders = [];
24558 this._propertySet = {};
24559 this._atDirectiveSet = {};
24560 this._pseudoClassSet = {};
24561 this._pseudoElementSet = {};
24562 this._properties = [];
24563 this._atDirectives = [];
24564 this._pseudoClasses = [];
24565 this._pseudoElements = [];
24566 this.setDataProviders((options === null || options === void 0 ? void 0 : options.useDefaultDataProvider) !== false, (options === null || options === void 0 ? void 0 : options.customDataProviders) || []);
24568 CSSDataManager.prototype.setDataProviders = function (builtIn, providers) {
24570 this.dataProviders = [];
24572 this.dataProviders.push(new _dataProvider__WEBPACK_IMPORTED_MODULE_2__.CSSDataProvider(_data_webCustomData__WEBPACK_IMPORTED_MODULE_1__.cssData));
24574 (_a = this.dataProviders).push.apply(_a, providers);
24575 this.collectData();
24578 * Collect all data & handle duplicates
24580 CSSDataManager.prototype.collectData = function () {
24582 this._propertySet = {};
24583 this._atDirectiveSet = {};
24584 this._pseudoClassSet = {};
24585 this._pseudoElementSet = {};
24586 this.dataProviders.forEach(function (provider) {
24587 provider.provideProperties().forEach(function (p) {
24588 if (!_this._propertySet[p.name]) {
24589 _this._propertySet[p.name] = p;
24592 provider.provideAtDirectives().forEach(function (p) {
24593 if (!_this._atDirectiveSet[p.name]) {
24594 _this._atDirectiveSet[p.name] = p;
24597 provider.providePseudoClasses().forEach(function (p) {
24598 if (!_this._pseudoClassSet[p.name]) {
24599 _this._pseudoClassSet[p.name] = p;
24602 provider.providePseudoElements().forEach(function (p) {
24603 if (!_this._pseudoElementSet[p.name]) {
24604 _this._pseudoElementSet[p.name] = p;
24608 this._properties = _utils_objects__WEBPACK_IMPORTED_MODULE_0__.values(this._propertySet);
24609 this._atDirectives = _utils_objects__WEBPACK_IMPORTED_MODULE_0__.values(this._atDirectiveSet);
24610 this._pseudoClasses = _utils_objects__WEBPACK_IMPORTED_MODULE_0__.values(this._pseudoClassSet);
24611 this._pseudoElements = _utils_objects__WEBPACK_IMPORTED_MODULE_0__.values(this._pseudoElementSet);
24613 CSSDataManager.prototype.getProperty = function (name) { return this._propertySet[name]; };
24614 CSSDataManager.prototype.getAtDirective = function (name) { return this._atDirectiveSet[name]; };
24615 CSSDataManager.prototype.getPseudoClass = function (name) { return this._pseudoClassSet[name]; };
24616 CSSDataManager.prototype.getPseudoElement = function (name) { return this._pseudoElementSet[name]; };
24617 CSSDataManager.prototype.getProperties = function () {
24618 return this._properties;
24620 CSSDataManager.prototype.getAtDirectives = function () {
24621 return this._atDirectives;
24623 CSSDataManager.prototype.getPseudoClasses = function () {
24624 return this._pseudoClasses;
24626 CSSDataManager.prototype.getPseudoElements = function () {
24627 return this._pseudoElements;
24629 CSSDataManager.prototype.isKnownProperty = function (name) {
24630 return name.toLowerCase() in this._propertySet;
24632 CSSDataManager.prototype.isStandardProperty = function (name) {
24633 return this.isKnownProperty(name) &&
24634 (!this._propertySet[name.toLowerCase()].status || this._propertySet[name.toLowerCase()].status === 'standard');
24636 return CSSDataManager;
24643 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24645 __webpack_require__.r(__webpack_exports__);
24646 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24647 /* harmony export */ "cssData": () => /* binding */ cssData
24648 /* harmony export */ });
24649 /*---------------------------------------------------------------------------------------------
24650 * Copyright (c) Microsoft Corporation. All rights reserved.
24651 * Licensed under the MIT License. See License.txt in the project root for license information.
24652 *--------------------------------------------------------------------------------------------*/
24653 // file generated from vscode-web-custom-data NPM package
24658 "name": "additive-symbols",
24662 "syntax": "[ <integer> && <symbol> ]#",
24664 "description": "@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",
24673 "name": "align-content",
24677 "description": "Lines are packed toward the center of the flex container."
24680 "name": "flex-end",
24681 "description": "Lines are packed toward the end of the flex container."
24684 "name": "flex-start",
24685 "description": "Lines are packed toward the start of the flex container."
24688 "name": "space-around",
24689 "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
24692 "name": "space-between",
24693 "description": "Lines are evenly distributed in the flex container."
24697 "description": "Lines stretch to take up the remaining space."
24700 "syntax": "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
24702 "description": "Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",
24708 "name": "align-items",
24711 "name": "baseline",
24712 "description": "If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."
24716 "description": "The flex item’s margin box is centered in the cross axis within the line."
24719 "name": "flex-end",
24720 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
24723 "name": "flex-start",
24724 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
24728 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
24731 "syntax": "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
24733 "description": "Aligns flex items along the cross axis of the current line of the flex container.",
24739 "name": "justify-items",
24754 "name": "flex-end",
24755 "description": "\"Flex items are packed toward the end of the line.\""
24758 "name": "flex-start",
24759 "description": "\"Flex items are packed toward the start of the line.\""
24762 "name": "self-end",
24763 "description": "The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."
24766 "name": "self-start",
24767 "description": "The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."
24771 "description": "The items are packed flush to each other toward the center of the of the alignment container."
24783 "name": "first baseline"
24786 "name": "last baseline"
24790 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
24802 "syntax": "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
24804 "description": "Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",
24810 "name": "justify-self",
24832 "name": "flex-end",
24833 "description": "\"Flex items are packed toward the end of the line.\""
24836 "name": "flex-start",
24837 "description": "\"Flex items are packed toward the start of the line.\""
24840 "name": "self-end",
24841 "description": "The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."
24844 "name": "self-start",
24845 "description": "The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."
24849 "description": "The items are packed flush to each other toward the center of the of the alignment container."
24861 "name": "first baseline"
24864 "name": "last baseline"
24868 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
24877 "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
24879 "description": "Defines the way of justifying a box inside its container along the appropriate axis.",
24885 "name": "align-self",
24889 "description": "Computes to the value of 'align-items' on the element’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."
24892 "name": "baseline",
24893 "description": "If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."
24897 "description": "The flex item’s margin box is centered in the cross axis within the line."
24900 "name": "flex-end",
24901 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
24904 "name": "flex-start",
24905 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
24909 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
24912 "syntax": "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
24914 "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
24929 "syntax": "initial | inherit | unset | revert",
24933 "name": "MDN Reference",
24934 "url": "https://developer.mozilla.org/docs/Web/CSS/all"
24937 "description": "Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",
24951 "name": "MDN Reference",
24952 "url": "https://developer.mozilla.org/docs/Web/CSS/alt"
24955 "description": "Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",
24962 "name": "animation",
24965 "name": "alternate",
24966 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
24969 "name": "alternate-reverse",
24970 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
24973 "name": "backwards",
24974 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
24978 "description": "Both forwards and backwards fill modes are applied."
24981 "name": "forwards",
24982 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
24985 "name": "infinite",
24986 "description": "Causes the animation to repeat forever."
24990 "description": "No animation is performed"
24994 "description": "Normal playback."
24998 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
25001 "syntax": "<single-animation>#",
25005 "name": "MDN Reference",
25006 "url": "https://developer.mozilla.org/docs/Web/CSS/animation"
25009 "description": "Shorthand property combines six of the animation properties into a single property.",
25019 "name": "animation-delay",
25020 "syntax": "<time>#",
25024 "name": "MDN Reference",
25025 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
25028 "description": "Defines when the animation will start.",
25034 "name": "animation-direction",
25037 "name": "alternate",
25038 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
25041 "name": "alternate-reverse",
25042 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
25046 "description": "Normal playback."
25050 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
25053 "syntax": "<single-animation-direction>#",
25057 "name": "MDN Reference",
25058 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
25061 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
25067 "name": "animation-duration",
25068 "syntax": "<time>#",
25072 "name": "MDN Reference",
25073 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
25076 "description": "Defines the length of time that an animation takes to complete one cycle.",
25082 "name": "animation-fill-mode",
25085 "name": "backwards",
25086 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
25090 "description": "Both forwards and backwards fill modes are applied."
25093 "name": "forwards",
25094 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
25098 "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
25101 "syntax": "<single-animation-fill-mode>#",
25105 "name": "MDN Reference",
25106 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
25109 "description": "Defines what values are applied by the animation outside the time it is executing.",
25115 "name": "animation-iteration-count",
25118 "name": "infinite",
25119 "description": "Causes the animation to repeat forever."
25122 "syntax": "<single-animation-iteration-count>#",
25126 "name": "MDN Reference",
25127 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
25130 "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
25137 "name": "animation-name",
25141 "description": "No animation is performed"
25144 "syntax": "[ none | <keyframes-name> ]#",
25148 "name": "MDN Reference",
25149 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-name"
25152 "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
25159 "name": "animation-play-state",
25163 "description": "A running animation will be paused."
25167 "description": "Resume playback of a paused animation."
25170 "syntax": "<single-animation-play-state>#",
25174 "name": "MDN Reference",
25175 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
25178 "description": "Defines whether the animation is running or paused.",
25184 "name": "animation-timing-function",
25185 "syntax": "<timing-function>#",
25189 "name": "MDN Reference",
25190 "url": "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
25193 "description": "Describes how the animation will progress over one cycle of its duration.",
25199 "name": "backface-visibility",
25203 "description": "Back side is hidden."
25207 "description": "Back side is visible."
25210 "syntax": "visible | hidden",
25214 "name": "MDN Reference",
25215 "url": "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
25218 "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
25224 "name": "background",
25228 "description": "The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."
25232 "description": "The background is fixed with regard to the element's contents: if the element has a scrolling mechanism, the background scrolls with the element's contents."
25236 "description": "A value of 'none' counts as an image layer but draws nothing."
25240 "description": "The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element's border.)"
25243 "syntax": "[ <bg-layer> , ]* <final-bg-layer>",
25247 "name": "MDN Reference",
25248 "url": "https://developer.mozilla.org/docs/Web/CSS/background"
25251 "description": "Shorthand property for setting most background properties at the same place in the style sheet.",
25264 "name": "background-attachment",
25268 "description": "The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."
25272 "description": "The background is fixed with regard to the element’s contents: if the element has a scrolling mechanism, the background scrolls with the element’s contents."
25276 "description": "The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element’s border.)"
25279 "syntax": "<attachment>#",
25283 "name": "MDN Reference",
25284 "url": "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
25287 "description": "Specifies whether the background images are fixed with regard to the viewport ('fixed') or scroll along with the element ('scroll') or its contents ('local').",
25293 "name": "background-blend-mode",
25304 "description": "Default attribute which specifies no blending"
25307 "name": "multiply",
25308 "description": "The source color is multiplied by the destination color and replaces the destination."
25312 "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
25316 "description": "Multiplies or screens the colors, depending on the backdrop color value."
25320 "description": "Selects the darker of the backdrop and source colors."
25324 "description": "Selects the lighter of the backdrop and source colors."
25327 "name": "color-dodge",
25328 "description": "Brightens the backdrop color to reflect the source color."
25331 "name": "color-burn",
25332 "description": "Darkens the backdrop color to reflect the source color."
25335 "name": "hard-light",
25336 "description": "Multiplies or screens the colors, depending on the source color value."
25339 "name": "soft-light",
25340 "description": "Darkens or lightens the colors, depending on the source color value."
25343 "name": "difference",
25344 "description": "Subtracts the darker of the two constituent colors from the lighter color.."
25347 "name": "exclusion",
25348 "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
25359 "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
25362 "name": "saturation",
25370 "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
25381 "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
25384 "name": "luminosity",
25392 "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
25395 "syntax": "<blend-mode>#",
25399 "name": "MDN Reference",
25400 "url": "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
25403 "description": "Defines the blending mode of each background layer.",
25409 "name": "background-clip",
25410 "syntax": "<box>#",
25414 "name": "MDN Reference",
25415 "url": "https://developer.mozilla.org/docs/Web/CSS/background-clip"
25418 "description": "Determines the background painting area.",
25424 "name": "background-color",
25425 "syntax": "<color>",
25429 "name": "MDN Reference",
25430 "url": "https://developer.mozilla.org/docs/Web/CSS/background-color"
25433 "description": "Sets the background color of an element.",
25439 "name": "background-image",
25443 "description": "Counts as an image layer but draws nothing."
25446 "syntax": "<bg-image>#",
25450 "name": "MDN Reference",
25451 "url": "https://developer.mozilla.org/docs/Web/CSS/background-image"
25454 "description": "Sets the background image(s) of an element.",
25461 "name": "background-origin",
25462 "syntax": "<box>#",
25466 "name": "MDN Reference",
25467 "url": "https://developer.mozilla.org/docs/Web/CSS/background-origin"
25470 "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
25476 "name": "background-position",
25477 "syntax": "<bg-position>#",
25481 "name": "MDN Reference",
25482 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position"
25485 "description": "Specifies the initial position of the background image(s) (after any resizing) within their corresponding background positioning area.",
25493 "name": "background-position-x",
25497 "description": "Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."
25501 "description": "Equivalent to '0%' for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset."
25505 "description": "Equivalent to '100%' for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset."
25508 "status": "experimental",
25509 "syntax": "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
25513 "name": "MDN Reference",
25514 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
25517 "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
25524 "name": "background-position-y",
25528 "description": "Equivalent to '100%' for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset."
25532 "description": "Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."
25536 "description": "Equivalent to '0%' for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."
25539 "status": "experimental",
25540 "syntax": "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
25544 "name": "MDN Reference",
25545 "url": "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
25548 "description": "If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",
25555 "name": "background-repeat",
25557 "syntax": "<repeat-style>#",
25561 "name": "MDN Reference",
25562 "url": "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
25565 "description": "Specifies how background images are tiled after they have been sized and positioned.",
25571 "name": "background-size",
25575 "description": "Resolved by using the image’s intrinsic ratio and the size of the other dimension, or failing that, using the image’s intrinsic size, or failing that, treating it as 100%."
25579 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
25583 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
25586 "syntax": "<bg-size>#",
25590 "name": "MDN Reference",
25591 "url": "https://developer.mozilla.org/docs/Web/CSS/background-size"
25594 "description": "Specifies the size of the background images.",
25601 "name": "behavior",
25606 "description": "IE only. Used to extend behaviors of the browser.",
25612 "name": "block-size",
25623 "description": "Depends on the values of other properties."
25626 "syntax": "<'width'>",
25630 "name": "MDN Reference",
25631 "url": "https://developer.mozilla.org/docs/Web/CSS/block-size"
25634 "description": "Logical 'width'. Mapping depends on the element’s 'writing-mode'.",
25642 "syntax": "<line-width> || <line-style> || <color>",
25646 "name": "MDN Reference",
25647 "url": "https://developer.mozilla.org/docs/Web/CSS/border"
25650 "description": "Shorthand property for setting border width, style, and color.",
25659 "name": "border-block-end",
25667 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
25671 "name": "MDN Reference",
25672 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
25675 "description": "Logical 'border-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25684 "name": "border-block-start",
25692 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
25696 "name": "MDN Reference",
25697 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
25700 "description": "Logical 'border-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25709 "name": "border-block-end-color",
25717 "syntax": "<'border-top-color'>",
25721 "name": "MDN Reference",
25722 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
25725 "description": "Logical 'border-bottom-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25731 "name": "border-block-start-color",
25739 "syntax": "<'border-top-color'>",
25743 "name": "MDN Reference",
25744 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
25747 "description": "Logical 'border-top-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25753 "name": "border-block-end-style",
25761 "syntax": "<'border-top-style'>",
25765 "name": "MDN Reference",
25766 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
25769 "description": "Logical 'border-bottom-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25775 "name": "border-block-start-style",
25783 "syntax": "<'border-top-style'>",
25787 "name": "MDN Reference",
25788 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
25791 "description": "Logical 'border-top-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25797 "name": "border-block-end-width",
25805 "syntax": "<'border-top-width'>",
25809 "name": "MDN Reference",
25810 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
25813 "description": "Logical 'border-bottom-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25820 "name": "border-block-start-width",
25828 "syntax": "<'border-top-width'>",
25832 "name": "MDN Reference",
25833 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
25836 "description": "Logical 'border-top-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
25843 "name": "border-bottom",
25844 "syntax": "<line-width> || <line-style> || <color>",
25848 "name": "MDN Reference",
25849 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
25852 "description": "Shorthand property for setting border width, style and color.",
25861 "name": "border-bottom-color",
25862 "syntax": "<'border-top-color'>",
25866 "name": "MDN Reference",
25867 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
25870 "description": "Sets the color of the bottom border.",
25876 "name": "border-bottom-left-radius",
25877 "syntax": "<length-percentage>{1,2}",
25881 "name": "MDN Reference",
25882 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
25885 "description": "Defines the radii of the bottom left outer border edge.",
25892 "name": "border-bottom-right-radius",
25893 "syntax": "<length-percentage>{1,2}",
25897 "name": "MDN Reference",
25898 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
25901 "description": "Defines the radii of the bottom right outer border edge.",
25908 "name": "border-bottom-style",
25909 "syntax": "<line-style>",
25913 "name": "MDN Reference",
25914 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
25917 "description": "Sets the style of the bottom border.",
25923 "name": "border-bottom-width",
25924 "syntax": "<line-width>",
25928 "name": "MDN Reference",
25929 "url": "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
25932 "description": "Sets the thickness of the bottom border.",
25939 "name": "border-collapse",
25942 "name": "collapse",
25943 "description": "Selects the collapsing borders model."
25946 "name": "separate",
25947 "description": "Selects the separated borders border model."
25950 "syntax": "collapse | separate",
25954 "name": "MDN Reference",
25955 "url": "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
25958 "description": "Selects a table's border model.",
25964 "name": "border-color",
25966 "syntax": "<color>{1,4}",
25970 "name": "MDN Reference",
25971 "url": "https://developer.mozilla.org/docs/Web/CSS/border-color"
25974 "description": "The color of the border around all four edges of an element.",
25980 "name": "border-image",
25984 "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
25988 "description": "Causes the middle part of the border-image to be preserved."
25992 "description": "Use the border styles."
25996 "description": "The image is tiled (repeated) to fill the area."
26000 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
26004 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
26008 "description": "The image is stretched to fill the area."
26014 "syntax": "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
26018 "name": "MDN Reference",
26019 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image"
26022 "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
26032 "name": "border-image-outset",
26033 "syntax": "[ <length> | <number> ]{1,4}",
26037 "name": "MDN Reference",
26038 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
26041 "description": "The values specify the amount by which the border image area extends beyond the border box on the top, right, bottom, and left sides respectively. If the fourth value is absent, it is the same as the second. If the third one is also absent, it is the same as the first. If the second one is also absent, it is the same as the first. Numbers represent multiples of the corresponding border-width.",
26048 "name": "border-image-repeat",
26052 "description": "The image is tiled (repeated) to fill the area."
26056 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
26060 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
26064 "description": "The image is stretched to fill the area."
26067 "syntax": "[ stretch | repeat | round | space ]{1,2}",
26071 "name": "MDN Reference",
26072 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
26075 "description": "Specifies how the images for the sides and the middle part of the border image are scaled and tiled. If the second keyword is absent, it is assumed to be the same as the first.",
26081 "name": "border-image-slice",
26085 "description": "Causes the middle part of the border-image to be preserved."
26088 "syntax": "<number-percentage>{1,4} && fill?",
26092 "name": "MDN Reference",
26093 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
26096 "description": "Specifies inward offsets from the top, right, bottom, and left edges of the image, dividing it into nine regions: four corners, four edges and a middle.",
26103 "name": "border-image-source",
26107 "description": "Use the border styles."
26110 "syntax": "none | <image>",
26114 "name": "MDN Reference",
26115 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
26118 "description": "Specifies an image to use instead of the border styles given by the 'border-style' properties and as an additional background layer for the element. If the value is 'none' or if the image cannot be displayed, the border styles will be used.",
26124 "name": "border-image-width",
26128 "description": "The border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
26131 "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
26135 "name": "MDN Reference",
26136 "url": "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
26139 "description": "The four values of 'border-image-width' specify offsets that are used to divide the border image area into nine parts. They represent inward distances from the top, right, bottom, and left sides of the area, respectively.",
26147 "name": "border-inline-end",
26155 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
26159 "name": "MDN Reference",
26160 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
26163 "description": "Logical 'border-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
26172 "name": "border-inline-start",
26180 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
26184 "name": "MDN Reference",
26185 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
26188 "description": "Logical 'border-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
26197 "name": "border-inline-end-color",
26205 "syntax": "<'border-top-color'>",
26209 "name": "MDN Reference",
26210 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
26213 "description": "Logical 'border-right-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
26219 "name": "border-inline-start-color",
26227 "syntax": "<'border-top-color'>",
26231 "name": "MDN Reference",
26232 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
26235 "description": "Logical 'border-left-color'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
26241 "name": "border-inline-end-style",
26249 "syntax": "<'border-top-style'>",
26253 "name": "MDN Reference",
26254 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
26257 "description": "Logical 'border-right-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
26263 "name": "border-inline-start-style",
26271 "syntax": "<'border-top-style'>",
26275 "name": "MDN Reference",
26276 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
26279 "description": "Logical 'border-left-style'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
26285 "name": "border-inline-end-width",
26293 "syntax": "<'border-top-width'>",
26297 "name": "MDN Reference",
26298 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
26301 "description": "Logical 'border-right-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
26308 "name": "border-inline-start-width",
26316 "syntax": "<'border-top-width'>",
26320 "name": "MDN Reference",
26321 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
26324 "description": "Logical 'border-left-width'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
26331 "name": "border-left",
26332 "syntax": "<line-width> || <line-style> || <color>",
26336 "name": "MDN Reference",
26337 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left"
26340 "description": "Shorthand property for setting border width, style and color",
26349 "name": "border-left-color",
26350 "syntax": "<color>",
26354 "name": "MDN Reference",
26355 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
26358 "description": "Sets the color of the left border.",
26364 "name": "border-left-style",
26365 "syntax": "<line-style>",
26369 "name": "MDN Reference",
26370 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
26373 "description": "Sets the style of the left border.",
26379 "name": "border-left-width",
26380 "syntax": "<line-width>",
26384 "name": "MDN Reference",
26385 "url": "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
26388 "description": "Sets the thickness of the left border.",
26395 "name": "border-radius",
26396 "syntax": "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
26400 "name": "MDN Reference",
26401 "url": "https://developer.mozilla.org/docs/Web/CSS/border-radius"
26404 "description": "Defines the radii of the outer border edge.",
26411 "name": "border-right",
26412 "syntax": "<line-width> || <line-style> || <color>",
26416 "name": "MDN Reference",
26417 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right"
26420 "description": "Shorthand property for setting border width, style and color",
26429 "name": "border-right-color",
26430 "syntax": "<color>",
26434 "name": "MDN Reference",
26435 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
26438 "description": "Sets the color of the right border.",
26444 "name": "border-right-style",
26445 "syntax": "<line-style>",
26449 "name": "MDN Reference",
26450 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
26453 "description": "Sets the style of the right border.",
26459 "name": "border-right-width",
26460 "syntax": "<line-width>",
26464 "name": "MDN Reference",
26465 "url": "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
26468 "description": "Sets the thickness of the right border.",
26475 "name": "border-spacing",
26476 "syntax": "<length> <length>?",
26480 "name": "MDN Reference",
26481 "url": "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
26484 "description": "The lengths specify the distance that separates adjoining cell borders. If one length is specified, it gives both the horizontal and vertical spacing. If two are specified, the first gives the horizontal spacing and the second the vertical spacing. Lengths may not be negative.",
26490 "name": "border-style",
26492 "syntax": "<line-style>{1,4}",
26496 "name": "MDN Reference",
26497 "url": "https://developer.mozilla.org/docs/Web/CSS/border-style"
26500 "description": "The style of the border around edges of an element.",
26506 "name": "border-top",
26507 "syntax": "<line-width> || <line-style> || <color>",
26511 "name": "MDN Reference",
26512 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top"
26515 "description": "Shorthand property for setting border width, style and color",
26524 "name": "border-top-color",
26525 "syntax": "<color>",
26529 "name": "MDN Reference",
26530 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
26533 "description": "Sets the color of the top border.",
26539 "name": "border-top-left-radius",
26540 "syntax": "<length-percentage>{1,2}",
26544 "name": "MDN Reference",
26545 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
26548 "description": "Defines the radii of the top left outer border edge.",
26555 "name": "border-top-right-radius",
26556 "syntax": "<length-percentage>{1,2}",
26560 "name": "MDN Reference",
26561 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
26564 "description": "Defines the radii of the top right outer border edge.",
26571 "name": "border-top-style",
26572 "syntax": "<line-style>",
26576 "name": "MDN Reference",
26577 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
26580 "description": "Sets the style of the top border.",
26586 "name": "border-top-width",
26587 "syntax": "<line-width>",
26591 "name": "MDN Reference",
26592 "url": "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
26595 "description": "Sets the thickness of the top border.",
26602 "name": "border-width",
26604 "syntax": "<line-width>{1,4}",
26608 "name": "MDN Reference",
26609 "url": "https://developer.mozilla.org/docs/Web/CSS/border-width"
26612 "description": "Shorthand that sets the four 'border-*-width' properties. If it has four values, they set top, right, bottom and left in that order. If left is missing, it is the same as right; if bottom is missing, it is the same as top; if right is missing, it is the same as top.",
26623 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
26626 "syntax": "<length> | <percentage> | auto",
26630 "name": "MDN Reference",
26631 "url": "https://developer.mozilla.org/docs/Web/CSS/bottom"
26634 "description": "Specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's 'containing block'.",
26641 "name": "box-decoration-break",
26652 "description": "Each box is independently wrapped with the border and padding."
26656 "description": "The effect is as though the element were rendered with no breaks present, and then sliced by the breaks afterward."
26659 "syntax": "slice | clone",
26663 "name": "MDN Reference",
26664 "url": "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
26667 "description": "Specifies whether individual boxes are treated as broken pieces of one continuous box, or whether each box is individually wrapped with the border and padding.",
26673 "name": "box-shadow",
26677 "description": "Changes the drop shadow from an outer shadow (one that shadows the box onto the canvas, as if it were lifted above the canvas) to an inner shadow (one that shadows the canvas onto the box, as if the box were cut out of the canvas and shifted behind it)."
26681 "description": "No shadow."
26684 "syntax": "none | <shadow>#",
26688 "name": "MDN Reference",
26689 "url": "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
26692 "description": "Attaches one or more drop-shadows to the box. The property is a comma-separated list of shadows, each specified by 2-4 length values, an optional color, and an optional 'inset' keyword. Omitted lengths are 0; omitted colors are a user agent chosen color.",
26700 "name": "box-sizing",
26703 "name": "border-box",
26704 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
26707 "name": "content-box",
26708 "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
26711 "syntax": "content-box | border-box",
26715 "name": "MDN Reference",
26716 "url": "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
26719 "description": "Specifies the behavior of the 'width' and 'height' properties.",
26725 "name": "break-after",
26729 "description": "Always force a page break before/after the generated box."
26733 "description": "Neither force nor forbid a page/column break before/after the principal box."
26737 "description": "Avoid a break before/after the principal box."
26740 "name": "avoid-column",
26741 "description": "Avoid a column break before/after the principal box."
26744 "name": "avoid-page",
26745 "description": "Avoid a page break before/after the principal box."
26749 "description": "Always force a column break before/after the principal box."
26753 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
26757 "description": "Always force a page break before/after the principal box."
26761 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
26764 "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
26766 "description": "Describes the page/column/region break behavior after the generated box.",
26772 "name": "break-before",
26776 "description": "Always force a page break before/after the generated box."
26780 "description": "Neither force nor forbid a page/column break before/after the principal box."
26784 "description": "Avoid a break before/after the principal box."
26787 "name": "avoid-column",
26788 "description": "Avoid a column break before/after the principal box."
26791 "name": "avoid-page",
26792 "description": "Avoid a page break before/after the principal box."
26796 "description": "Always force a column break before/after the principal box."
26800 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
26804 "description": "Always force a page break before/after the principal box."
26808 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
26811 "syntax": "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
26813 "description": "Describes the page/column/region break behavior before the generated box.",
26819 "name": "break-inside",
26823 "description": "Impose no additional breaking constraints within the box."
26827 "description": "Avoid breaks within the box."
26830 "name": "avoid-column",
26831 "description": "Avoid a column break within the box."
26834 "name": "avoid-page",
26835 "description": "Avoid a page break within the box."
26838 "syntax": "auto | avoid | avoid-page | avoid-column | avoid-region",
26840 "description": "Describes the page/column/region break behavior inside the principal box.",
26846 "name": "caption-side",
26850 "description": "Positions the caption box below the table box."
26854 "description": "Positions the caption box above the table box."
26857 "syntax": "top | bottom | block-start | block-end | inline-start | inline-end",
26861 "name": "MDN Reference",
26862 "url": "https://developer.mozilla.org/docs/Web/CSS/caption-side"
26865 "description": "Specifies the position of the caption box with respect to the table box.",
26871 "name": "caret-color",
26882 "description": "The user agent selects an appropriate color for the caret. This is generally currentcolor, but the user agent may choose a different color to ensure good visibility and contrast with the surrounding content, taking into account the value of currentcolor, the background, shadows, and other factors."
26885 "syntax": "auto | <color>",
26889 "name": "MDN Reference",
26890 "url": "https://developer.mozilla.org/docs/Web/CSS/caret-color"
26893 "description": "Controls the color of the text insertion indicator.",
26904 "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any right-floating and left-floating boxes that resulted from elements earlier in the source document."
26908 "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any left-floating boxes that resulted from elements earlier in the source document."
26912 "description": "No constraint on the box's position with respect to floats."
26916 "description": "The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any right-floating boxes that resulted from elements earlier in the source document."
26919 "syntax": "none | left | right | both | inline-start | inline-end",
26923 "name": "MDN Reference",
26924 "url": "https://developer.mozilla.org/docs/Web/CSS/clear"
26927 "description": "Indicates which sides of an element's box(es) may not be adjacent to an earlier floating box. The 'clear' property does not consider floats inside the element itself or in other block formatting contexts.",
26937 "description": "The element does not clip."
26941 "description": "Specifies offsets from the edges of the border box."
26944 "syntax": "<shape> | auto",
26948 "name": "MDN Reference",
26949 "url": "https://developer.mozilla.org/docs/Web/CSS/clip"
26952 "description": "Deprecated. Use the 'clip-path' property when support allows. Defines the visible portion of an element’s box.",
26958 "name": "clip-path",
26962 "description": "No clipping path gets created."
26966 "description": "References a <clipPath> element to create a clipping path."
26969 "syntax": "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
26973 "name": "MDN Reference",
26974 "url": "https://developer.mozilla.org/docs/Web/CSS/clip-path"
26977 "description": "Specifies a clipping path where everything inside the path is visible and everything outside is clipped out.",
26986 "name": "clip-rule",
26998 "description": "Determines the ‘insideness’ of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses."
27002 "description": "Determines the ‘insideness’ of a point on the canvas by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray."
27006 "description": "Indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape.",
27013 "syntax": "<color>",
27017 "name": "MDN Reference",
27018 "url": "https://developer.mozilla.org/docs/Web/CSS/color"
27021 "description": "Sets the color of an element's text",
27027 "name": "color-interpolation-filters",
27039 "description": "Color operations are not required to occur in a particular color space."
27042 "name": "linearRGB",
27043 "description": "Color operations should occur in the linearized RGB color space."
27047 "description": "Color operations should occur in the sRGB color space."
27051 "description": "Specifies the color space for imaging operations performed via filter effects.",
27057 "name": "column-count",
27061 "description": "Determines the number of columns by the 'column-width' property and the element width."
27064 "syntax": "<integer> | auto",
27068 "name": "MDN Reference",
27069 "url": "https://developer.mozilla.org/docs/Web/CSS/column-count"
27072 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
27079 "name": "column-fill",
27083 "description": "Fills columns sequentially."
27087 "description": "Balance content equally between columns, if possible."
27090 "syntax": "auto | balance | balance-all",
27094 "name": "MDN Reference",
27095 "url": "https://developer.mozilla.org/docs/Web/CSS/column-fill"
27098 "description": "In continuous media, this property will only be consulted if the length of columns has been constrained. Otherwise, columns will automatically be balanced.",
27104 "name": "column-gap",
27108 "description": "User agent specific and typically equivalent to 1em."
27111 "syntax": "normal | <length-percentage>",
27113 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
27120 "name": "column-rule",
27121 "syntax": "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
27125 "name": "MDN Reference",
27126 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule"
27129 "description": "Shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
27138 "name": "column-rule-color",
27139 "syntax": "<color>",
27143 "name": "MDN Reference",
27144 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
27147 "description": "Sets the color of the column rule",
27153 "name": "column-rule-style",
27154 "syntax": "<'border-style'>",
27158 "name": "MDN Reference",
27159 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
27162 "description": "Sets the style of the rule between columns of an element.",
27168 "name": "column-rule-width",
27169 "syntax": "<'border-width'>",
27173 "name": "MDN Reference",
27174 "url": "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
27177 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
27188 "description": "The width depends on the values of other properties."
27191 "syntax": "<'column-width'> || <'column-count'>",
27195 "name": "MDN Reference",
27196 "url": "https://developer.mozilla.org/docs/Web/CSS/columns"
27199 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
27207 "name": "column-span",
27211 "description": "The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appear."
27215 "description": "The element does not span multiple columns."
27218 "syntax": "none | all",
27222 "name": "MDN Reference",
27223 "url": "https://developer.mozilla.org/docs/Web/CSS/column-span"
27226 "description": "Describes the page/column break behavior after the generated box.",
27232 "name": "column-width",
27236 "description": "The width depends on the values of other properties."
27239 "syntax": "<length> | auto",
27243 "name": "MDN Reference",
27244 "url": "https://developer.mozilla.org/docs/Web/CSS/column-width"
27247 "description": "Describes the width of columns in multicol elements.",
27264 "description": "Indicates that the property has no effect."
27268 "description": "Turns on all forms of containment for the element."
27272 "description": "All containment rules except size are applied to the element."
27276 "description": "For properties that can have effects on more than just an element and its descendants, those effects don't escape the containing element."
27280 "description": "Turns on layout containment for the element."
27284 "description": "Turns on style containment for the element."
27288 "description": "Turns on paint containment for the element."
27291 "syntax": "none | strict | content | [ size || layout || style || paint ]",
27295 "name": "MDN Reference",
27296 "url": "https://developer.mozilla.org/docs/Web/CSS/contain"
27299 "description": "Indicates that an element and its contents are, as much as possible, independent of the rest of the document tree.",
27309 "description": "The attr(n) function returns as a string the value of attribute n for the subject of the selector."
27312 "name": "counter(name)",
27313 "description": "Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."
27317 "description": "The (pseudo-)element is replaced in its entirety by the resource referenced by its 'icon' property, and treated as a replaced element."
27321 "description": "On elements, this inhibits the children of the element from being rendered as children of this element, as if the element was empty. On pseudo-elements it causes the pseudo-element to have no content."
27325 "description": "See http://www.w3.org/TR/css3-content/#content for computation rules."
27331 "syntax": "normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?",
27335 "name": "MDN Reference",
27336 "url": "https://developer.mozilla.org/docs/Web/CSS/content"
27339 "description": "Determines which page-based occurrence of a given element is applied to a counter or string value.",
27346 "name": "counter-increment",
27350 "description": "This element does not alter the value of any counters."
27353 "syntax": "[ <custom-ident> <integer>? ]+ | none",
27357 "name": "MDN Reference",
27358 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
27361 "description": "Manipulate the value of existing counters.",
27368 "name": "counter-reset",
27372 "description": "The counter is not modified."
27375 "syntax": "[ <custom-ident> <integer>? ]+ | none",
27379 "name": "MDN Reference",
27380 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
27383 "description": "Property accepts one or more names of counters (identifiers), each one optionally followed by an integer. The integer gives the value that the counter is set to on each occurrence of the element.",
27394 "description": "Indicates an alias of/shortcut to something is to be created. Often rendered as an arrow with a small curved arrow next to it."
27397 "name": "all-scroll",
27398 "description": "Indicates that the something can be scrolled in any direction. Often rendered as arrows pointing up, down, left, and right with a dot in the middle."
27402 "description": "The UA determines the cursor to display based on the current context."
27406 "description": "Indicates that a cell or set of cells may be selected. Often rendered as a thick plus-sign with a dot in the middle."
27409 "name": "col-resize",
27410 "description": "Indicates that the item/column can be resized horizontally. Often rendered as arrows pointing left and right with a vertical bar separating them."
27413 "name": "context-menu",
27414 "description": "A context menu is available for the object under the cursor. Often rendered as an arrow with a small menu-like graphic next to it."
27418 "description": "Indicates something is to be copied. Often rendered as an arrow with a small plus sign next to it."
27421 "name": "crosshair",
27422 "description": "A simple crosshair (e.g., short line segments resembling a '+' sign). Often used to indicate a two dimensional bitmap selection mode."
27426 "description": "The platform-dependent default cursor. Often rendered as an arrow."
27429 "name": "e-resize",
27430 "description": "Indicates that east edge is to be moved."
27433 "name": "ew-resize",
27434 "description": "Indicates a bidirectional east-west resize cursor."
27438 "description": "Indicates that something can be grabbed."
27441 "name": "grabbing",
27442 "description": "Indicates that something is being grabbed."
27446 "description": "Help is available for the object under the cursor. Often rendered as a question mark or a balloon."
27450 "description": "Indicates something is to be moved."
27453 "name": "-moz-grab",
27454 "description": "Indicates that something can be grabbed."
27457 "name": "-moz-grabbing",
27458 "description": "Indicates that something is being grabbed."
27461 "name": "-moz-zoom-in",
27462 "description": "Indicates that something can be zoomed (magnified) in."
27465 "name": "-moz-zoom-out",
27466 "description": "Indicates that something can be zoomed (magnified) out."
27469 "name": "ne-resize",
27470 "description": "Indicates that movement starts from north-east corner."
27473 "name": "nesw-resize",
27474 "description": "Indicates a bidirectional north-east/south-west cursor."
27478 "description": "Indicates that the dragged item cannot be dropped at the current cursor location. Often rendered as a hand or pointer with a small circle with a line through it."
27482 "description": "No cursor is rendered for the element."
27485 "name": "not-allowed",
27486 "description": "Indicates that the requested action will not be carried out. Often rendered as a circle with a line through it."
27489 "name": "n-resize",
27490 "description": "Indicates that north edge is to be moved."
27493 "name": "ns-resize",
27494 "description": "Indicates a bidirectional north-south cursor."
27497 "name": "nw-resize",
27498 "description": "Indicates that movement starts from north-west corner."
27501 "name": "nwse-resize",
27502 "description": "Indicates a bidirectional north-west/south-east cursor."
27506 "description": "The cursor is a pointer that indicates a link."
27509 "name": "progress",
27510 "description": "A progress indicator. The program is performing some processing, but is different from 'wait' in that the user may still interact with the program. Often rendered as a spinning beach ball, or an arrow with a watch or hourglass."
27513 "name": "row-resize",
27514 "description": "Indicates that the item/row can be resized vertically. Often rendered as arrows pointing up and down with a horizontal bar separating them."
27517 "name": "se-resize",
27518 "description": "Indicates that movement starts from south-east corner."
27521 "name": "s-resize",
27522 "description": "Indicates that south edge is to be moved."
27525 "name": "sw-resize",
27526 "description": "Indicates that movement starts from south-west corner."
27530 "description": "Indicates text that may be selected. Often rendered as a vertical I-beam."
27533 "name": "vertical-text",
27534 "description": "Indicates vertical-text that may be selected. Often rendered as a horizontal I-beam."
27538 "description": "Indicates that the program is busy and the user should wait. Often rendered as a watch or hourglass."
27541 "name": "-webkit-grab",
27542 "description": "Indicates that something can be grabbed."
27545 "name": "-webkit-grabbing",
27546 "description": "Indicates that something is being grabbed."
27549 "name": "-webkit-zoom-in",
27550 "description": "Indicates that something can be zoomed (magnified) in."
27553 "name": "-webkit-zoom-out",
27554 "description": "Indicates that something can be zoomed (magnified) out."
27557 "name": "w-resize",
27558 "description": "Indicates that west edge is to be moved."
27562 "description": "Indicates that something can be zoomed (magnified) in."
27565 "name": "zoom-out",
27566 "description": "Indicates that something can be zoomed (magnified) out."
27569 "syntax": "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]",
27573 "name": "MDN Reference",
27574 "url": "https://developer.mozilla.org/docs/Web/CSS/cursor"
27577 "description": "Allows control over cursor appearance in an element",
27585 "name": "direction",
27589 "description": "Left-to-right direction."
27593 "description": "Right-to-left direction."
27596 "syntax": "ltr | rtl",
27600 "name": "MDN Reference",
27601 "url": "https://developer.mozilla.org/docs/Web/CSS/direction"
27604 "description": "Specifies the inline base direction or directionality of any bidi paragraph, embedding, isolate, or override established by the box. Note: for HTML content use the 'dir' attribute and 'bdo' element rather than this property.",
27614 "description": "The element generates a block-level box"
27617 "name": "contents",
27618 "description": "The element itself does not generate any boxes, but its children and pseudo-elements still generate boxes as normal."
27622 "description": "The element generates a principal flex container box and establishes a flex formatting context."
27626 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
27629 "name": "flow-root",
27630 "description": "The element generates a block container box, and lays out its contents using flow layout."
27634 "description": "The element generates a principal grid container box, and establishes a grid formatting context."
27638 "description": "The element generates an inline-level box."
27641 "name": "inline-block",
27642 "description": "A block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the box itself is formatted as an inline box."
27645 "name": "inline-flex",
27646 "description": "Inline-level flex container."
27649 "name": "inline-flexbox",
27650 "description": "Inline-level flex container. Standardized as 'inline-flex'"
27653 "name": "inline-table",
27654 "description": "Inline-level table wrapper box containing table box."
27657 "name": "list-item",
27658 "description": "One or more block boxes and one marker box."
27661 "name": "-moz-box",
27662 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
27665 "name": "-moz-deck"
27668 "name": "-moz-grid"
27671 "name": "-moz-grid-group"
27674 "name": "-moz-grid-line"
27677 "name": "-moz-groupbox"
27680 "name": "-moz-inline-box",
27681 "description": "Inline-level flex container. Standardized as 'inline-flex'"
27684 "name": "-moz-inline-grid"
27687 "name": "-moz-inline-stack"
27690 "name": "-moz-marker"
27693 "name": "-moz-popup"
27696 "name": "-moz-stack"
27699 "name": "-ms-flexbox",
27700 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
27703 "name": "-ms-grid",
27704 "description": "The element generates a principal grid container box, and establishes a grid formatting context."
27707 "name": "-ms-inline-flexbox",
27708 "description": "Inline-level flex container. Standardized as 'inline-flex'"
27711 "name": "-ms-inline-grid",
27712 "description": "Inline-level grid container."
27716 "description": "The element and its descendants generates no boxes."
27720 "description": "The element generates a principal ruby container box, and establishes a ruby formatting context."
27723 "name": "ruby-base"
27726 "name": "ruby-base-container"
27729 "name": "ruby-text"
27732 "name": "ruby-text-container"
27736 "description": "The element generates a run-in box. Run-in elements act like inlines or blocks, depending on the surrounding elements."
27740 "description": "The element generates a principal table wrapper box containing an additionally-generated table box, and establishes a table formatting context."
27743 "name": "table-caption"
27746 "name": "table-cell"
27749 "name": "table-column"
27752 "name": "table-column-group"
27755 "name": "table-footer-group"
27758 "name": "table-header-group"
27761 "name": "table-row"
27764 "name": "table-row-group"
27767 "name": "-webkit-box",
27768 "description": "The element lays out its contents using flow layout (block-and-inline layout). Standardized as 'flex'."
27771 "name": "-webkit-flex",
27772 "description": "The element lays out its contents using flow layout (block-and-inline layout)."
27775 "name": "-webkit-inline-box",
27776 "description": "Inline-level flex container. Standardized as 'inline-flex'"
27779 "name": "-webkit-inline-flex",
27780 "description": "Inline-level flex container."
27783 "syntax": "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
27787 "name": "MDN Reference",
27788 "url": "https://developer.mozilla.org/docs/Web/CSS/display"
27791 "description": "In combination with 'float' and 'position', determines the type of box or boxes that are generated for an element.",
27797 "name": "empty-cells",
27801 "description": "No borders or backgrounds are drawn around/behind empty cells."
27804 "name": "-moz-show-background"
27808 "description": "Borders and backgrounds are drawn around/behind empty cells (like normal cells)."
27811 "syntax": "show | hide",
27815 "name": "MDN Reference",
27816 "url": "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
27819 "description": "In the separated borders model, this property controls the rendering of borders and backgrounds around cells that have no visible content.",
27825 "name": "enable-background",
27828 "name": "accumulate",
27829 "description": "If the ancestor container element has a property of new, then all graphics elements within the current container are rendered both on the parent's background image and onto the target."
27833 "description": "Create a new background image canvas. All children of the current container element can access the background, and they will be rendered onto both the parent's background image canvas in addition to the target device."
27837 "description": "Deprecated. Use 'isolation' property instead when support allows. Specifies how the accumulation of the background image is managed.",
27846 "name": "fallback",
27850 "syntax": "<counter-style-name>",
27852 "description": "@counter-style descriptor. Specifies a fallback counter style to be used when the current counter style can’t create a representation for a given counter value.",
27862 "description": "A URL reference to a paint server element, which is an element that defines a paint server: ‘hatch’, ‘linearGradient’, ‘mesh’, ‘pattern’, ‘radialGradient’ and ‘solidcolor’."
27866 "description": "No paint is applied in this layer."
27870 "description": "Paints the interior of the given graphical element.",
27878 "name": "fill-opacity",
27880 "description": "Specifies the opacity of the painting operation used to paint the interior the current object.",
27886 "name": "fill-rule",
27890 "description": "Determines the ‘insideness’ of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses."
27894 "description": "Determines the ‘insideness’ of a point on the canvas by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray."
27898 "description": "Indicates the algorithm (or winding rule) which is to be used to determine what parts of the canvas are included inside the shape.",
27915 "description": "No filter effects are applied."
27919 "description": "Applies a Gaussian blur to the input image."
27922 "name": "brightness()",
27923 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
27926 "name": "contrast()",
27927 "description": "Adjusts the contrast of the input."
27930 "name": "drop-shadow()",
27931 "description": "Applies a drop shadow effect to the input image."
27934 "name": "grayscale()",
27935 "description": "Converts the input image to grayscale."
27938 "name": "hue-rotate()",
27939 "description": "Applies a hue rotation on the input image. "
27942 "name": "invert()",
27943 "description": "Inverts the samples in the input image."
27946 "name": "opacity()",
27947 "description": "Applies transparency to the samples in the input image."
27950 "name": "saturate()",
27951 "description": "Saturates the input image."
27955 "description": "Converts the input image to sepia."
27966 "description": "A filter reference to a <filter> element."
27969 "syntax": "none | <filter-function-list>",
27973 "name": "MDN Reference",
27974 "url": "https://developer.mozilla.org/docs/Web/CSS/filter"
27977 "description": "Processes an element’s rendering before it is displayed in the document, by applying one or more filter effects.",
27988 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
27992 "description": "Indicates automatic sizing, based on the flex item’s content."
27996 "description": "Expands to '0 0 auto'."
27999 "syntax": "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
28003 "name": "MDN Reference",
28004 "url": "https://developer.mozilla.org/docs/Web/CSS/flex"
28007 "description": "Specifies the components of a flexible length: the flex grow factor and flex shrink factor, and the flex basis.",
28015 "name": "flex-basis",
28019 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
28023 "description": "Indicates automatic sizing, based on the flex item’s content."
28026 "syntax": "content | <'width'>",
28030 "name": "MDN Reference",
28031 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
28034 "description": "Sets the flex basis.",
28042 "name": "flex-direction",
28046 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
28049 "name": "column-reverse",
28050 "description": "Same as 'column', except the main-start and main-end directions are swapped."
28054 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
28057 "name": "row-reverse",
28058 "description": "Same as 'row', except the main-start and main-end directions are swapped."
28061 "syntax": "row | row-reverse | column | column-reverse",
28065 "name": "MDN Reference",
28066 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
28069 "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.",
28075 "name": "flex-flow",
28079 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
28082 "name": "column-reverse",
28083 "description": "Same as 'column', except the main-start and main-end directions are swapped."
28087 "description": "The flex container is single-line."
28091 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
28094 "name": "row-reverse",
28095 "description": "Same as 'row', except the main-start and main-end directions are swapped."
28099 "description": "The flexbox is multi-line."
28102 "name": "wrap-reverse",
28103 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
28106 "syntax": "<'flex-direction'> || <'flex-wrap'>",
28110 "name": "MDN Reference",
28111 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
28114 "description": "Specifies how flexbox items are placed in the flexbox.",
28120 "name": "flex-grow",
28121 "syntax": "<number>",
28125 "name": "MDN Reference",
28126 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
28129 "description": "Sets the flex grow factor. Negative numbers are invalid.",
28135 "name": "flex-shrink",
28136 "syntax": "<number>",
28140 "name": "MDN Reference",
28141 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
28144 "description": "Sets the flex shrink factor. Negative numbers are invalid.",
28150 "name": "flex-wrap",
28154 "description": "The flex container is single-line."
28158 "description": "The flexbox is multi-line."
28161 "name": "wrap-reverse",
28162 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
28165 "syntax": "nowrap | wrap | wrap-reverse",
28169 "name": "MDN Reference",
28170 "url": "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
28173 "description": "Controls whether the flex container is single-line or multi-line, and the direction of the cross-axis, which determines the direction new lines are stacked in.",
28182 "name": "inline-end",
28183 "description": "A keyword indicating that the element must float on the end side of its containing block. That is the right side with ltr scripts, and the left side with rtl scripts."
28186 "name": "inline-start",
28187 "description": "A keyword indicating that the element must float on the start side of its containing block. That is the left side with ltr scripts, and the right side with rtl scripts."
28191 "description": "The element generates a block box that is floated to the left. Content flows on the right side of the box, starting at the top (subject to the 'clear' property)."
28195 "description": "The box is not floated."
28199 "description": "Similar to 'left', except the box is floated to the right, and content flows on the left side of the box, starting at the top."
28202 "syntax": "left | right | none | inline-start | inline-end",
28206 "name": "MDN Reference",
28207 "url": "https://developer.mozilla.org/docs/Web/CSS/float"
28210 "description": "Specifies how a box should be floated. It may be set for any element, but only applies to elements that generate boxes that are not absolutely positioned.",
28216 "name": "flood-color",
28226 "description": "Indicates what color to use to flood the current filter primitive subregion.",
28232 "name": "flood-opacity",
28242 "description": "Indicates what opacity to use to flood the current filter primitive subregion.",
28253 "description": "Thin"
28257 "description": "Extra Light (Ultra Light)"
28261 "description": "Light"
28265 "description": "Normal"
28269 "description": "Medium"
28273 "description": "Semi Bold (Demi Bold)"
28277 "description": "Bold"
28281 "description": "Extra Bold (Ultra Bold)"
28285 "description": "Black (Heavy)"
28289 "description": "Same as 700"
28293 "description": "Specifies the weight of the face bolder than the inherited value."
28297 "description": "The font used for captioned controls (e.g., buttons, drop-downs, etc.)."
28301 "description": "The font used to label icons."
28305 "description": "Selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'."
28315 "description": "Specifies the weight of the face lighter than the inherited value."
28322 "description": "The font used in menus (e.g., dropdown menus and menu lists)."
28325 "name": "message-box",
28326 "description": "The font used in dialog boxes."
28330 "description": "Specifies a face that is not labeled as a small-caps font."
28334 "description": "Selects a font that is labeled 'oblique'."
28340 "name": "small-caps",
28341 "description": "Specifies a font that is labeled as a small-caps font. If a genuine small-caps font is not available, user agents should simulate a small-caps font."
28344 "name": "small-caption",
28345 "description": "The font used for labeling small controls."
28351 "name": "status-bar",
28352 "description": "The font used in window status bars."
28367 "syntax": "[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar",
28371 "name": "MDN Reference",
28372 "url": "https://developer.mozilla.org/docs/Web/CSS/font"
28375 "description": "Shorthand property for setting 'font-style', 'font-variant', 'font-weight', 'font-size', 'line-height', and 'font-family', at the same place in the style sheet. The syntax of this property is based on a traditional typographical shorthand notation to set multiple properties related to fonts.",
28381 "name": "font-family",
28384 "name": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif"
28387 "name": "Arial, Helvetica, sans-serif"
28390 "name": "Cambria, Cochin, Georgia, Times, 'Times New Roman', serif"
28393 "name": "'Courier New', Courier, monospace"
28402 "name": "'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif"
28405 "name": "Georgia, 'Times New Roman', Times, serif"
28408 "name": "'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif"
28411 "name": "Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif"
28414 "name": "'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif"
28417 "name": "monospace"
28420 "name": "sans-serif"
28423 "name": "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif"
28429 "name": "'Times New Roman', Times, serif"
28432 "name": "'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif"
28435 "name": "Verdana, Geneva, Tahoma, sans-serif"
28438 "syntax": "<family-name>",
28442 "name": "MDN Reference",
28443 "url": "https://developer.mozilla.org/docs/Web/CSS/font-family"
28446 "description": "Specifies a prioritized list of font family names or generic family names. A user agent iterates through the list of family names until it matches an available font that contains a glyph for the character to be rendered.",
28452 "name": "font-feature-settings",
28455 "name": "\"aalt\"",
28456 "description": "Access All Alternates."
28459 "name": "\"abvf\"",
28460 "description": "Above-base Forms. Required in Khmer script."
28463 "name": "\"abvm\"",
28464 "description": "Above-base Mark Positioning. Required in Indic scripts."
28467 "name": "\"abvs\"",
28468 "description": "Above-base Substitutions. Required in Indic scripts."
28471 "name": "\"afrc\"",
28472 "description": "Alternative Fractions."
28475 "name": "\"akhn\"",
28476 "description": "Akhand. Required in most Indic scripts."
28479 "name": "\"blwf\"",
28480 "description": "Below-base Form. Required in a number of Indic scripts."
28483 "name": "\"blwm\"",
28484 "description": "Below-base Mark Positioning. Required in Indic scripts."
28487 "name": "\"blws\"",
28488 "description": "Below-base Substitutions. Required in Indic scripts."
28491 "name": "\"calt\"",
28492 "description": "Contextual Alternates."
28495 "name": "\"case\"",
28496 "description": "Case-Sensitive Forms. Applies only to European scripts; particularly prominent in Spanish-language setting."
28499 "name": "\"ccmp\"",
28500 "description": "Glyph Composition/Decomposition."
28503 "name": "\"cfar\"",
28504 "description": "Conjunct Form After Ro. Required in Khmer scripts."
28507 "name": "\"cjct\"",
28508 "description": "Conjunct Forms. Required in Indic scripts that show similarity to Devanagari."
28511 "name": "\"clig\"",
28512 "description": "Contextual Ligatures."
28515 "name": "\"cpct\"",
28516 "description": "Centered CJK Punctuation. Used primarily in Chinese fonts."
28519 "name": "\"cpsp\"",
28520 "description": "Capital Spacing. Should not be used in connecting scripts (e.g. most Arabic)."
28523 "name": "\"cswh\"",
28524 "description": "Contextual Swash."
28527 "name": "\"curs\"",
28528 "description": "Cursive Positioning. Can be used in any cursive script."
28531 "name": "\"c2pc\"",
28532 "description": "Petite Capitals From Capitals. Applies only to bicameral scripts."
28535 "name": "\"c2sc\"",
28536 "description": "Small Capitals From Capitals. Applies only to bicameral scripts."
28539 "name": "\"dist\"",
28540 "description": "Distances. Required in Indic scripts."
28543 "name": "\"dlig\"",
28544 "description": "Discretionary ligatures."
28547 "name": "\"dnom\"",
28548 "description": "Denominators."
28551 "name": "\"dtls\"",
28552 "description": "Dotless Forms. Applied to math formula layout."
28555 "name": "\"expt\"",
28556 "description": "Expert Forms. Applies only to Japanese."
28559 "name": "\"falt\"",
28560 "description": "Final Glyph on Line Alternates. Can be used in any cursive script."
28563 "name": "\"fin2\"",
28564 "description": "Terminal Form #2. Used only with the Syriac script."
28567 "name": "\"fin3\"",
28568 "description": "Terminal Form #3. Used only with the Syriac script."
28571 "name": "\"fina\"",
28572 "description": "Terminal Forms. Can be used in any alphabetic script."
28575 "name": "\"flac\"",
28576 "description": "Flattened ascent forms. Applied to math formula layout."
28579 "name": "\"frac\"",
28580 "description": "Fractions."
28583 "name": "\"fwid\"",
28584 "description": "Full Widths. Applies to any script which can use monospaced forms."
28587 "name": "\"half\"",
28588 "description": "Half Forms. Required in Indic scripts that show similarity to Devanagari."
28591 "name": "\"haln\"",
28592 "description": "Halant Forms. Required in Indic scripts."
28595 "name": "\"halt\"",
28596 "description": "Alternate Half Widths. Used only in CJKV fonts."
28599 "name": "\"hist\"",
28600 "description": "Historical Forms."
28603 "name": "\"hkna\"",
28604 "description": "Horizontal Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
28607 "name": "\"hlig\"",
28608 "description": "Historical Ligatures."
28611 "name": "\"hngl\"",
28612 "description": "Hangul. Korean only."
28615 "name": "\"hojo\"",
28616 "description": "Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms). Used only with Kanji script."
28619 "name": "\"hwid\"",
28620 "description": "Half Widths. Generally used only in CJKV fonts."
28623 "name": "\"init\"",
28624 "description": "Initial Forms. Can be used in any alphabetic script."
28627 "name": "\"isol\"",
28628 "description": "Isolated Forms. Can be used in any cursive script."
28631 "name": "\"ital\"",
28632 "description": "Italics. Applies mostly to Latin; note that many non-Latin fonts contain Latin as well."
28635 "name": "\"jalt\"",
28636 "description": "Justification Alternates. Can be used in any cursive script."
28639 "name": "\"jp78\"",
28640 "description": "JIS78 Forms. Applies only to Japanese."
28643 "name": "\"jp83\"",
28644 "description": "JIS83 Forms. Applies only to Japanese."
28647 "name": "\"jp90\"",
28648 "description": "JIS90 Forms. Applies only to Japanese."
28651 "name": "\"jp04\"",
28652 "description": "JIS2004 Forms. Applies only to Japanese."
28655 "name": "\"kern\"",
28656 "description": "Kerning."
28659 "name": "\"lfbd\"",
28660 "description": "Left Bounds."
28663 "name": "\"liga\"",
28664 "description": "Standard Ligatures."
28667 "name": "\"ljmo\"",
28668 "description": "Leading Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
28671 "name": "\"lnum\"",
28672 "description": "Lining Figures."
28675 "name": "\"locl\"",
28676 "description": "Localized Forms."
28679 "name": "\"ltra\"",
28680 "description": "Left-to-right glyph alternates."
28683 "name": "\"ltrm\"",
28684 "description": "Left-to-right mirrored forms."
28687 "name": "\"mark\"",
28688 "description": "Mark Positioning."
28691 "name": "\"med2\"",
28692 "description": "Medial Form #2. Used only with the Syriac script."
28695 "name": "\"medi\"",
28696 "description": "Medial Forms."
28699 "name": "\"mgrk\"",
28700 "description": "Mathematical Greek."
28703 "name": "\"mkmk\"",
28704 "description": "Mark to Mark Positioning."
28707 "name": "\"nalt\"",
28708 "description": "Alternate Annotation Forms."
28711 "name": "\"nlck\"",
28712 "description": "NLC Kanji Forms. Used only with Kanji script."
28715 "name": "\"nukt\"",
28716 "description": "Nukta Forms. Required in Indic scripts.."
28719 "name": "\"numr\"",
28720 "description": "Numerators."
28723 "name": "\"onum\"",
28724 "description": "Oldstyle Figures."
28727 "name": "\"opbd\"",
28728 "description": "Optical Bounds."
28731 "name": "\"ordn\"",
28732 "description": "Ordinals. Applies mostly to Latin script."
28735 "name": "\"ornm\"",
28736 "description": "Ornaments."
28739 "name": "\"palt\"",
28740 "description": "Proportional Alternate Widths. Used mostly in CJKV fonts."
28743 "name": "\"pcap\"",
28744 "description": "Petite Capitals."
28747 "name": "\"pkna\"",
28748 "description": "Proportional Kana. Generally used only in Japanese fonts."
28751 "name": "\"pnum\"",
28752 "description": "Proportional Figures."
28755 "name": "\"pref\"",
28756 "description": "Pre-base Forms. Required in Khmer and Myanmar (Burmese) scripts and southern Indic scripts that may display a pre-base form of Ra."
28759 "name": "\"pres\"",
28760 "description": "Pre-base Substitutions. Required in Indic scripts."
28763 "name": "\"pstf\"",
28764 "description": "Post-base Forms. Required in scripts of south and southeast Asia that have post-base forms for consonants eg: Gurmukhi, Malayalam, Khmer."
28767 "name": "\"psts\"",
28768 "description": "Post-base Substitutions."
28771 "name": "\"pwid\"",
28772 "description": "Proportional Widths."
28775 "name": "\"qwid\"",
28776 "description": "Quarter Widths. Generally used only in CJKV fonts."
28779 "name": "\"rand\"",
28780 "description": "Randomize."
28783 "name": "\"rclt\"",
28784 "description": "Required Contextual Alternates. May apply to any script, but is especially important for many styles of Arabic."
28787 "name": "\"rlig\"",
28788 "description": "Required Ligatures. Applies to Arabic and Syriac. May apply to some other scripts."
28791 "name": "\"rkrf\"",
28792 "description": "Rakar Forms. Required in Devanagari and Gujarati scripts."
28795 "name": "\"rphf\"",
28796 "description": "Reph Form. Required in Indic scripts. E.g. Devanagari, Kannada."
28799 "name": "\"rtbd\"",
28800 "description": "Right Bounds."
28803 "name": "\"rtla\"",
28804 "description": "Right-to-left alternates."
28807 "name": "\"rtlm\"",
28808 "description": "Right-to-left mirrored forms."
28811 "name": "\"ruby\"",
28812 "description": "Ruby Notation Forms. Applies only to Japanese."
28815 "name": "\"salt\"",
28816 "description": "Stylistic Alternates."
28819 "name": "\"sinf\"",
28820 "description": "Scientific Inferiors."
28823 "name": "\"size\"",
28824 "description": "Optical size."
28827 "name": "\"smcp\"",
28828 "description": "Small Capitals. Applies only to bicameral scripts."
28831 "name": "\"smpl\"",
28832 "description": "Simplified Forms. Applies only to Chinese and Japanese."
28835 "name": "\"ssty\"",
28836 "description": "Math script style alternates."
28839 "name": "\"stch\"",
28840 "description": "Stretching Glyph Decomposition."
28843 "name": "\"subs\"",
28844 "description": "Subscript."
28847 "name": "\"sups\"",
28848 "description": "Superscript."
28851 "name": "\"swsh\"",
28852 "description": "Swash. Does not apply to ideographic scripts."
28855 "name": "\"titl\"",
28856 "description": "Titling."
28859 "name": "\"tjmo\"",
28860 "description": "Trailing Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
28863 "name": "\"tnam\"",
28864 "description": "Traditional Name Forms. Applies only to Japanese."
28867 "name": "\"tnum\"",
28868 "description": "Tabular Figures."
28871 "name": "\"trad\"",
28872 "description": "Traditional Forms. Applies only to Chinese and Japanese."
28875 "name": "\"twid\"",
28876 "description": "Third Widths. Generally used only in CJKV fonts."
28879 "name": "\"unic\"",
28880 "description": "Unicase."
28883 "name": "\"valt\"",
28884 "description": "Alternate Vertical Metrics. Applies only to scripts with vertical writing modes."
28887 "name": "\"vatu\"",
28888 "description": "Vattu Variants. Used for Indic scripts. E.g. Devanagari."
28891 "name": "\"vert\"",
28892 "description": "Vertical Alternates. Applies only to scripts with vertical writing modes."
28895 "name": "\"vhal\"",
28896 "description": "Alternate Vertical Half Metrics. Used only in CJKV fonts."
28899 "name": "\"vjmo\"",
28900 "description": "Vowel Jamo Forms. Required for Hangul script when Ancient Hangul writing system is supported."
28903 "name": "\"vkna\"",
28904 "description": "Vertical Kana Alternates. Applies only to fonts that support kana (hiragana and katakana)."
28907 "name": "\"vkrn\"",
28908 "description": "Vertical Kerning."
28911 "name": "\"vpal\"",
28912 "description": "Proportional Alternate Vertical Metrics. Used mostly in CJKV fonts."
28915 "name": "\"vrt2\"",
28916 "description": "Vertical Alternates and Rotation. Applies only to scripts with vertical writing modes."
28919 "name": "\"zero\"",
28920 "description": "Slashed Zero."
28924 "description": "No change in glyph substitution or positioning occurs."
28928 "description": "Disable feature."
28932 "description": "Enable feature."
28935 "syntax": "normal | <feature-tag-value>#",
28939 "name": "MDN Reference",
28940 "url": "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
28943 "description": "Provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
28950 "name": "font-kerning",
28961 "description": "Specifies that kerning is applied at the discretion of the user agent."
28965 "description": "Specifies that kerning is not applied."
28969 "description": "Specifies that kerning is applied."
28972 "syntax": "auto | normal | none",
28976 "name": "MDN Reference",
28977 "url": "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
28980 "description": "Kerning is the contextual adjustment of inter-glyph spacing. This property controls metric kerning, kerning that utilizes adjustment data contained in the font.",
28986 "name": "font-language-override",
28993 "description": "Implies that when rendering with OpenType fonts the language of the document is used to infer the OpenType language system, used to select language specific features when rendering."
28996 "syntax": "normal | <string>",
29000 "name": "MDN Reference",
29001 "url": "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
29004 "description": "The value of 'normal' implies that when rendering with OpenType fonts the language of the document is used to infer the OpenType language system, used to select language specific features when rendering.",
29010 "name": "font-size",
29040 "syntax": "<absolute-size> | <relative-size> | <length-percentage>",
29044 "name": "MDN Reference",
29045 "url": "https://developer.mozilla.org/docs/Web/CSS/font-size"
29048 "description": "Indicates the desired height of glyphs from the font. For scalable fonts, the font-size is a scale factor applied to the EM unit of the font. (Note that certain glyphs may bleed outside their EM box.) For non-scalable fonts, the font-size is converted into absolute units and matched against the declared font-size of the font, using the same absolute coordinate space for both of the matched values.",
29055 "name": "font-size-adjust",
29065 "description": "Do not preserve the font’s x-height."
29068 "syntax": "none | <number>",
29072 "name": "MDN Reference",
29073 "url": "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
29076 "description": "Preserves the readability of text when font fallback occurs by adjusting the font-size so that the x-height is the same regardless of the font used.",
29082 "name": "font-stretch",
29085 "name": "condensed"
29091 "name": "extra-condensed"
29094 "name": "extra-expanded"
29097 "name": "narrower",
29098 "description": "Indicates a narrower value relative to the width of the parent element."
29104 "name": "semi-condensed"
29107 "name": "semi-expanded"
29110 "name": "ultra-condensed"
29113 "name": "ultra-expanded"
29117 "description": "Indicates a wider value relative to the width of the parent element."
29120 "syntax": "<font-stretch-absolute>{1,2}",
29124 "name": "MDN Reference",
29125 "url": "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
29128 "description": "Selects a normal, condensed, or expanded face from a font family.",
29134 "name": "font-style",
29138 "description": "Selects a font that is labeled as an 'italic' face, or an 'oblique' face if one is not"
29142 "description": "Selects a face that is classified as 'normal'."
29146 "description": "Selects a font that is labeled as an 'oblique' face, or an 'italic' face if one is not."
29149 "syntax": "normal | italic | oblique <angle>{0,2}",
29153 "name": "MDN Reference",
29154 "url": "https://developer.mozilla.org/docs/Web/CSS/font-style"
29157 "description": "Allows italic or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.",
29163 "name": "font-synthesis",
29171 "description": "Disallow all synthetic faces."
29175 "description": "Allow synthetic italic faces."
29179 "description": "Allow synthetic bold faces."
29182 "syntax": "none | [ weight || style ]",
29186 "name": "MDN Reference",
29187 "url": "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
29190 "description": "Controls whether user agents are allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces.",
29196 "name": "font-variant",
29200 "description": "Specifies a face that is not labeled as a small-caps font."
29203 "name": "small-caps",
29204 "description": "Specifies a font that is labeled as a small-caps font. If a genuine small-caps font is not available, user agents should simulate a small-caps font."
29207 "syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
29211 "name": "MDN Reference",
29212 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant"
29215 "description": "Specifies variant representations of the font",
29221 "name": "font-variant-alternates",
29227 "name": "annotation()",
29228 "description": "Enables display of alternate annotation forms."
29231 "name": "character-variant()",
29232 "description": "Enables display of specific character variants."
29235 "name": "historical-forms",
29236 "description": "Enables display of historical forms."
29240 "description": "None of the features are enabled."
29243 "name": "ornaments()",
29244 "description": "Enables replacement of default glyphs with ornaments, if provided in the font."
29247 "name": "styleset()",
29248 "description": "Enables display with stylistic sets."
29251 "name": "stylistic()",
29252 "description": "Enables display of stylistic alternates."
29256 "description": "Enables display of swash glyphs."
29259 "syntax": "normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]",
29263 "name": "MDN Reference",
29264 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
29267 "description": "For any given character, fonts can provide a variety of alternate glyphs in addition to the default glyph for that character. This property provides control over the selection of these alternate glyphs.",
29273 "name": "font-variant-caps",
29282 "name": "all-petite-caps",
29283 "description": "Enables display of petite capitals for both upper and lowercase letters."
29286 "name": "all-small-caps",
29287 "description": "Enables display of small capitals for both upper and lowercase letters."
29291 "description": "None of the features are enabled."
29294 "name": "petite-caps",
29295 "description": "Enables display of petite capitals."
29298 "name": "small-caps",
29299 "description": "Enables display of small capitals. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters."
29302 "name": "titling-caps",
29303 "description": "Enables display of titling capitals."
29307 "description": "Enables display of mixture of small capitals for uppercase letters with normal lowercase letters."
29310 "syntax": "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
29314 "name": "MDN Reference",
29315 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
29318 "description": "Specifies control over capitalized forms.",
29324 "name": "font-variant-east-asian",
29333 "name": "full-width",
29334 "description": "Enables rendering of full-width variants."
29338 "description": "Enables rendering of JIS04 forms."
29342 "description": "Enables rendering of JIS78 forms."
29346 "description": "Enables rendering of JIS83 forms."
29350 "description": "Enables rendering of JIS90 forms."
29354 "description": "None of the features are enabled."
29357 "name": "proportional-width",
29358 "description": "Enables rendering of proportionally-spaced variants."
29362 "description": "Enables display of ruby variant glyphs."
29365 "name": "simplified",
29366 "description": "Enables rendering of simplified forms."
29369 "name": "traditional",
29370 "description": "Enables rendering of traditional forms."
29373 "syntax": "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
29377 "name": "MDN Reference",
29378 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
29381 "description": "Allows control of glyph substitute and positioning in East Asian text.",
29387 "name": "font-variant-ligatures",
29397 "name": "additional-ligatures",
29398 "description": "Enables display of additional ligatures."
29401 "name": "common-ligatures",
29402 "description": "Enables display of common ligatures."
29405 "name": "contextual",
29413 "description": "Enables display of contextual alternates."
29416 "name": "discretionary-ligatures",
29417 "description": "Enables display of discretionary ligatures."
29420 "name": "historical-ligatures",
29421 "description": "Enables display of historical ligatures."
29424 "name": "no-additional-ligatures",
29425 "description": "Disables display of additional ligatures."
29428 "name": "no-common-ligatures",
29429 "description": "Disables display of common ligatures."
29432 "name": "no-contextual",
29440 "description": "Disables display of contextual alternates."
29443 "name": "no-discretionary-ligatures",
29444 "description": "Disables display of discretionary ligatures."
29447 "name": "no-historical-ligatures",
29448 "description": "Disables display of historical ligatures."
29459 "description": "Disables all ligatures."
29463 "description": "Implies that the defaults set by the font are used."
29466 "syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
29470 "name": "MDN Reference",
29471 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
29474 "description": "Specifies control over which ligatures are enabled or disabled. A value of ‘normal’ implies that the defaults set by the font are used.",
29480 "name": "font-variant-numeric",
29490 "name": "diagonal-fractions",
29491 "description": "Enables display of lining diagonal fractions."
29494 "name": "lining-nums",
29495 "description": "Enables display of lining numerals."
29499 "description": "None of the features are enabled."
29502 "name": "oldstyle-nums",
29503 "description": "Enables display of old-style numerals."
29507 "description": "Enables display of letter forms used with ordinal numbers."
29510 "name": "proportional-nums",
29511 "description": "Enables display of proportional numerals."
29514 "name": "slashed-zero",
29515 "description": "Enables display of slashed zeros."
29518 "name": "stacked-fractions",
29519 "description": "Enables display of lining stacked fractions."
29522 "name": "tabular-nums",
29523 "description": "Enables display of tabular numerals."
29526 "syntax": "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
29530 "name": "MDN Reference",
29531 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
29534 "description": "Specifies control over numerical forms.",
29540 "name": "font-variant-position",
29547 "description": "None of the features are enabled."
29551 "description": "Enables display of subscript variants (OpenType feature: subs)."
29555 "description": "Enables display of superscript variants (OpenType feature: sups)."
29558 "syntax": "normal | sub | super",
29562 "name": "MDN Reference",
29563 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
29566 "description": "Specifies the vertical position",
29572 "name": "font-weight",
29576 "description": "Thin"
29580 "description": "Extra Light (Ultra Light)"
29584 "description": "Light"
29588 "description": "Normal"
29592 "description": "Medium"
29596 "description": "Semi Bold (Demi Bold)"
29600 "description": "Bold"
29604 "description": "Extra Bold (Ultra Bold)"
29608 "description": "Black (Heavy)"
29612 "description": "Same as 700"
29616 "description": "Specifies the weight of the face bolder than the inherited value."
29620 "description": "Specifies the weight of the face lighter than the inherited value."
29624 "description": "Same as 400"
29627 "syntax": "<font-weight-absolute>{1,2}",
29631 "name": "MDN Reference",
29632 "url": "https://developer.mozilla.org/docs/Web/CSS/font-weight"
29635 "description": "Specifies weight of glyphs in the font, their degree of blackness or stroke thickness.",
29641 "name": "glyph-orientation-horizontal",
29643 "description": "Controls glyph orientation when the inline-progression-direction is horizontal.",
29650 "name": "glyph-orientation-vertical",
29654 "description": "Sets the orientation based on the fullwidth or non-fullwidth characters and the most common orientation."
29658 "description": "Controls glyph orientation when the inline-progression-direction is vertical.",
29666 "name": "grid-area",
29677 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
29681 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
29684 "syntax": "<grid-line> [ / <grid-line> ]{0,3}",
29688 "name": "MDN Reference",
29689 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-area"
29692 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement. Shorthand for 'grid-row-start', 'grid-column-start', 'grid-row-end', and 'grid-column-end'.",
29707 "syntax": "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
29711 "name": "MDN Reference",
29712 "url": "https://developer.mozilla.org/docs/Web/CSS/grid"
29715 "description": "The grid CSS property is a shorthand property that sets all of the explicit grid properties ('grid-template-rows', 'grid-template-columns', and 'grid-template-areas'), and all the implicit grid properties ('grid-auto-rows', 'grid-auto-columns', and 'grid-auto-flow'), in a single declaration.",
29725 "name": "grid-auto-columns",
29728 "name": "min-content",
29729 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
29732 "name": "max-content",
29733 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
29737 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
29740 "name": "minmax()",
29741 "description": "Defines a size range greater than or equal to min and less than or equal to max."
29744 "syntax": "<track-size>+",
29748 "name": "MDN Reference",
29749 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
29752 "description": "Specifies the size of implicitly created columns.",
29759 "name": "grid-auto-flow",
29770 "description": "The auto-placement algorithm places items by filling each row in turn, adding new rows as necessary."
29774 "description": "The auto-placement algorithm places items by filling each column in turn, adding new columns as necessary."
29778 "description": "If specified, the auto-placement algorithm uses a “dense” packing algorithm, which attempts to fill in holes earlier in the grid if smaller items come up later."
29781 "syntax": "[ row | column ] || dense",
29785 "name": "MDN Reference",
29786 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
29789 "description": "Controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.",
29795 "name": "grid-auto-rows",
29798 "name": "min-content",
29799 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
29802 "name": "max-content",
29803 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
29807 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
29810 "name": "minmax()",
29811 "description": "Defines a size range greater than or equal to min and less than or equal to max."
29814 "syntax": "<track-size>+",
29818 "name": "MDN Reference",
29819 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
29822 "description": "Specifies the size of implicitly created rows.",
29829 "name": "grid-column",
29840 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
29844 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
29847 "syntax": "<grid-line> [ / <grid-line> ]?",
29851 "name": "MDN Reference",
29852 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column"
29855 "description": "Shorthand for 'grid-column-start' and 'grid-column-end'.",
29863 "name": "grid-column-end",
29874 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
29878 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
29881 "syntax": "<grid-line>",
29885 "name": "MDN Reference",
29886 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
29889 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
29897 "name": "grid-column-gap",
29904 "status": "obsolete",
29905 "syntax": "<length-percentage>",
29907 "description": "Specifies the gutters between grid columns. Replaced by 'column-gap' property.",
29913 "name": "grid-column-start",
29924 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
29928 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
29931 "syntax": "<grid-line>",
29935 "name": "MDN Reference",
29936 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
29939 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
29947 "name": "grid-gap",
29954 "status": "obsolete",
29955 "syntax": "<'grid-row-gap'> <'grid-column-gap'>?",
29957 "description": "Shorthand that specifies the gutters between grid columns and grid rows in one declaration. Replaced by 'gap' property.",
29963 "name": "grid-row",
29974 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
29978 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
29981 "syntax": "<grid-line> [ / <grid-line> ]?",
29985 "name": "MDN Reference",
29986 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row"
29989 "description": "Shorthand for 'grid-row-start' and 'grid-row-end'.",
29997 "name": "grid-row-end",
30008 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
30012 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
30015 "syntax": "<grid-line>",
30019 "name": "MDN Reference",
30020 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
30023 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
30031 "name": "grid-row-gap",
30038 "status": "obsolete",
30039 "syntax": "<length-percentage>",
30041 "description": "Specifies the gutters between grid rows. Replaced by 'row-gap' property.",
30047 "name": "grid-row-start",
30058 "description": "The property contributes nothing to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of one."
30062 "description": "Contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is N lines from its opposite edge."
30065 "syntax": "<grid-line>",
30069 "name": "MDN Reference",
30070 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
30073 "description": "Determine a grid item’s size and location within the grid by contributing a line, a span, or nothing (automatic) to its grid placement.",
30081 "name": "grid-template",
30092 "description": "Sets all three properties to their initial values."
30095 "name": "min-content",
30096 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
30099 "name": "max-content",
30100 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
30104 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
30108 "description": "Sets 'grid-template-rows' and 'grid-template-columns' to 'subgrid', and 'grid-template-areas' to its initial value."
30111 "name": "minmax()",
30112 "description": "Defines a size range greater than or equal to min and less than or equal to max."
30115 "name": "repeat()",
30116 "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
30119 "syntax": "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
30123 "name": "MDN Reference",
30124 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template"
30127 "description": "Shorthand for setting grid-template-columns, grid-template-rows, and grid-template-areas in a single declaration.",
30137 "name": "grid-template-areas",
30148 "description": "The grid container doesn’t define any named grid areas."
30151 "syntax": "none | <string>+",
30155 "name": "MDN Reference",
30156 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
30159 "description": "Specifies named grid areas, which are not associated with any particular grid item, but can be referenced from the grid-placement properties.",
30165 "name": "grid-template-columns",
30176 "description": "There is no explicit grid; any rows/columns will be implicitly generated."
30179 "name": "min-content",
30180 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
30183 "name": "max-content",
30184 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
30188 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
30192 "description": "Indicates that the grid will align to its parent grid in that axis."
30195 "name": "minmax()",
30196 "description": "Defines a size range greater than or equal to min and less than or equal to max."
30199 "name": "repeat()",
30200 "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
30203 "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
30207 "name": "MDN Reference",
30208 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
30211 "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
30220 "name": "grid-template-rows",
30231 "description": "There is no explicit grid; any rows/columns will be implicitly generated."
30234 "name": "min-content",
30235 "description": "Represents the largest min-content contribution of the grid items occupying the grid track."
30238 "name": "max-content",
30239 "description": "Represents the largest max-content contribution of the grid items occupying the grid track."
30243 "description": "As a maximum, identical to 'max-content'. As a minimum, represents the largest minimum size (as specified by min-width/min-height) of the grid items occupying the grid track."
30247 "description": "Indicates that the grid will align to its parent grid in that axis."
30250 "name": "minmax()",
30251 "description": "Defines a size range greater than or equal to min and less than or equal to max."
30254 "name": "repeat()",
30255 "description": "Represents a repeated fragment of the track list, allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form."
30258 "syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
30262 "name": "MDN Reference",
30263 "url": "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
30266 "description": "specifies, as a space-separated track list, the line names and track sizing functions of the grid.",
30280 "description": "The height depends on the values of other properties."
30283 "name": "fit-content",
30284 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
30287 "name": "max-content",
30288 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
30291 "name": "min-content",
30292 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
30295 "syntax": "<viewport-length>{1,2}",
30299 "name": "MDN Reference",
30300 "url": "https://developer.mozilla.org/docs/Web/CSS/height"
30303 "description": "Specifies the height of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
30314 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
30318 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
30322 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
30325 "syntax": "none | manual | auto",
30329 "name": "MDN Reference",
30330 "url": "https://developer.mozilla.org/docs/Web/CSS/hyphens"
30333 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
30339 "name": "image-orientation",
30350 "description": "After rotating by the precededing angle, the image is flipped horizontally. Defaults to 0deg if the angle is ommitted."
30353 "name": "from-image",
30354 "description": "If the image has an orientation specified in its metadata, such as EXIF, this value computes to the angle that the metadata specifies is necessary to correctly orient the image."
30357 "syntax": "from-image | <angle> | [ <angle>? flip ]",
30361 "name": "MDN Reference",
30362 "url": "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
30365 "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
30371 "name": "image-rendering",
30382 "description": "The image should be scaled with an algorithm that maximizes the appearance of the image."
30385 "name": "crisp-edges",
30386 "description": "The image must be scaled with an algorithm that preserves contrast and edges in the image, and which does not smooth colors or introduce blur to the image in the process."
30389 "name": "-moz-crisp-edges",
30399 "name": "optimizeQuality",
30400 "description": "Deprecated."
30403 "name": "optimizeSpeed",
30404 "description": "Deprecated."
30407 "name": "pixelated",
30408 "description": "When scaling the image up, the 'nearest neighbor' or similar algorithm must be used, so that the image appears to be simply composed of very large pixels."
30411 "syntax": "auto | crisp-edges | pixelated",
30415 "name": "MDN Reference",
30416 "url": "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
30419 "description": "Provides a hint to the user-agent about what aspects of an image are most important to preserve when the image is scaled, to aid the user-agent in the choice of an appropriate scaling algorithm.",
30425 "name": "ime-mode",
30434 "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
30438 "description": "No change is made to the current input method editor state. This is the default."
30441 "name": "disabled",
30442 "description": "The input method editor is disabled and may not be activated by the user."
30445 "name": "inactive",
30446 "description": "The input method editor is initially inactive, but the user may activate it if they wish."
30450 "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
30453 "status": "obsolete",
30454 "syntax": "auto | normal | active | inactive | disabled",
30458 "name": "MDN Reference",
30459 "url": "https://developer.mozilla.org/docs/Web/CSS/ime-mode"
30462 "description": "Controls the state of the input method editor for text fields.",
30468 "name": "inline-size",
30479 "description": "Depends on the values of other properties."
30482 "syntax": "<'width'>",
30486 "name": "MDN Reference",
30487 "url": "https://developer.mozilla.org/docs/Web/CSS/inline-size"
30490 "description": "Logical 'height'. Mapping depends on the element’s 'writing-mode'.",
30497 "name": "isolation",
30508 "description": "Elements are not isolated unless an operation is applied that causes the creation of a stacking context."
30512 "description": "In CSS will turn the element into a stacking context."
30515 "syntax": "auto | isolate",
30519 "name": "MDN Reference",
30520 "url": "https://developer.mozilla.org/docs/Web/CSS/isolation"
30523 "description": "In CSS setting to 'isolate' will turn the element into a stacking context. In SVG, it defines whether an element is isolated or not.",
30529 "name": "justify-content",
30533 "description": "Flex items are packed toward the center of the line."
30537 "description": "The items are packed flush to each other toward the start edge of the alignment container in the main axis."
30541 "description": "The items are packed flush to each other toward the end edge of the alignment container in the main axis."
30545 "description": "The items are packed flush to each other toward the left edge of the alignment container in the main axis."
30549 "description": "The items are packed flush to each other toward the right edge of the alignment container in the main axis."
30553 "description": "If the size of the item overflows the alignment container, the item is instead aligned as if the alignment mode were start."
30557 "description": "Regardless of the relative sizes of the item and alignment container, the given alignment value is honored."
30561 "description": "If the combined size of the alignment subjects is less than the size of the alignment container, any auto-sized alignment subjects have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container."
30564 "name": "space-evenly",
30565 "description": "The items are evenly distributed within the alignment container along the main axis."
30568 "name": "flex-end",
30569 "description": "Flex items are packed toward the end of the line."
30572 "name": "flex-start",
30573 "description": "Flex items are packed toward the start of the line."
30576 "name": "space-around",
30577 "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
30580 "name": "space-between",
30581 "description": "Flex items are evenly distributed in the line."
30584 "name": "baseline",
30585 "description": "Specifies participation in first-baseline alignment."
30588 "name": "first baseline",
30589 "description": "Specifies participation in first-baseline alignment."
30592 "name": "last baseline",
30593 "description": "Specifies participation in last-baseline alignment."
30596 "syntax": "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
30598 "description": "Aligns flex items along the main axis of the current line of the flex container.",
30608 "description": "Indicates that the user agent should adjust inter-glyph spacing based on kerning tables that are included in the font that will be used."
30612 "description": "Indicates whether the user agent should adjust inter-glyph spacing based on kerning tables that are included in the relevant font or instead disable auto-kerning and set inter-character spacing to a specific length.",
30623 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
30626 "syntax": "<length> | <percentage> | auto",
30630 "name": "MDN Reference",
30631 "url": "https://developer.mozilla.org/docs/Web/CSS/left"
30634 "description": "Specifies how far an absolutely positioned box's left margin edge is offset to the right of the left edge of the box's 'containing block'.",
30641 "name": "letter-spacing",
30645 "description": "The spacing is the normal spacing for the current font. It is typically zero-length."
30648 "syntax": "normal | <length>",
30652 "name": "MDN Reference",
30653 "url": "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
30656 "description": "Specifies the minimum, maximum, and optimal spacing between grapheme clusters.",
30662 "name": "lighting-color",
30672 "description": "Defines the color of the light source for filter primitives 'feDiffuseLighting' and 'feSpecularLighting'.",
30678 "name": "line-break",
30682 "description": "The UA determines the set of line-breaking restrictions to use for CJK scripts, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines."
30686 "description": "Breaks text using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
30690 "description": "Breaks text using the most common set of line-breaking rules."
30694 "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
30697 "syntax": "auto | loose | normal | strict | anywhere",
30701 "name": "MDN Reference",
30702 "url": "https://developer.mozilla.org/docs/Web/CSS/line-break"
30705 "description": "Specifies what set of line breaking restrictions are in effect within the element.",
30711 "name": "line-height",
30715 "description": "Tells user agents to set the computed value to a 'reasonable' value based on the font size of the element."
30718 "syntax": "normal | <number> | <length> | <percentage>",
30722 "name": "MDN Reference",
30723 "url": "https://developer.mozilla.org/docs/Web/CSS/line-height"
30726 "description": "Determines the block-progression dimension of the text content area of an inline box.",
30734 "name": "list-style",
30741 "description": "A hollow circle."
30747 "name": "decimal-leading-zero"
30751 "description": "A filled circle."
30758 "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
30761 "name": "lower-alpha"
30764 "name": "lower-greek"
30767 "name": "lower-latin"
30770 "name": "lower-roman"
30777 "description": "The ::marker pseudo-element is an inline element placed immediately before all ::before pseudo-elements in the principal block box, after which the element's content flows."
30781 "description": "A filled square."
30784 "name": "symbols()",
30785 "description": "Allows a counter style to be defined inline."
30788 "name": "upper-alpha"
30791 "name": "upper-latin"
30794 "name": "upper-roman"
30800 "syntax": "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
30804 "name": "MDN Reference",
30805 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style"
30808 "description": "Shorthand for setting 'list-style-type', 'list-style-position' and 'list-style-image'",
30816 "name": "list-style-image",
30820 "description": "The default contents of the of the list item’s marker are given by 'list-style-type' instead."
30823 "syntax": "<url> | none",
30827 "name": "MDN Reference",
30828 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
30831 "description": "Sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker.",
30837 "name": "list-style-position",
30841 "description": "The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."
30845 "description": "The ::marker pseudo-element is an inline element placed immediately before all ::before pseudo-elements in the principal block box, after which the element's content flows."
30848 "syntax": "inside | outside",
30852 "name": "MDN Reference",
30853 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
30856 "description": "Specifies the position of the '::marker' pseudo-element's box in the list item.",
30862 "name": "list-style-type",
30865 "name": "armenian",
30866 "description": "Traditional uppercase Armenian numbering."
30870 "description": "A hollow circle."
30874 "description": "Western decimal numbers."
30877 "name": "decimal-leading-zero",
30878 "description": "Decimal numbers padded by initial zeros."
30882 "description": "A filled circle."
30885 "name": "georgian",
30886 "description": "Traditional Georgian numbering."
30889 "name": "lower-alpha",
30890 "description": "Lowercase ASCII letters."
30893 "name": "lower-greek",
30894 "description": "Lowercase classical Greek."
30897 "name": "lower-latin",
30898 "description": "Lowercase ASCII letters."
30901 "name": "lower-roman",
30902 "description": "Lowercase ASCII Roman numerals."
30906 "description": "No marker"
30910 "description": "A filled square."
30913 "name": "symbols()",
30914 "description": "Allows a counter style to be defined inline."
30917 "name": "upper-alpha",
30918 "description": "Uppercase ASCII letters."
30921 "name": "upper-latin",
30922 "description": "Uppercase ASCII letters."
30925 "name": "upper-roman",
30926 "description": "Uppercase ASCII Roman numerals."
30929 "syntax": "<counter-style> | <string> | none",
30933 "name": "MDN Reference",
30934 "url": "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
30937 "description": "Used to construct the default contents of a list item’s marker",
30950 "syntax": "[ <length> | <percentage> | auto ]{1,4}",
30954 "name": "MDN Reference",
30955 "url": "https://developer.mozilla.org/docs/Web/CSS/margin"
30958 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits.",
30965 "name": "margin-block-end",
30978 "syntax": "<'margin-left'>",
30982 "name": "MDN Reference",
30983 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
30986 "description": "Logical 'margin-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
30993 "name": "margin-block-start",
31006 "syntax": "<'margin-left'>",
31010 "name": "MDN Reference",
31011 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
31014 "description": "Logical 'margin-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
31021 "name": "margin-bottom",
31027 "syntax": "<length> | <percentage> | auto",
31031 "name": "MDN Reference",
31032 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
31035 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
31042 "name": "margin-inline-end",
31055 "syntax": "<'margin-left'>",
31059 "name": "MDN Reference",
31060 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
31063 "description": "Logical 'margin-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
31070 "name": "margin-inline-start",
31083 "syntax": "<'margin-left'>",
31087 "name": "MDN Reference",
31088 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
31091 "description": "Logical 'margin-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
31098 "name": "margin-left",
31104 "syntax": "<length> | <percentage> | auto",
31108 "name": "MDN Reference",
31109 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-left"
31112 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
31119 "name": "margin-right",
31125 "syntax": "<length> | <percentage> | auto",
31129 "name": "MDN Reference",
31130 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-right"
31133 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
31140 "name": "margin-top",
31146 "syntax": "<length> | <percentage> | auto",
31150 "name": "MDN Reference",
31151 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-top"
31154 "description": "Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits..",
31165 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
31169 "description": "Indicates that the <marker> element referenced will be used."
31173 "description": "Specifies the marker symbol that shall be used for all points on the sets the value for all vertices on the given ‘path’ element or basic shape.",
31179 "name": "marker-end",
31183 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
31187 "description": "Indicates that the <marker> element referenced will be used."
31191 "description": "Specifies the marker that will be drawn at the last vertices of the given markable element.",
31197 "name": "marker-mid",
31201 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
31205 "description": "Indicates that the <marker> element referenced will be used."
31209 "description": "Specifies the marker that will be drawn at all vertices except the first and last.",
31215 "name": "marker-start",
31219 "description": "Indicates that no marker symbol will be drawn at the given vertex or vertices."
31223 "description": "Indicates that the <marker> element referenced will be used."
31227 "description": "Specifies the marker that will be drawn at the first vertices of the given markable element.",
31233 "name": "mask-image",
31244 "description": "Counts as a transparent black image layer."
31248 "description": "Reference to a <mask element or to a CSS image."
31251 "syntax": "<mask-reference>#",
31255 "name": "MDN Reference",
31256 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-image"
31259 "description": "Sets the mask layer image of an element.",
31267 "name": "mask-mode",
31274 "description": "Alpha values of the mask layer image should be used as the mask values."
31278 "description": "Use alpha values if 'mask-image' is an image, luminance if a <mask> element or a CSS image."
31281 "name": "luminance",
31282 "description": "Luminance values of the mask layer image should be used as the mask values."
31285 "syntax": "<masking-mode>#",
31289 "name": "MDN Reference",
31290 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
31293 "description": "Indicates whether the mask layer image is treated as luminance mask or alpha mask.",
31301 "name": "mask-origin",
31309 "syntax": "<geometry-box>#",
31313 "name": "MDN Reference",
31314 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
31317 "description": "Specifies the mask positioning area.",
31324 "name": "mask-position",
31332 "syntax": "<position>#",
31336 "name": "MDN Reference",
31337 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-position"
31340 "description": "Specifies how mask layer images are positioned.",
31348 "name": "mask-repeat",
31356 "syntax": "<repeat-style>#",
31360 "name": "MDN Reference",
31361 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
31364 "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
31370 "name": "mask-size",
31381 "description": "Resolved by using the image’s intrinsic ratio and the size of the other dimension, or failing that, using the image’s intrinsic size, or failing that, treating it as 100%."
31385 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
31389 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
31392 "syntax": "<bg-size>#",
31396 "name": "MDN Reference",
31397 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-size"
31400 "description": "Specifies the size of the mask layer images.",
31408 "name": "mask-type",
31419 "description": "Indicates that the alpha values of the mask should be used."
31422 "name": "luminance",
31423 "description": "Indicates that the luminance values of the mask should be used."
31426 "syntax": "luminance | alpha",
31430 "name": "MDN Reference",
31431 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-type"
31434 "description": "Defines whether the content of the <mask> element is treated as as luminance mask or alpha mask.",
31440 "name": "max-block-size",
31451 "description": "No limit on the width of the box."
31454 "syntax": "<'max-width'>",
31458 "name": "MDN Reference",
31459 "url": "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
31462 "description": "Logical 'max-width'. Mapping depends on the element’s 'writing-mode'.",
31469 "name": "max-height",
31473 "description": "No limit on the height of the box."
31476 "name": "fit-content",
31477 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
31480 "name": "max-content",
31481 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
31484 "name": "min-content",
31485 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
31488 "syntax": "<viewport-length>",
31492 "name": "MDN Reference",
31493 "url": "https://developer.mozilla.org/docs/Web/CSS/max-height"
31496 "description": "Allows authors to constrain content height to a certain range.",
31503 "name": "max-inline-size",
31514 "description": "No limit on the height of the box."
31517 "syntax": "<'max-width'>",
31521 "name": "MDN Reference",
31522 "url": "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
31525 "description": "Logical 'max-height'. Mapping depends on the element’s 'writing-mode'.",
31532 "name": "max-width",
31536 "description": "No limit on the width of the box."
31539 "name": "fit-content",
31540 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
31543 "name": "max-content",
31544 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
31547 "name": "min-content",
31548 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
31551 "syntax": "<viewport-length>",
31555 "name": "MDN Reference",
31556 "url": "https://developer.mozilla.org/docs/Web/CSS/max-width"
31559 "description": "Allows authors to constrain content width to a certain range.",
31566 "name": "min-block-size",
31574 "syntax": "<'min-width'>",
31578 "name": "MDN Reference",
31579 "url": "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
31582 "description": "Logical 'min-width'. Mapping depends on the element’s 'writing-mode'.",
31589 "name": "min-height",
31595 "name": "fit-content",
31596 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
31599 "name": "max-content",
31600 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
31603 "name": "min-content",
31604 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
31607 "syntax": "<viewport-length>",
31611 "name": "MDN Reference",
31612 "url": "https://developer.mozilla.org/docs/Web/CSS/min-height"
31615 "description": "Allows authors to constrain content height to a certain range.",
31622 "name": "min-inline-size",
31630 "syntax": "<'min-width'>",
31634 "name": "MDN Reference",
31635 "url": "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
31638 "description": "Logical 'min-height'. Mapping depends on the element’s 'writing-mode'.",
31645 "name": "min-width",
31651 "name": "fit-content",
31652 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
31655 "name": "max-content",
31656 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
31659 "name": "min-content",
31660 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
31663 "syntax": "<viewport-length>",
31667 "name": "MDN Reference",
31668 "url": "https://developer.mozilla.org/docs/Web/CSS/min-width"
31671 "description": "Allows authors to constrain content width to a certain range.",
31678 "name": "mix-blend-mode",
31689 "description": "Default attribute which specifies no blending"
31692 "name": "multiply",
31693 "description": "The source color is multiplied by the destination color and replaces the destination."
31697 "description": "Multiplies the complements of the backdrop and source color values, then complements the result."
31701 "description": "Multiplies or screens the colors, depending on the backdrop color value."
31705 "description": "Selects the darker of the backdrop and source colors."
31709 "description": "Selects the lighter of the backdrop and source colors."
31712 "name": "color-dodge",
31713 "description": "Brightens the backdrop color to reflect the source color."
31716 "name": "color-burn",
31717 "description": "Darkens the backdrop color to reflect the source color."
31720 "name": "hard-light",
31721 "description": "Multiplies or screens the colors, depending on the source color value."
31724 "name": "soft-light",
31725 "description": "Darkens or lightens the colors, depending on the source color value."
31728 "name": "difference",
31729 "description": "Subtracts the darker of the two constituent colors from the lighter color.."
31732 "name": "exclusion",
31733 "description": "Produces an effect similar to that of the Difference mode but lower in contrast."
31744 "description": "Creates a color with the hue of the source color and the saturation and luminosity of the backdrop color."
31747 "name": "saturation",
31755 "description": "Creates a color with the saturation of the source color and the hue and luminosity of the backdrop color."
31766 "description": "Creates a color with the hue and saturation of the source color and the luminosity of the backdrop color."
31769 "name": "luminosity",
31777 "description": "Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color."
31780 "syntax": "<blend-mode>",
31784 "name": "MDN Reference",
31785 "url": "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
31788 "description": "Defines the formula that must be used to mix the colors with the backdrop.",
31802 "description": "No motion path gets created."
31806 "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
31810 "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
31814 "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
31818 "description": "Shorthand property for setting 'motion-path', 'motion-offset' and 'motion-rotation'.",
31830 "name": "motion-offset",
31836 "description": "A distance that describes the position along the specified motion path.",
31843 "name": "motion-path",
31851 "description": "No motion path gets created."
31855 "description": "Defines an SVG path as a string, with optional 'fill-rule' as the first argument."
31859 "description": "Specifies the motion path the element gets positioned at.",
31868 "name": "motion-rotation",
31876 "description": "Indicates that the object is rotated by the angle of the direction of the motion path."
31880 "description": "Indicates that the object is rotated by the angle of the direction of the motion path plus 180 degrees."
31884 "description": "Defines the direction of the element while positioning along the motion path.",
31890 "name": "-moz-animation",
31896 "name": "alternate",
31897 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
31900 "name": "alternate-reverse",
31901 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
31904 "name": "backwards",
31905 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
31909 "description": "Both forwards and backwards fill modes are applied."
31912 "name": "forwards",
31913 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
31916 "name": "infinite",
31917 "description": "Causes the animation to repeat forever."
31921 "description": "No animation is performed"
31925 "description": "Normal playback."
31929 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
31933 "description": "Shorthand property combines six of the animation properties into a single property.",
31943 "name": "-moz-animation-delay",
31948 "description": "Defines when the animation will start.",
31954 "name": "-moz-animation-direction",
31960 "name": "alternate",
31961 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
31964 "name": "alternate-reverse",
31965 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
31969 "description": "Normal playback."
31973 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
31977 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
31983 "name": "-moz-animation-duration",
31988 "description": "Defines the length of time that an animation takes to complete one cycle.",
31994 "name": "-moz-animation-iteration-count",
32000 "name": "infinite",
32001 "description": "Causes the animation to repeat forever."
32005 "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
32012 "name": "-moz-animation-name",
32019 "description": "No animation is performed"
32023 "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
32030 "name": "-moz-animation-play-state",
32037 "description": "A running animation will be paused."
32041 "description": "Resume playback of a paused animation."
32045 "description": "Defines whether the animation is running or paused.",
32051 "name": "-moz-animation-timing-function",
32056 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
32062 "name": "-moz-appearance",
32071 "name": "button-arrow-down"
32074 "name": "button-arrow-next"
32077 "name": "button-arrow-previous"
32080 "name": "button-arrow-up"
32083 "name": "button-bevel"
32089 "name": "checkbox-container"
32092 "name": "checkbox-label"
32104 "name": "menuarrow"
32107 "name": "menuimage"
32113 "name": "menuitemtext"
32119 "name": "menulist-button"
32122 "name": "menulist-text"
32125 "name": "menulist-textfield"
32128 "name": "menupopup"
32131 "name": "menuradio"
32134 "name": "menuseparator"
32137 "name": "-moz-mac-unified-toolbar"
32140 "name": "-moz-win-borderless-glass"
32143 "name": "-moz-win-browsertabbar-toolbox"
32146 "name": "-moz-win-communications-toolbox"
32149 "name": "-moz-win-glass"
32152 "name": "-moz-win-media-toolbox"
32158 "name": "progressbar"
32161 "name": "progresschunk"
32167 "name": "radio-container"
32170 "name": "radio-label"
32173 "name": "radiomenuitem"
32179 "name": "resizerpanel"
32182 "name": "scrollbarbutton-down"
32185 "name": "scrollbarbutton-left"
32188 "name": "scrollbarbutton-right"
32191 "name": "scrollbarbutton-up"
32194 "name": "scrollbar-small"
32197 "name": "scrollbartrack-horizontal"
32200 "name": "scrollbartrack-vertical"
32203 "name": "separator"
32209 "name": "spinner-downbutton"
32212 "name": "spinner-textfield"
32215 "name": "spinner-upbutton"
32218 "name": "statusbar"
32221 "name": "statusbarpanel"
32227 "name": "tabpanels"
32230 "name": "tab-scroll-arrow-back"
32233 "name": "tab-scroll-arrow-forward"
32236 "name": "textfield"
32239 "name": "textfield-multiline"
32251 "name": "treeheadercell"
32254 "name": "treeheadersortarrow"
32260 "name": "treetwistyopen"
32266 "name": "treewisty"
32272 "status": "nonstandard",
32273 "syntax": "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",
32275 "description": "Used in Gecko (Firefox) to display an element using a platform-native styling based on the operating system's theme.",
32281 "name": "-moz-backface-visibility",
32294 "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
32300 "name": "-moz-background-clip",
32310 "description": "Determines the background painting area.",
32317 "name": "-moz-background-inline-policy",
32323 "name": "bounding-box"
32326 "name": "continuous"
32333 "description": "In Gecko-based applications like Firefox, the -moz-background-inline-policy CSS property specifies how the background image of an inline element is determined when the content of the inline element wraps onto multiple lines. The choice of position has significant effects on repetition.",
32339 "name": "-moz-background-origin",
32344 "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
32350 "name": "-moz-border-bottom-colors",
32354 "status": "nonstandard",
32355 "syntax": "<color>+ | none",
32357 "description": "Sets a list of colors for the bottom border.",
32363 "name": "-moz-border-image",
32370 "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
32374 "description": "Causes the middle part of the border-image to be preserved."
32381 "description": "The image is tiled (repeated) to fill the area."
32385 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
32389 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
32393 "description": "The image is stretched to fill the area."
32400 "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
32410 "name": "-moz-border-left-colors",
32414 "status": "nonstandard",
32415 "syntax": "<color>+ | none",
32417 "description": "Sets a list of colors for the bottom border.",
32423 "name": "-moz-border-right-colors",
32427 "status": "nonstandard",
32428 "syntax": "<color>+ | none",
32430 "description": "Sets a list of colors for the bottom border.",
32436 "name": "-moz-border-top-colors",
32440 "status": "nonstandard",
32441 "syntax": "<color>+ | none",
32443 "description": "Ske Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",
32449 "name": "-moz-box-align",
32455 "name": "baseline",
32456 "description": "If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used."
32460 "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
32464 "description": "For normal direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element."
32468 "description": "For normal direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element."
32472 "description": "The height of each child is adjusted to that of the containing block."
32476 "description": "Specifies how a XUL box aligns its contents across (perpendicular to) the direction of its layout. The effect of this is only visible if there is extra space in the box.",
32482 "name": "-moz-box-direction",
32489 "description": "A box with a computed value of horizontal for box-orient displays its children from left to right. A box with a computed value of vertical displays its children from top to bottom."
32493 "description": "A box with a computed value of horizontal for box-orient displays its children from right to left. A box with a computed value of vertical displays its children from bottom to top."
32497 "description": "Specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).",
32503 "name": "-moz-box-flex",
32508 "description": "Specifies how a box grows to fill the box that contains it, in the direction of the containing box's layout.",
32514 "name": "-moz-box-flexgroup",
32519 "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
32525 "name": "-moz-box-ordinal-group",
32530 "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
32536 "name": "-moz-box-orient",
32542 "name": "block-axis",
32543 "description": "Elements are oriented along the box's axis."
32546 "name": "horizontal",
32547 "description": "The box displays its children from left to right in a horizontal line."
32550 "name": "inline-axis",
32551 "description": "Elements are oriented vertically."
32554 "name": "vertical",
32555 "description": "The box displays its children from stacked from top to bottom vertically."
32559 "description": "In Mozilla applications, -moz-box-orient specifies whether a box lays out its contents horizontally or vertically.",
32565 "name": "-moz-box-pack",
32572 "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
32576 "description": "For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."
32580 "description": "The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."
32584 "description": "For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."
32588 "description": "Specifies how a box packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box.",
32594 "name": "-moz-box-sizing",
32600 "name": "border-box",
32601 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
32604 "name": "content-box",
32605 "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
32608 "name": "padding-box",
32609 "description": "The specified width and height (and respective min/max properties) on this element determine the padding box of the element."
32613 "description": "Box Model addition in CSS3.",
32619 "name": "-moz-column-count",
32626 "description": "Determines the number of columns by the 'column-width' property and the element width."
32630 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
32636 "name": "-moz-column-gap",
32643 "description": "User agent specific and typically equivalent to 1em."
32647 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
32653 "name": "-moz-column-rule",
32658 "description": "Shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
32667 "name": "-moz-column-rule-color",
32672 "description": "Sets the color of the column rule",
32678 "name": "-moz-column-rule-style",
32683 "description": "Sets the style of the rule between columns of an element.",
32689 "name": "-moz-column-rule-width",
32694 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
32701 "name": "-moz-columns",
32708 "description": "The width depends on the values of other properties."
32712 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
32719 "name": "-moz-column-width",
32726 "description": "The width depends on the values of other properties."
32730 "description": "This property describes the width of columns in multicol elements.",
32736 "name": "-moz-font-feature-settings",
32770 "description": "No change in glyph substitution or positioning occurs."
32786 "description": "Provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
32793 "name": "-moz-hyphens",
32800 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
32804 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
32808 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
32812 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
32818 "name": "-moz-perspective",
32825 "description": "No perspective transform is applied."
32829 "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
32835 "name": "-moz-perspective-origin",
32840 "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
32848 "name": "-moz-text-align-last",
32858 "description": "The inline contents are centered within the line box."
32862 "description": "The text is justified according to the method specified by the 'text-justify' property."
32866 "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
32870 "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
32874 "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
32880 "name": "-moz-text-decoration-color",
32885 "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
32891 "name": "-moz-text-decoration-line",
32897 "name": "line-through",
32898 "description": "Each line of text has a line through the middle."
32902 "description": "Neither produces nor inhibits text decoration."
32905 "name": "overline",
32906 "description": "Each line of text has a line above it."
32909 "name": "underline",
32910 "description": "Each line of text is underlined."
32914 "description": "Specifies what line decorations, if any, are added to the element.",
32920 "name": "-moz-text-decoration-style",
32927 "description": "Produces a dashed line style."
32931 "description": "Produces a dotted line."
32935 "description": "Produces a double line."
32939 "description": "Produces no line."
32943 "description": "Produces a solid line."
32947 "description": "Produces a wavy line."
32951 "description": "Specifies the line style for underline, line-through and overline text decoration.",
32957 "name": "-moz-text-size-adjust",
32964 "description": "Renderers must use the default size adjustment when displaying on a small device."
32968 "description": "Renderers must not do size adjustment when displaying on a small device."
32972 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
32979 "name": "-moz-transform",
32985 "name": "matrix()",
32986 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
32989 "name": "matrix3d()",
32990 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
32996 "name": "perspective",
32997 "description": "Specifies a perspective projection matrix."
33000 "name": "rotate()",
33001 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
33004 "name": "rotate3d()",
33005 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
33008 "name": "rotateX('angle')",
33009 "description": "Specifies a clockwise rotation by the given angle about the X axis."
33012 "name": "rotateY('angle')",
33013 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
33016 "name": "rotateZ('angle')",
33017 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
33021 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
33024 "name": "scale3d()",
33025 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
33028 "name": "scaleX()",
33029 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
33032 "name": "scaleY()",
33033 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
33036 "name": "scaleZ()",
33037 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
33041 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
33045 "description": "Specifies a skew transformation along the X axis by the given angle."
33049 "description": "Specifies a skew transformation along the Y axis by the given angle."
33052 "name": "translate()",
33053 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
33056 "name": "translate3d()",
33057 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
33060 "name": "translateX()",
33061 "description": "Specifies a translation by the given amount in the X direction."
33064 "name": "translateY()",
33065 "description": "Specifies a translation by the given amount in the Y direction."
33068 "name": "translateZ()",
33069 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
33073 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
33079 "name": "-moz-transform-origin",
33084 "description": "Establishes the origin of transformation for an element.",
33092 "name": "-moz-transition",
33099 "description": "Every property that is able to undergo a transition will do so."
33103 "description": "No property will transition."
33107 "description": "Shorthand property combines four of the transition properties into a single property.",
33116 "name": "-moz-transition-delay",
33121 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
33127 "name": "-moz-transition-duration",
33132 "description": "Specifies how long the transition from the old value to the new value should take.",
33138 "name": "-moz-transition-property",
33145 "description": "Every property that is able to undergo a transition will do so."
33149 "description": "No property will transition."
33153 "description": "Specifies the name of the CSS property to which the transition is applied.",
33159 "name": "-moz-transition-timing-function",
33164 "description": "Describes how the intermediate values used during a transition will be calculated.",
33170 "name": "-moz-user-focus",
33182 "status": "nonstandard",
33183 "syntax": "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
33187 "name": "MDN Reference",
33188 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
33191 "description": "Used to indicate whether the element can have focus."
33194 "name": "-moz-user-select",
33212 "name": "-moz-none"
33225 "description": "Controls the appearance of selection.",
33231 "name": "-ms-accelerator",
33239 "description": "The element does not contain an accelerator key sequence."
33243 "description": "The element contains an accelerator key sequence."
33246 "status": "nonstandard",
33247 "syntax": "false | true",
33249 "description": "IE only. Has the ability to turn off its system underlines for accelerator keys until the ALT key is pressed",
33255 "name": "-ms-behavior",
33260 "description": "IE only. Used to extend behaviors of the browser",
33266 "name": "-ms-block-progression",
33273 "description": "Bottom-to-top block flow. Layout is horizontal."
33277 "description": "Left-to-right direction. The flow orientation is vertical."
33281 "description": "Right-to-left direction. The flow orientation is vertical."
33285 "description": "Top-to-bottom direction. The flow orientation is horizontal."
33288 "status": "nonstandard",
33289 "syntax": "tb | rl | bt | lr",
33291 "description": "Sets the block-progression value and the flow orientation",
33297 "name": "-ms-content-zoom-chaining",
33305 "description": "The nearest zoomable parent element begins zooming when the user hits a zoom limit during a manipulation. No bounce effect is shown."
33309 "description": "A bounce effect is shown when the user hits a zoom limit during a manipulation."
33312 "status": "nonstandard",
33313 "syntax": "none | chained",
33315 "description": "Specifies the zoom behavior that occurs when a user hits the zoom limit during a manipulation."
33318 "name": "-ms-content-zooming",
33326 "description": "The element is not zoomable."
33330 "description": "The element is zoomable."
33333 "status": "nonstandard",
33334 "syntax": "none | zoom",
33336 "description": "Specifies whether zooming is enabled.",
33342 "name": "-ms-content-zoom-limit",
33347 "status": "nonstandard",
33348 "syntax": "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
33350 "description": "Shorthand property for the -ms-content-zoom-limit-min and -ms-content-zoom-limit-max properties.",
33356 "name": "-ms-content-zoom-limit-max",
33361 "status": "nonstandard",
33362 "syntax": "<percentage>",
33364 "description": "Specifies the maximum zoom factor.",
33370 "name": "-ms-content-zoom-limit-min",
33375 "status": "nonstandard",
33376 "syntax": "<percentage>",
33378 "description": "Specifies the minimum zoom factor.",
33384 "name": "-ms-content-zoom-snap",
33391 "name": "mandatory",
33392 "description": "Indicates that the motion of the content after the contact is picked up is always adjusted so that it lands on a snap-point."
33396 "description": "Indicates that zooming is unaffected by any defined snap-points."
33399 "name": "proximity",
33400 "description": "Indicates that the motion of the content after the contact is picked up may be adjusted if the content would normally stop \"close enough\" to a snap-point."
33403 "name": "snapInterval(100%, 100%)",
33404 "description": "Specifies where the snap-points will be placed."
33407 "name": "snapList()",
33408 "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
33411 "status": "nonstandard",
33412 "syntax": "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
33414 "description": "Shorthand property for the -ms-content-zoom-snap-type and -ms-content-zoom-snap-points properties."
33417 "name": "-ms-content-zoom-snap-points",
33424 "name": "snapInterval(100%, 100%)",
33425 "description": "Specifies where the snap-points will be placed."
33428 "name": "snapList()",
33429 "description": "Specifies the position of individual snap-points as a comma-separated list of zoom factors."
33432 "status": "nonstandard",
33433 "syntax": "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
33435 "description": "Defines where zoom snap-points are located."
33438 "name": "-ms-content-zoom-snap-type",
33445 "name": "mandatory",
33446 "description": "Indicates that the motion of the content after the contact is picked up is always adjusted so that it lands on a snap-point."
33450 "description": "Indicates that zooming is unaffected by any defined snap-points."
33453 "name": "proximity",
33454 "description": "Indicates that the motion of the content after the contact is picked up may be adjusted if the content would normally stop \"close enough\" to a snap-point."
33457 "status": "nonstandard",
33458 "syntax": "none | proximity | mandatory",
33460 "description": "Specifies how zooming is affected by defined snap-points.",
33466 "name": "-ms-filter",
33470 "status": "nonstandard",
33471 "syntax": "<string>",
33473 "description": "IE only. Used to produce visual effects.",
33479 "name": "-ms-flex",
33486 "description": "Retrieves the value of the main size property as the used 'flex-basis'."
33490 "description": "Expands to '0 0 auto'."
33494 "description": "specifies the parameters of a flexible length: the positive and negative flexibility, and the preferred size.",
33502 "name": "-ms-flex-align",
33508 "name": "baseline",
33509 "description": "If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."
33513 "description": "The flex item’s margin box is centered in the cross axis within the line."
33517 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
33521 "description": "The cross-start margin edge of the flexbox item is placed flush with the cross-start edge of the line."
33525 "description": "If the cross size property of the flexbox item is anything other than 'auto', this value is identical to 'start'."
33529 "description": "Aligns flex items along the cross axis of the current line of the flex container.",
33535 "name": "-ms-flex-direction",
33542 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
33545 "name": "column-reverse",
33546 "description": "Same as 'column', except the main-start and main-end directions are swapped."
33550 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
33553 "name": "row-reverse",
33554 "description": "Same as 'row', except the main-start and main-end directions are swapped."
33558 "description": "Specifies how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.",
33564 "name": "-ms-flex-flow",
33571 "description": "The flex container’s main axis has the same orientation as the block axis of the current writing mode."
33574 "name": "column-reverse",
33575 "description": "Same as 'column', except the main-start and main-end directions are swapped."
33579 "description": "The flex container is single-line."
33583 "description": "The flex container’s main axis has the same orientation as the inline axis of the current writing mode."
33587 "description": "The flexbox is multi-line."
33590 "name": "wrap-reverse",
33591 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
33595 "description": "Specifies how flexbox items are placed in the flexbox.",
33601 "name": "-ms-flex-item-align",
33608 "description": "Computes to the value of 'align-items' on the element’s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."
33611 "name": "baseline",
33612 "description": "If the flex item’s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."
33616 "description": "The flex item’s margin box is centered in the cross axis within the line."
33620 "description": "The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."
33624 "description": "The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."
33628 "description": "If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."
33632 "description": "Allows the default alignment along the cross axis to be overridden for individual flex items.",
33638 "name": "-ms-flex-line-pack",
33645 "description": "Lines are packed toward the center of the flex container."
33648 "name": "distribute",
33649 "description": "Lines are evenly distributed in the flex container, with half-size spaces on either end."
33653 "description": "Lines are packed toward the end of the flex container."
33657 "description": "Lines are evenly distributed in the flex container."
33661 "description": "Lines are packed toward the start of the flex container."
33665 "description": "Lines stretch to take up the remaining space."
33669 "description": "Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",
33675 "name": "-ms-flex-order",
33680 "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
33686 "name": "-ms-flex-pack",
33693 "description": "Flex items are packed toward the center of the line."
33696 "name": "distribute",
33697 "description": "Flex items are evenly distributed in the line, with half-size spaces on either end."
33701 "description": "Flex items are packed toward the end of the line."
33705 "description": "Flex items are evenly distributed in the line."
33709 "description": "Flex items are packed toward the start of the line."
33713 "description": "Aligns flex items along the main axis of the current line of the flex container.",
33719 "name": "-ms-flex-wrap",
33726 "description": "The flex container is single-line."
33730 "description": "The flexbox is multi-line."
33733 "name": "wrap-reverse",
33734 "description": "Same as 'wrap', except the cross-start and cross-end directions are swapped."
33738 "description": "Controls whether the flex container is single-line or multi-line, and the direction of the cross-axis, which determines the direction new lines are stacked in.",
33744 "name": "-ms-flow-from",
33752 "description": "The block container is not a CSS Region."
33755 "status": "nonstandard",
33756 "syntax": "[ none | <custom-ident> ]#",
33758 "description": "Makes a block container a region and associates it with a named flow.",
33764 "name": "-ms-flow-into",
33772 "description": "The element is not moved to a named flow and normal CSS processing takes place."
33775 "status": "nonstandard",
33776 "syntax": "[ none | <custom-ident> ]#",
33778 "description": "Places an element or its contents into a named flow.",
33784 "name": "-ms-grid-column",
33801 "description": "Used to place grid items and explicitly defined grid cells in the Grid.",
33809 "name": "-ms-grid-column-align",
33817 "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's column."
33821 "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's column."
33825 "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's column."
33829 "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's column."
33833 "description": "Aligns the columns in a grid.",
33839 "name": "-ms-grid-columns",
33845 "description": "Lays out the columns of the grid."
33848 "name": "-ms-grid-column-span",
33854 "description": "Specifies the number of columns to span.",
33860 "name": "-ms-grid-layer",
33866 "description": "Grid-layer is similar in concept to z-index, but avoids overloading the meaning of the z-index property, which is applicable only to positioned elements.",
33872 "name": "-ms-grid-row",
33889 "description": "grid-row is used to place grid items and explicitly defined grid cells in the Grid.",
33897 "name": "-ms-grid-row-align",
33905 "description": "Places the center of the Grid Item's margin box at the center of the Grid Item's row."
33909 "description": "Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's row."
33913 "description": "Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's row."
33917 "description": "Ensures that the Grid Item's margin box is equal to the size of the Grid Item's row."
33921 "description": "Aligns the rows in a grid.",
33927 "name": "-ms-grid-rows",
33933 "description": "Lays out the columns of the grid."
33936 "name": "-ms-grid-row-span",
33942 "description": "Specifies the number of rows to span.",
33948 "name": "-ms-high-contrast-adjust",
33956 "description": "Properties will be adjusted as applicable."
33960 "description": "No adjustments will be applied."
33963 "status": "nonstandard",
33964 "syntax": "auto | none",
33966 "description": "Specifies if properties should be adjusted in high contrast mode.",
33972 "name": "-ms-hyphenate-limit-chars",
33980 "description": "The user agent chooses a value that adapts to the current layout."
33983 "status": "nonstandard",
33984 "syntax": "auto | <integer>{1,3}",
33986 "description": "Specifies the minimum number of characters in a hyphenated word.",
33992 "name": "-ms-hyphenate-limit-lines",
33999 "name": "no-limit",
34000 "description": "There is no limit."
34003 "status": "nonstandard",
34004 "syntax": "no-limit | <integer>",
34006 "description": "Indicates the maximum number of successive hyphenated lines in an element.",
34012 "name": "-ms-hyphenate-limit-zone",
34017 "status": "nonstandard",
34018 "syntax": "<percentage> | <length>",
34020 "description": "Specifies the maximum amount of unfilled space (before justification) that may be left in the line box before hyphenation is triggered to pull part of a word from the next line back up into the current line.",
34027 "name": "-ms-hyphens",
34035 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
34039 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
34043 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
34047 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
34053 "name": "-ms-ime-mode",
34060 "description": "The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."
34064 "description": "No change is made to the current input method editor state. This is the default."
34067 "name": "disabled",
34068 "description": "The input method editor is disabled and may not be activated by the user."
34071 "name": "inactive",
34072 "description": "The input method editor is initially inactive, but the user may activate it if they wish."
34076 "description": "The IME state should be normal; this value can be used in a user style sheet to override the page setting."
34080 "description": "Controls the state of the input method editor for text fields.",
34086 "name": "-ms-interpolation-mode",
34095 "name": "nearest-neighbor"
34099 "description": "Gets or sets the interpolation (resampling) method used to stretch images.",
34105 "name": "-ms-layout-grid",
34113 "description": "Any of the range of character values available to the -ms-layout-grid-char property."
34117 "description": "Any of the range of line values available to the -ms-layout-grid-line property."
34121 "description": "Any of the range of mode values available to the -ms-layout-grid-mode property."
34125 "description": "Any of the range of type values available to the -ms-layout-grid-type property."
34129 "description": "Sets or retrieves the composite document grid properties that specify the layout of text characters."
34132 "name": "-ms-layout-grid-char",
34140 "description": "Largest character in the font of the element is used to set the character grid."
34144 "description": "Default. No character grid is set."
34148 "description": "Sets or retrieves the size of the character grid used for rendering the text content of an element.",
34156 "name": "-ms-layout-grid-line",
34164 "description": "Largest character in the font of the element is used to set the character grid."
34168 "description": "Default. No grid line is set."
34172 "description": "Sets or retrieves the gridline value used for rendering the text content of an element.",
34178 "name": "-ms-layout-grid-mode",
34186 "description": "Default. Both the char and line grid modes are enabled. This setting is necessary to fully enable the layout grid on an element."
34190 "description": "Only a character grid is used. This is recommended for use with block-level elements, such as a blockquote, where the line grid is intended to be disabled."
34194 "description": "Only a line grid is used. This is recommended for use with inline elements, such as a span, to disable the horizontal grid on runs of text that act as a single entity in the grid layout."
34198 "description": "No grid is used."
34202 "description": "Gets or sets whether the text layout grid uses two dimensions.",
34208 "name": "-ms-layout-grid-type",
34216 "description": "Grid used for monospaced layout. All noncursive characters are treated as equal; every character is centered within a single grid space by default."
34220 "description": "Default. Grid used for Japanese and Korean characters."
34224 "description": "Grid used for Chinese, as well as Japanese (Genko) and Korean characters. Only the ideographs, kanas, and wide characters are snapped to the grid."
34228 "description": "Sets or retrieves the type of grid used for rendering the text content of an element.",
34234 "name": "-ms-line-break",
34242 "description": "The UA determines the set of line-breaking restrictions to use for CJK scripts, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines."
34245 "name": "keep-all",
34246 "description": "Sequences of CJK characters can no longer break on implied break points. This option should only be used where the presence of word separator characters still creates line-breaking opportunities, as in Korean."
34249 "name": "newspaper",
34250 "description": "Breaks CJK scripts using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."
34254 "description": "Breaks CJK scripts using a normal set of line-breaking rules."
34258 "description": "Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."
34262 "description": "Specifies what set of line breaking restrictions are in effect within the element.",
34268 "name": "-ms-overflow-style",
34276 "description": "No preference, UA should use the first scrolling method in the list that it supports."
34279 "name": "-ms-autohiding-scrollbar",
34280 "description": "Indicates the element displays auto-hiding scrollbars during mouse interactions and panning indicators during touch and keyboard interactions."
34284 "description": "Indicates the element does not display scrollbars or panning indicators, even when its content overflows."
34287 "name": "scrollbar",
34288 "description": "Scrollbars are typically narrow strips inserted on one or two edges of an element and which often have arrows to click on and a \"thumb\" to drag up and down (or left and right) to move the contents of the element."
34291 "status": "nonstandard",
34292 "syntax": "auto | none | scrollbar | -ms-autohiding-scrollbar",
34294 "description": "Specify whether content is clipped when it overflows the element's content area.",
34300 "name": "-ms-perspective",
34307 "description": "No perspective transform is applied."
34311 "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
34317 "name": "-ms-perspective-origin",
34322 "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
34330 "name": "-ms-perspective-origin-x",
34335 "description": "Establishes the origin for the perspective property. It effectively sets the X position at which the viewer appears to be looking at the children of the element.",
34343 "name": "-ms-perspective-origin-y",
34348 "description": "Establishes the origin for the perspective property. It effectively sets the Y position at which the viewer appears to be looking at the children of the element.",
34356 "name": "-ms-progress-appearance",
34369 "description": "Gets or sets a value that specifies whether a progress control displays as a bar or a ring.",
34375 "name": "-ms-scrollbar-3dlight-color",
34379 "status": "nonstandard",
34380 "syntax": "<color>",
34382 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
34388 "name": "-ms-scrollbar-arrow-color",
34392 "status": "nonstandard",
34393 "syntax": "<color>",
34395 "description": "Determines the color of the arrow elements of a scroll arrow.",
34401 "name": "-ms-scrollbar-base-color",
34405 "status": "nonstandard",
34406 "syntax": "<color>",
34408 "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
34414 "name": "-ms-scrollbar-darkshadow-color",
34418 "status": "nonstandard",
34419 "syntax": "<color>",
34421 "description": "Determines the color of the gutter of a scroll bar.",
34427 "name": "-ms-scrollbar-face-color",
34431 "status": "nonstandard",
34432 "syntax": "<color>",
34434 "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
34440 "name": "-ms-scrollbar-highlight-color",
34444 "status": "nonstandard",
34445 "syntax": "<color>",
34447 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
34453 "name": "-ms-scrollbar-shadow-color",
34457 "status": "nonstandard",
34458 "syntax": "<color>",
34460 "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
34466 "name": "-ms-scrollbar-track-color",
34470 "status": "nonstandard",
34471 "syntax": "<color>",
34475 "name": "MDN Reference",
34476 "url": "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"
34479 "description": "Determines the color of the track element of a scroll bar.",
34485 "name": "-ms-scroll-chaining",
34498 "status": "nonstandard",
34499 "syntax": "chained | none",
34501 "description": "Gets or sets a value that indicates the scrolling behavior that occurs when a user hits the content boundary during a manipulation.",
34508 "name": "-ms-scroll-limit",
34518 "status": "nonstandard",
34519 "syntax": "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
34521 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-limit-x-min, -ms-scroll-limit-y-min, -ms-scroll-limit-x-max, and -ms-scroll-limit-y-max properties.",
34527 "name": "-ms-scroll-limit-x-max",
34537 "status": "nonstandard",
34538 "syntax": "auto | <length>",
34540 "description": "Gets or sets a value that specifies the maximum value for the scrollLeft property.",
34546 "name": "-ms-scroll-limit-x-min",
34551 "status": "nonstandard",
34552 "syntax": "<length>",
34554 "description": "Gets or sets a value that specifies the minimum value for the scrollLeft property.",
34560 "name": "-ms-scroll-limit-y-max",
34570 "status": "nonstandard",
34571 "syntax": "auto | <length>",
34573 "description": "Gets or sets a value that specifies the maximum value for the scrollTop property.",
34579 "name": "-ms-scroll-limit-y-min",
34584 "status": "nonstandard",
34585 "syntax": "<length>",
34587 "description": "Gets or sets a value that specifies the minimum value for the scrollTop property.",
34593 "name": "-ms-scroll-rails",
34606 "status": "nonstandard",
34607 "syntax": "none | railed",
34609 "description": "Gets or sets a value that indicates whether or not small motions perpendicular to the primary axis of motion will result in either changes to both the scrollTop and scrollLeft properties or a change to the primary axis (for instance, either the scrollTop or scrollLeft properties will change, but not both).",
34616 "name": "-ms-scroll-snap-points-x",
34623 "name": "snapInterval(100%, 100%)"
34626 "name": "snapList()"
34629 "status": "nonstandard",
34630 "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
34632 "description": "Gets or sets a value that defines where snap-points will be located along the x-axis.",
34638 "name": "-ms-scroll-snap-points-y",
34645 "name": "snapInterval(100%, 100%)"
34648 "name": "snapList()"
34651 "status": "nonstandard",
34652 "syntax": "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
34654 "description": "Gets or sets a value that defines where snap-points will be located along the y-axis.",
34660 "name": "-ms-scroll-snap-type",
34668 "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
34671 "name": "mandatory",
34672 "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
34675 "name": "proximity",
34676 "description": "The visual viewport of this scroll container may come to rest on a snap point at the termination of a scroll at the discretion of the UA given the parameters of the scroll."
34679 "status": "nonstandard",
34680 "syntax": "none | proximity | mandatory",
34682 "description": "Gets or sets a value that defines what type of snap-point should be used for the current element. There are two type of snap-points, with the primary difference being whether or not the user is guaranteed to always stop on a snap-point.",
34688 "name": "-ms-scroll-snap-x",
34695 "name": "mandatory"
34701 "name": "proximity"
34704 "name": "snapInterval(100%, 100%)"
34707 "name": "snapList()"
34710 "status": "nonstandard",
34711 "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
34713 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-x properties.",
34719 "name": "-ms-scroll-snap-y",
34726 "name": "mandatory"
34732 "name": "proximity"
34735 "name": "snapInterval(100%, 100%)"
34738 "name": "snapList()"
34741 "status": "nonstandard",
34742 "syntax": "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
34744 "description": "Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-y properties.",
34750 "name": "-ms-scroll-translation",
34760 "name": "vertical-to-horizontal"
34763 "status": "nonstandard",
34764 "syntax": "none | vertical-to-horizontal",
34766 "description": "Gets or sets a value that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.",
34772 "name": "-ms-text-align-last",
34783 "description": "The inline contents are centered within the line box."
34787 "description": "The text is justified according to the method specified by the 'text-justify' property."
34791 "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
34795 "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
34799 "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
34805 "name": "-ms-text-autospace",
34812 "name": "ideograph-alpha",
34813 "description": "Creates 1/4em extra spacing between runs of ideographic letters and non-ideographic letters, such as Latin-based, Cyrillic, Greek, Arabic or Hebrew."
34816 "name": "ideograph-numeric",
34817 "description": "Creates 1/4em extra spacing between runs of ideographic letters and numeric glyphs."
34820 "name": "ideograph-parenthesis",
34821 "description": "Creates extra spacing between normal (non wide) parenthesis and ideographs."
34824 "name": "ideograph-space",
34825 "description": "Extends the width of the space character while surrounded by ideographs."
34829 "description": "No extra space is created."
34832 "name": "punctuation",
34833 "description": "Creates extra non-breaking spacing around punctuation as required by language-specific typographic conventions."
34836 "status": "nonstandard",
34837 "syntax": "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
34839 "description": "Determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its 'ink' lines up with the first glyph in the line above and below.",
34845 "name": "-ms-text-combine-horizontal",
34853 "description": "Attempt to typeset horizontally all consecutive characters within the box such that they take up the space of a single character within the vertical line box."
34857 "description": "Attempt to typeset horizontally each maximal sequence of consecutive ASCII digits (U+0030–U+0039) that has as many or fewer characters than the specified integer such that it takes up the space of a single character within the vertical line box."
34861 "description": "No special processing."
34865 "description": "This property specifies the combination of multiple characters into the space of a single character.",
34872 "name": "-ms-text-justify",
34880 "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
34883 "name": "distribute",
34884 "description": "Justification primarily changes spacing both at word separators and at grapheme cluster boundaries in all scripts except those in the connected and cursive groups. This value is sometimes used in e.g. Japanese, often with the 'text-align-last' property."
34887 "name": "inter-cluster",
34888 "description": "Justification primarily changes spacing at word separators and at grapheme cluster boundaries in clustered scripts. This value is typically used for Southeast Asian scripts such as Thai."
34891 "name": "inter-ideograph",
34892 "description": "Justification primarily changes spacing at word separators and at inter-graphemic boundaries in scripts that use no word spaces. This value is typically used for CJK languages."
34895 "name": "inter-word",
34896 "description": "Justification primarily changes spacing at word separators. This value is typically used for languages that separate words using spaces, like English or (sometimes) Korean."
34900 "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
34904 "description": "Selects the justification algorithm used when 'text-align' is set to 'justify'. The property applies to block containers, but the UA may (but is not required to) also support it on inline elements.",
34910 "name": "-ms-text-kashida-space",
34916 "description": "Sets or retrieves the ratio of kashida expansion to white space expansion when justifying lines of text in the object.",
34922 "name": "-ms-text-overflow",
34929 "description": "Clip inline content that overflows. Characters may be only partially rendered."
34932 "name": "ellipsis",
34933 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
34937 "description": "Text can overflow for example when it is prevented from wrapping",
34943 "name": "-ms-text-size-adjust",
34951 "description": "Renderers must use the default size adjustment when displaying on a small device."
34955 "description": "Renderers must not do size adjustment when displaying on a small device."
34959 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
34966 "name": "-ms-text-underline-position",
34973 "name": "alphabetic",
34974 "description": "The underline is aligned with the alphabetic baseline. In this case the underline is likely to cross some descenders."
34978 "description": "The user agent may use any algorithm to determine the underline's position. In horizontal line layout, the underline should be aligned as for alphabetic. In vertical line layout, if the language is set to Japanese or Korean, the underline should be aligned as for over."
34982 "description": "The underline is aligned with the 'top' (right in vertical writing) edge of the element's em-box. In this mode, an overline also switches sides."
34986 "description": "The underline is aligned with the 'bottom' (left in vertical writing) edge of the element's em-box. In this case the underline usually does not cross the descenders. This is sometimes called 'accounting' underline."
34990 "description": "Sets the position of an underline specified on the same element: it does not affect underlines specified by ancestor elements.This property is typically used in vertical writing contexts such as in Japanese documents where it often desired to have the underline appear 'over' (to the right of) the affected run of text",
34996 "name": "-ms-touch-action",
35003 "description": "The element is a passive element, with several exceptions."
35006 "name": "double-tap-zoom",
35007 "description": "The element will zoom on double-tap."
35010 "name": "manipulation",
35011 "description": "The element is a manipulation-causing element."
35015 "description": "The element is a manipulation-blocking element."
35019 "description": "The element permits touch-driven panning on the horizontal axis. The touch pan is performed on the nearest ancestor with horizontally scrollable content."
35023 "description": "The element permits touch-driven panning on the vertical axis. The touch pan is performed on the nearest ancestor with vertically scrollable content."
35026 "name": "pinch-zoom",
35027 "description": "The element permits pinch-zooming. The pinch-zoom is performed on the nearest ancestor with zoomable content."
35031 "description": "Gets or sets a value that indicates whether and how a given region can be manipulated by the user.",
35037 "name": "-ms-touch-select",
35044 "name": "grippers",
35045 "description": "Grippers are always on."
35049 "description": "Grippers are always off."
35052 "status": "nonstandard",
35053 "syntax": "grippers | none",
35055 "description": "Gets or sets a value that toggles the 'gripper' visual elements that enable touch text selection.",
35061 "name": "-ms-transform",
35067 "name": "matrix()",
35068 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
35071 "name": "matrix3d()",
35072 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
35078 "name": "rotate()",
35079 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
35082 "name": "rotate3d()",
35083 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
35086 "name": "rotateX('angle')",
35087 "description": "Specifies a clockwise rotation by the given angle about the X axis."
35090 "name": "rotateY('angle')",
35091 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
35094 "name": "rotateZ('angle')",
35095 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
35099 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
35102 "name": "scale3d()",
35103 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
35106 "name": "scaleX()",
35107 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
35110 "name": "scaleY()",
35111 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
35114 "name": "scaleZ()",
35115 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
35119 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
35123 "description": "Specifies a skew transformation along the X axis by the given angle."
35127 "description": "Specifies a skew transformation along the Y axis by the given angle."
35130 "name": "translate()",
35131 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
35134 "name": "translate3d()",
35135 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
35138 "name": "translateX()",
35139 "description": "Specifies a translation by the given amount in the X direction."
35142 "name": "translateY()",
35143 "description": "Specifies a translation by the given amount in the Y direction."
35146 "name": "translateZ()",
35147 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
35151 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
35157 "name": "-ms-transform-origin",
35162 "description": "Establishes the origin of transformation for an element.",
35170 "name": "-ms-transform-origin-x",
35175 "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
35182 "name": "-ms-transform-origin-y",
35187 "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
35194 "name": "-ms-transform-origin-z",
35199 "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
35206 "name": "-ms-user-select",
35222 "status": "nonstandard",
35223 "syntax": "none | element | text",
35225 "description": "Controls the appearance of selection.",
35231 "name": "-ms-word-break",
35237 "name": "break-all",
35238 "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
35241 "name": "keep-all",
35242 "description": "Block characters can no longer create implied break points."
35246 "description": "Breaks non-CJK scripts according to their own rules."
35250 "description": "Specifies line break opportunities for non-CJK scripts.",
35256 "name": "-ms-word-wrap",
35262 "name": "break-word",
35263 "description": "An unbreakable 'word' may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
35267 "description": "Lines may break only at allowed break points."
35271 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
35277 "name": "-ms-wrap-flow",
35285 "description": "For floats an exclusion is created, for all other elements an exclusion is not created."
35289 "description": "Inline flow content can flow on all sides of the exclusion."
35293 "description": "Inline flow content can only wrap on top and bottom of the exclusion and must leave the areas to the start and end edges of the exclusion box empty."
35297 "description": "Inline flow content can wrap on the end side of the exclusion area but must leave the area to the start edge of the exclusion area empty."
35301 "description": "Inline flow content can wrap on the side of the exclusion with the largest available space for the given line, and must leave the other side of the exclusion empty."
35305 "description": "Inline flow content can flow around the edge of the exclusion with the smallest available space within the flow content’s containing block, and must leave the other edge of the exclusion empty."
35309 "description": "Inline flow content can wrap on the start edge of the exclusion area but must leave the area to end edge of the exclusion area empty."
35312 "status": "nonstandard",
35313 "syntax": "auto | both | start | end | maximum | clear",
35315 "description": "An element becomes an exclusion when its 'wrap-flow' property has a computed value other than 'auto'.",
35321 "name": "-ms-wrap-margin",
35326 "status": "nonstandard",
35327 "syntax": "<length>",
35329 "description": "Gets or sets a value that is used to offset the inner wrap shape from other shapes.",
35336 "name": "-ms-wrap-through",
35344 "description": "The exclusion element does not inherit its parent node's wrapping context. Its descendants are only subject to exclusion shapes defined inside the element."
35348 "description": "The exclusion element inherits its parent node's wrapping context. Its descendant inline content wraps around exclusions defined outside the element."
35351 "status": "nonstandard",
35352 "syntax": "wrap | none",
35354 "description": "Specifies if an element inherits its parent wrapping context. In other words if it is subject to the exclusions defined outside the element.",
35360 "name": "-ms-writing-mode",
35391 "description": "Shorthand property for both 'direction' and 'block-progression'.",
35397 "name": "-ms-zoom",
35407 "description": "Sets or retrieves the magnification scale of the object.",
35416 "name": "-ms-zoom-animation",
35429 "description": "Gets or sets a value that indicates whether an animation is used when zooming.",
35435 "name": "nav-down",
35442 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
35446 "description": "Indicates that the user agent should target the frame that the element is in."
35450 "description": "Indicates that the user agent should target the full window."
35454 "description": "Provides an way to control directional focus navigation.",
35462 "name": "nav-index",
35469 "description": "The element's sequential navigation order is assigned automatically by the user agent."
35473 "description": "Provides an input-method-neutral way of specifying the sequential navigation order (also known as 'tabbing order').",
35479 "name": "nav-left",
35486 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
35490 "description": "Indicates that the user agent should target the frame that the element is in."
35494 "description": "Indicates that the user agent should target the full window."
35498 "description": "Provides an way to control directional focus navigation.",
35506 "name": "nav-right",
35513 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
35517 "description": "Indicates that the user agent should target the frame that the element is in."
35521 "description": "Indicates that the user agent should target the full window."
35525 "description": "Provides an way to control directional focus navigation.",
35540 "description": "The user agent automatically determines which element to navigate the focus to in response to directional navigational input."
35544 "description": "Indicates that the user agent should target the frame that the element is in."
35548 "description": "Indicates that the user agent should target the full window."
35552 "description": "Provides an way to control directional focus navigation.",
35560 "name": "negative",
35564 "syntax": "<symbol> <symbol>?",
35566 "description": "@counter-style descriptor. Defines how to alter the representation when the counter value is negative.",
35574 "name": "-o-animation",
35580 "name": "alternate",
35581 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
35584 "name": "alternate-reverse",
35585 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
35588 "name": "backwards",
35589 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
35593 "description": "Both forwards and backwards fill modes are applied."
35596 "name": "forwards",
35597 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
35600 "name": "infinite",
35601 "description": "Causes the animation to repeat forever."
35605 "description": "No animation is performed"
35609 "description": "Normal playback."
35613 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
35617 "description": "Shorthand property combines six of the animation properties into a single property.",
35627 "name": "-o-animation-delay",
35632 "description": "Defines when the animation will start.",
35638 "name": "-o-animation-direction",
35644 "name": "alternate",
35645 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
35648 "name": "alternate-reverse",
35649 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
35653 "description": "Normal playback."
35657 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
35661 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
35667 "name": "-o-animation-duration",
35672 "description": "Defines the length of time that an animation takes to complete one cycle.",
35678 "name": "-o-animation-fill-mode",
35684 "name": "backwards",
35685 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
35689 "description": "Both forwards and backwards fill modes are applied."
35692 "name": "forwards",
35693 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
35697 "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
35701 "description": "Defines what values are applied by the animation outside the time it is executing.",
35707 "name": "-o-animation-iteration-count",
35713 "name": "infinite",
35714 "description": "Causes the animation to repeat forever."
35718 "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
35725 "name": "-o-animation-name",
35732 "description": "No animation is performed"
35736 "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
35743 "name": "-o-animation-play-state",
35750 "description": "A running animation will be paused."
35754 "description": "Resume playback of a paused animation."
35758 "description": "Defines whether the animation is running or paused.",
35764 "name": "-o-animation-timing-function",
35769 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
35775 "name": "object-fit",
35786 "description": "The replaced content is sized to maintain its aspect ratio while fitting within the element’s content box: its concrete object size is resolved as a contain constraint against the element's used width and height."
35790 "description": "The replaced content is sized to maintain its aspect ratio while filling the element's entire content box: its concrete object size is resolved as a cover constraint against the element’s used width and height."
35794 "description": "The replaced content is sized to fill the element’s content box: the object's concrete object size is the element's used width and height."
35798 "description": "The replaced content is not resized to fit inside the element's content box"
35801 "name": "scale-down",
35802 "description": "Size the content as if ‘none’ or ‘contain’ were specified, whichever would result in a smaller concrete object size."
35805 "syntax": "fill | contain | cover | none | scale-down",
35809 "name": "MDN Reference",
35810 "url": "https://developer.mozilla.org/docs/Web/CSS/object-fit"
35813 "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
35819 "name": "object-position",
35827 "syntax": "<position>",
35831 "name": "MDN Reference",
35832 "url": "https://developer.mozilla.org/docs/Web/CSS/object-position"
35835 "description": "Determines the alignment of the replaced element inside its box.",
35843 "name": "-o-border-image",
35850 "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
35854 "description": "Causes the middle part of the border-image to be preserved."
35861 "description": "The image is tiled (repeated) to fill the area."
35865 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
35869 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
35873 "description": "The image is stretched to fill the area."
35877 "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
35887 "name": "-o-object-fit",
35894 "description": "The replaced content is sized to maintain its aspect ratio while fitting within the element’s content box: its concrete object size is resolved as a contain constraint against the element's used width and height."
35898 "description": "The replaced content is sized to maintain its aspect ratio while filling the element's entire content box: its concrete object size is resolved as a cover constraint against the element’s used width and height."
35902 "description": "The replaced content is sized to fill the element’s content box: the object's concrete object size is the element's used width and height."
35906 "description": "The replaced content is not resized to fit inside the element's content box"
35909 "name": "scale-down",
35910 "description": "Size the content as if ‘none’ or ‘contain’ were specified, whichever would result in a smaller concrete object size."
35914 "description": "Specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",
35920 "name": "-o-object-position",
35925 "description": "Determines the alignment of the replaced element inside its box.",
35934 "syntax": "<alpha-value>",
35938 "name": "MDN Reference",
35939 "url": "https://developer.mozilla.org/docs/Web/CSS/opacity"
35942 "description": "Opacity of an element's text, where 1 is opaque and 0 is entirely transparent.",
35949 "syntax": "<integer>",
35953 "name": "MDN Reference",
35954 "url": "https://developer.mozilla.org/docs/Web/CSS/order"
35957 "description": "Controls the order in which children of a flex container appear within the flex container, by assigning them to ordinal groups.",
35971 "syntax": "<integer>",
35975 "name": "MDN Reference",
35976 "url": "https://developer.mozilla.org/docs/Web/CSS/orphans"
35979 "description": "Specifies the minimum number of line boxes in a block container that must be left in a fragment before a fragmentation break.",
35985 "name": "-o-table-baseline",
35990 "description": "Determines which row of a inline-table should be used as baseline of inline-table.",
35996 "name": "-o-tab-size",
36001 "description": "This property determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
36008 "name": "-o-text-overflow",
36015 "description": "Clip inline content that overflows. Characters may be only partially rendered."
36018 "name": "ellipsis",
36019 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
36023 "description": "Text can overflow for example when it is prevented from wrapping",
36029 "name": "-o-transform",
36035 "name": "matrix()",
36036 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
36039 "name": "matrix3d()",
36040 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
36046 "name": "rotate()",
36047 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
36050 "name": "rotate3d()",
36051 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
36054 "name": "rotateX('angle')",
36055 "description": "Specifies a clockwise rotation by the given angle about the X axis."
36058 "name": "rotateY('angle')",
36059 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
36062 "name": "rotateZ('angle')",
36063 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
36067 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
36070 "name": "scale3d()",
36071 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
36074 "name": "scaleX()",
36075 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
36078 "name": "scaleY()",
36079 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
36082 "name": "scaleZ()",
36083 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
36087 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
36091 "description": "Specifies a skew transformation along the X axis by the given angle."
36095 "description": "Specifies a skew transformation along the Y axis by the given angle."
36098 "name": "translate()",
36099 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
36102 "name": "translate3d()",
36103 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
36106 "name": "translateX()",
36107 "description": "Specifies a translation by the given amount in the X direction."
36110 "name": "translateY()",
36111 "description": "Specifies a translation by the given amount in the Y direction."
36114 "name": "translateZ()",
36115 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
36119 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
36125 "name": "-o-transform-origin",
36130 "description": "Establishes the origin of transformation for an element.",
36138 "name": "-o-transition",
36145 "description": "Every property that is able to undergo a transition will do so."
36149 "description": "No property will transition."
36153 "description": "Shorthand property combines four of the transition properties into a single property.",
36162 "name": "-o-transition-delay",
36167 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
36173 "name": "-o-transition-duration",
36178 "description": "Specifies how long the transition from the old value to the new value should take.",
36184 "name": "-o-transition-property",
36191 "description": "Every property that is able to undergo a transition will do so."
36195 "description": "No property will transition."
36199 "description": "Specifies the name of the CSS property to which the transition is applied.",
36205 "name": "-o-transition-timing-function",
36210 "description": "Describes how the intermediate values used during a transition will be calculated.",
36216 "name": "offset-block-end",
36223 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
36227 "description": "Logical 'bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
36234 "name": "offset-block-start",
36241 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
36245 "description": "Logical 'top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
36252 "name": "offset-inline-end",
36259 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
36263 "description": "Logical 'right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
36270 "name": "offset-inline-start",
36277 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well."
36281 "description": "Logical 'left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
36292 "description": "Permits the user agent to render a custom outline style, typically the default platform style."
36296 "description": "Performs a color inversion on the pixels on the screen."
36299 "syntax": "[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]",
36303 "name": "MDN Reference",
36304 "url": "https://developer.mozilla.org/docs/Web/CSS/outline"
36307 "description": "Shorthand property for 'outline-style', 'outline-width', and 'outline-color'.",
36317 "name": "outline-color",
36321 "description": "Performs a color inversion on the pixels on the screen."
36324 "syntax": "<color> | invert",
36328 "name": "MDN Reference",
36329 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-color"
36332 "description": "The color of the outline.",
36339 "name": "outline-offset",
36347 "syntax": "<length>",
36351 "name": "MDN Reference",
36352 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
36355 "description": "Offset the outline and draw it beyond the border edge.",
36361 "name": "outline-style",
36365 "description": "Permits the user agent to render a custom outline style, typically the default platform style."
36368 "syntax": "auto | <'border-style'>",
36372 "name": "MDN Reference",
36373 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-style"
36376 "description": "Style of the outline.",
36383 "name": "outline-width",
36384 "syntax": "<line-width>",
36388 "name": "MDN Reference",
36389 "url": "https://developer.mozilla.org/docs/Web/CSS/outline-width"
36392 "description": "Width of the outline.",
36399 "name": "overflow",
36403 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
36407 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
36410 "name": "-moz-hidden-unscrollable",
36411 "description": "Same as the standardized 'clip', except doesn’t establish a block formatting context."
36415 "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
36419 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
36422 "syntax": "[ visible | hidden | clip | scroll | auto ]{1,2}",
36426 "name": "MDN Reference",
36427 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow"
36430 "description": "Shorthand for setting 'overflow-x' and 'overflow-y'.",
36436 "name": "overflow-wrap",
36439 "name": "break-word",
36440 "description": "An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
36444 "description": "Lines may break only at allowed break points."
36447 "syntax": "normal | break-word | anywhere",
36451 "name": "MDN Reference",
36452 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
36455 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit within the line box.",
36461 "name": "overflow-x",
36465 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
36469 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
36473 "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
36477 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
36480 "syntax": "visible | hidden | clip | scroll | auto",
36484 "name": "MDN Reference",
36485 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
36488 "description": "Specifies the handling of overflow in the horizontal direction.",
36494 "name": "overflow-y",
36498 "description": "The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."
36502 "description": "Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."
36506 "description": "Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."
36510 "description": "Content is not clipped, i.e., it may be rendered outside the content box."
36513 "syntax": "visible | hidden | clip | scroll | auto",
36517 "name": "MDN Reference",
36518 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
36521 "description": "Specifies the handling of overflow in the vertical direction.",
36531 "syntax": "<integer> && <symbol>",
36533 "description": "@counter-style descriptor. Specifies a “fixed-width” counter style, where representations shorter than the pad value are padded with a particular <symbol>",
36544 "syntax": "[ <length> | <percentage> ]{1,4}",
36548 "name": "MDN Reference",
36549 "url": "https://developer.mozilla.org/docs/Web/CSS/padding"
36552 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
36559 "name": "padding-bottom",
36560 "syntax": "<length> | <percentage>",
36564 "name": "MDN Reference",
36565 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
36568 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
36575 "name": "padding-block-end",
36583 "syntax": "<'padding-left'>",
36587 "name": "MDN Reference",
36588 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
36591 "description": "Logical 'padding-bottom'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
36598 "name": "padding-block-start",
36606 "syntax": "<'padding-left'>",
36610 "name": "MDN Reference",
36611 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
36614 "description": "Logical 'padding-top'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
36621 "name": "padding-inline-end",
36629 "syntax": "<'padding-left'>",
36633 "name": "MDN Reference",
36634 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
36637 "description": "Logical 'padding-right'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
36644 "name": "padding-inline-start",
36652 "syntax": "<'padding-left'>",
36656 "name": "MDN Reference",
36657 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
36660 "description": "Logical 'padding-left'. Mapping depends on the parent element’s 'writing-mode', 'direction', and 'text-orientation'.",
36667 "name": "padding-left",
36668 "syntax": "<length> | <percentage>",
36672 "name": "MDN Reference",
36673 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-left"
36676 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
36683 "name": "padding-right",
36684 "syntax": "<length> | <percentage>",
36688 "name": "MDN Reference",
36689 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-right"
36692 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
36699 "name": "padding-top",
36700 "syntax": "<length> | <percentage>",
36704 "name": "MDN Reference",
36705 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-top"
36708 "description": "Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",
36715 "name": "page-break-after",
36719 "description": "Always force a page break after the generated box."
36723 "description": "Neither force nor forbid a page break after generated box."
36727 "description": "Avoid a page break after the generated box."
36731 "description": "Force one or two page breaks after the generated box so that the next page is formatted as a left page."
36735 "description": "Force one or two page breaks after the generated box so that the next page is formatted as a right page."
36738 "syntax": "auto | always | avoid | left | right | recto | verso",
36742 "name": "MDN Reference",
36743 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
36746 "description": "Defines rules for page breaks after an element.",
36752 "name": "page-break-before",
36756 "description": "Always force a page break before the generated box."
36760 "description": "Neither force nor forbid a page break before the generated box."
36764 "description": "Avoid a page break before the generated box."
36768 "description": "Force one or two page breaks before the generated box so that the next page is formatted as a left page."
36772 "description": "Force one or two page breaks before the generated box so that the next page is formatted as a right page."
36775 "syntax": "auto | always | avoid | left | right | recto | verso",
36779 "name": "MDN Reference",
36780 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
36783 "description": "Defines rules for page breaks before an element.",
36789 "name": "page-break-inside",
36793 "description": "Neither force nor forbid a page break inside the generated box."
36797 "description": "Avoid a page break inside the generated box."
36800 "syntax": "auto | avoid",
36804 "name": "MDN Reference",
36805 "url": "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
36808 "description": "Defines rules for page breaks inside an element.",
36814 "name": "paint-order",
36831 "description": "The element is painted with the standard order of painting operations: the 'fill' is painted first, then its 'stroke' and finally its markers."
36837 "syntax": "normal | [ fill || stroke || markers ]",
36841 "name": "MDN Reference",
36842 "url": "https://developer.mozilla.org/docs/Web/CSS/paint-order"
36845 "description": "Controls the order that the three paint operations that shapes and text are rendered with: their fill, their stroke and any markers they might have.",
36851 "name": "perspective",
36855 "description": "No perspective transform is applied."
36858 "syntax": "none | <length>",
36862 "name": "MDN Reference",
36863 "url": "https://developer.mozilla.org/docs/Web/CSS/perspective"
36866 "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
36873 "name": "perspective-origin",
36874 "syntax": "<position>",
36878 "name": "MDN Reference",
36879 "url": "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
36882 "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
36890 "name": "pointer-events",
36894 "description": "The given element can be the target element for pointer events whenever the pointer is over either the interior or the perimeter of the element."
36898 "description": "The given element can be the target element for pointer events whenever the pointer is over the interior of the element."
36902 "description": "The given element does not receive pointer events."
36906 "description": "The given element can be the target element for pointer events when the pointer is over a \"painted\" area. "
36910 "description": "The given element can be the target element for pointer events whenever the pointer is over the perimeter of the element."
36914 "description": "The given element can be the target element for pointer events when the ‘visibility’ property is set to visible and the pointer is over either the interior or the perimete of the element."
36917 "name": "visibleFill",
36918 "description": "The given element can be the target element for pointer events when the ‘visibility’ property is set to visible and when the pointer is over the interior of the element."
36921 "name": "visiblePainted",
36922 "description": "The given element can be the target element for pointer events when the ‘visibility’ property is set to visible and when the pointer is over a ‘painted’ area."
36925 "name": "visibleStroke",
36926 "description": "The given element can be the target element for pointer events when the ‘visibility’ property is set to visible and when the pointer is over the perimeter of the element."
36929 "syntax": "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
36933 "name": "MDN Reference",
36934 "url": "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
36937 "description": "Specifies under what circumstances a given element can be the target element for a pointer event.",
36943 "name": "position",
36946 "name": "absolute",
36947 "description": "The box's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties. These properties specify offsets with respect to the box's 'containing block'."
36951 "description": "The box's position is calculated according to the 'absolute' model, but in addition, the box is fixed with respect to some reference. As with the 'absolute' model, the box's margins do not collapse with any other margins."
36954 "name": "-ms-page",
36955 "description": "The box's position is calculated according to the 'absolute' model."
36958 "name": "relative",
36959 "description": "The box's position is calculated according to the normal flow (this is called the position in normal flow). Then the box is offset relative to its normal position."
36963 "description": "The box is a normal box, laid out according to the normal flow. The 'top', 'right', 'bottom', and 'left' properties do not apply."
36967 "description": "The box's position is calculated according to the normal flow. Then the box is offset relative to its flow root and containing block and in all cases, including table elements, does not affect the position of any following boxes."
36970 "name": "-webkit-sticky",
36971 "description": "The box's position is calculated according to the normal flow. Then the box is offset relative to its flow root and containing block and in all cases, including table elements, does not affect the position of any following boxes."
36974 "syntax": "static | relative | absolute | sticky | fixed",
36978 "name": "MDN Reference",
36979 "url": "https://developer.mozilla.org/docs/Web/CSS/position"
36982 "description": "The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements.",
36992 "syntax": "<symbol>",
36994 "description": "@counter-style descriptor. Specifies a <symbol> that is prepended to the marker representation.",
37006 "description": "The 'open-quote' and 'close-quote' values of the 'content' property produce no quotations marks, as if they were 'no-open-quote' and 'no-close-quote' respectively."
37009 "syntax": "none | auto | [ <string> <string> ]+",
37013 "name": "MDN Reference",
37014 "url": "https://developer.mozilla.org/docs/Web/CSS/quotes"
37017 "description": "Specifies quotation marks for any number of embedded quotations.",
37030 "description": "The range depends on the counter system."
37033 "name": "infinite",
37034 "description": "If used as the first value in a range, it represents negative infinity; if used as the second value, it represents positive infinity."
37037 "syntax": "[ [ <integer> | infinite ]{2} ]# | auto",
37039 "description": "@counter-style descriptor. Defines the ranges over which the counter style is defined.",
37057 "description": "The UA presents a bidirectional resizing mechanism to allow the user to adjust both the height and the width of the element."
37060 "name": "horizontal",
37061 "description": "The UA presents a unidirectional horizontal resizing mechanism to allow the user to adjust only the width of the element."
37065 "description": "The UA does not present a resizing mechanism on the element, and the user is given no direct manipulation mechanism to resize the element."
37068 "name": "vertical",
37069 "description": "The UA presents a unidirectional vertical resizing mechanism to allow the user to adjust only the height of the element."
37072 "syntax": "none | both | horizontal | vertical | block | inline",
37076 "name": "MDN Reference",
37077 "url": "https://developer.mozilla.org/docs/Web/CSS/resize"
37080 "description": "Specifies whether or not an element is resizable by the user, and if so, along which axis/axes.",
37090 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
37093 "syntax": "<length> | <percentage> | auto",
37097 "name": "MDN Reference",
37098 "url": "https://developer.mozilla.org/docs/Web/CSS/right"
37101 "description": "Specifies how far an absolutely positioned box's right margin edge is offset to the left of the right edge of the box's 'containing block'.",
37108 "name": "ruby-align",
37118 "description": "The user agent determines how the ruby contents are aligned. This is the initial value."
37122 "description": "The ruby content is centered within its box."
37125 "name": "distribute-letter",
37129 "description": "If the width of the ruby text is smaller than that of the base, then the ruby text contents are evenly distributed across the width of the base, with the first and last ruby text glyphs lining up with the corresponding first and last base glyphs. If the width of the ruby text is at least the width of the base, then the letters of the base are evenly distributed across the width of the ruby text."
37132 "name": "distribute-space",
37136 "description": "If the width of the ruby text is smaller than that of the base, then the ruby text contents are evenly distributed across the width of the base, with a certain amount of white space preceding the first and following the last character in the ruby text. That amount of white space is normally equal to half the amount of inter-character space of the ruby text."
37140 "description": "The ruby text content is aligned with the start edge of the base."
37143 "name": "line-edge",
37147 "description": "If the ruby text is not adjacent to a line edge, it is aligned as in 'auto'. If it is adjacent to a line edge, then it is still aligned as in auto, but the side of the ruby text that touches the end of the line is lined up with the corresponding edge of the base."
37154 "description": "The ruby text content is aligned with the end edge of the base."
37161 "description": "The ruby text content is aligned with the start edge of the base."
37164 "name": "space-between",
37168 "description": "The ruby content expands as defined for normal text justification (as defined by 'text-justify'),"
37171 "name": "space-around",
37175 "description": "As for 'space-between' except that there exists an extra justification opportunities whose space is distributed half before and half after the ruby content."
37178 "status": "experimental",
37179 "syntax": "start | center | space-between | space-around",
37183 "name": "MDN Reference",
37184 "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
37187 "description": "Specifies how text is distributed within the various ruby boxes when their contents do not exactly fill their respective boxes.",
37193 "name": "ruby-overhang",
37201 "description": "The ruby text can overhang text adjacent to the base on either side. This is the initial value."
37205 "description": "The ruby text can overhang the text that follows it."
37209 "description": "The ruby text cannot overhang any text adjacent to its base, only its own base."
37213 "description": "The ruby text can overhang the text that precedes it."
37217 "description": "Determines whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base.",
37223 "name": "ruby-position",
37231 "description": "The ruby text appears after the base. This is a relatively rare setting used in ideographic East Asian writing systems, most easily found in educational text."
37235 "description": "The ruby text appears before the base. This is the most common setting used in ideographic East Asian writing systems."
37242 "description": "The ruby text appears on the right of the base. Unlike 'before' and 'after', this value is not relative to the text flow direction."
37245 "status": "experimental",
37246 "syntax": "over | under | inter-character",
37250 "name": "MDN Reference",
37251 "url": "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
37254 "description": "Used by the parent of elements with display: ruby-text to control the position of the ruby text with respect to its base.",
37260 "name": "ruby-span",
37267 "description": "The value of attribute 'x' is a string value. The string value is evaluated as a <number> to determine the number of ruby base elements to be spanned by the annotation element."
37271 "description": "No spanning. The computed value is '1'."
37275 "description": "Determines whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base.",
37281 "name": "scrollbar-3dlight-color",
37288 "name": "MDN Reference",
37289 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-3dlight-color"
37292 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
37298 "name": "scrollbar-arrow-color",
37305 "name": "MDN Reference",
37306 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-arrow-color"
37309 "description": "Determines the color of the arrow elements of a scroll arrow.",
37315 "name": "scrollbar-base-color",
37322 "name": "MDN Reference",
37323 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-base-color"
37326 "description": "Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",
37332 "name": "scrollbar-darkshadow-color",
37339 "name": "MDN Reference",
37340 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-darkshadow-color"
37343 "description": "Determines the color of the gutter of a scroll bar.",
37349 "name": "scrollbar-face-color",
37356 "name": "MDN Reference",
37357 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-face-color"
37360 "description": "Determines the color of the scroll box and scroll arrows of a scroll bar.",
37366 "name": "scrollbar-highlight-color",
37373 "name": "MDN Reference",
37374 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-highlight-color"
37377 "description": "Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",
37383 "name": "scrollbar-shadow-color",
37390 "name": "MDN Reference",
37391 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-shadow-color"
37394 "description": "Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",
37400 "name": "scrollbar-track-color",
37405 "description": "Determines the color of the track element of a scroll bar.",
37411 "name": "scroll-behavior",
37421 "description": "Scrolls in an instant fashion."
37425 "description": "Scrolls in a smooth fashion using a user-agent-defined timing function and time period."
37428 "syntax": "auto | smooth",
37432 "name": "MDN Reference",
37433 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
37436 "description": "Specifies the scrolling behavior for a scrolling box, when scrolling happens due to navigation or CSSOM scrolling APIs.",
37442 "name": "scroll-snap-coordinate",
37449 "description": "Specifies that this element does not contribute a snap point."
37452 "status": "obsolete",
37453 "syntax": "none | <position>#",
37457 "name": "MDN Reference",
37458 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"
37461 "description": "Defines the x and y coordinate within the element which will align with the nearest ancestor scroll container’s snap-destination for the respective axis.",
37470 "name": "scroll-snap-destination",
37474 "status": "obsolete",
37475 "syntax": "<position>",
37479 "name": "MDN Reference",
37480 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"
37483 "description": "Define the x and y coordinate within the scroll container’s visual viewport which element snap points will align with.",
37491 "name": "scroll-snap-points-x",
37499 "description": "No snap points are defined by this scroll container."
37502 "name": "repeat()",
37503 "description": "Defines an interval at which snap points are defined, starting from the container’s relevant start edge."
37506 "status": "obsolete",
37507 "syntax": "none | repeat( <length-percentage> )",
37511 "name": "MDN Reference",
37512 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"
37515 "description": "Defines the positioning of snap points along the x axis of the scroll container it is applied to.",
37521 "name": "scroll-snap-points-y",
37529 "description": "No snap points are defined by this scroll container."
37532 "name": "repeat()",
37533 "description": "Defines an interval at which snap points are defined, starting from the container’s relevant start edge."
37536 "status": "obsolete",
37537 "syntax": "none | repeat( <length-percentage> )",
37541 "name": "MDN Reference",
37542 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"
37545 "description": "Defines the positioning of snap points along the y axis of the scroll container it is applied to.",
37551 "name": "scroll-snap-type",
37555 "description": "The visual viewport of this scroll container must ignore snap points, if any, when scrolled."
37558 "name": "mandatory",
37559 "description": "The visual viewport of this scroll container is guaranteed to rest on a snap point when there are no active scrolling operations."
37562 "name": "proximity",
37563 "description": "The visual viewport of this scroll container may come to rest on a snap point at the termination of a scroll at the discretion of the UA given the parameters of the scroll."
37566 "syntax": "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
37570 "name": "MDN Reference",
37571 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
37574 "description": "Defines how strictly snap points are enforced on the scroll container.",
37580 "name": "shape-image-threshold",
37588 "syntax": "<alpha-value>",
37592 "name": "MDN Reference",
37593 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
37596 "description": "Defines the alpha channel threshold used to extract the shape using an image. A value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque.",
37602 "name": "shape-margin",
37610 "syntax": "<length-percentage>",
37614 "name": "MDN Reference",
37615 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
37618 "description": "Adds a margin to a 'shape-outside'. This defines a new shape that is the smallest contour that includes all the points that are the 'shape-margin' distance outward in the perpendicular direction from a point on the underlying shape.",
37626 "name": "shape-outside",
37636 "name": "margin-box",
37637 "description": "The background is painted within (clipped to) the margin box."
37641 "description": "The float area is unaffected."
37644 "syntax": "none | <shape-box> || <basic-shape> | <image>",
37648 "name": "MDN Reference",
37649 "url": "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
37652 "description": "Specifies an orthogonal rotation to be applied to an image before it is laid out.",
37661 "name": "shape-rendering",
37665 "description": "Suppresses aural rendering."
37668 "name": "crispEdges",
37669 "description": "Emphasize the contrast between clean edges of artwork over rendering speed and geometric precision."
37672 "name": "geometricPrecision",
37673 "description": "Emphasize geometric precision over speed and crisp edges."
37676 "name": "optimizeSpeed",
37677 "description": "Emphasize rendering speed over geometric precision and crisp edges."
37681 "description": "Provides hints about what tradeoffs to make as it renders vector graphics elements such as <path> elements and basic shapes such as circles and rectangles.",
37692 "syntax": "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
37694 "description": "The size CSS at-rule descriptor, used with the @page at-rule, defines the size and orientation of the box which is used to represent a page. Most of the time, this size corresponds to the target size of the printed page if applicable.",
37704 "description": "Reference font by URL"
37707 "name": "format()",
37708 "description": "Optional hint describing the format of the font resource."
37712 "description": "Format-specific string that identifies a locally available copy of a given font."
37715 "syntax": "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
37717 "description": "@font-face descriptor. Specifies the resource containing font data. It is required, whether the font is downloadable or locally installed.",
37725 "name": "stop-color",
37727 "description": "Indicates what color to use at that gradient stop.",
37733 "name": "stop-opacity",
37735 "description": "Defines the opacity of a given gradient stop.",
37745 "description": "A URL reference to a paint server element, which is an element that defines a paint server: ‘hatch’, ‘linearGradient’, ‘mesh’, ‘pattern’, ‘radialGradient’ and ‘solidcolor’."
37749 "description": "No paint is applied in this layer."
37753 "description": "Paints along the outline of the given graphical element.",
37761 "name": "stroke-dasharray",
37765 "description": "Indicates that no dashing is used."
37769 "description": "Controls the pattern of dashes and gaps used to stroke paths.",
37778 "name": "stroke-dashoffset",
37780 "description": "Specifies the distance into the dash pattern to start the dash.",
37787 "name": "stroke-linecap",
37791 "description": "Indicates that the stroke for each subpath does not extend beyond its two endpoints."
37795 "description": "Indicates that at each end of each subpath, the shape representing the stroke will be extended by a half circle with a radius equal to the stroke width."
37799 "description": "Indicates that at the end of each subpath, the shape representing the stroke will be extended by a rectangle with the same width as the stroke width and whose length is half of the stroke width."
37803 "description": "Specifies the shape to be used at the end of open subpaths when they are stroked.",
37809 "name": "stroke-linejoin",
37813 "description": "Indicates that a bevelled corner is to be used to join path segments."
37817 "description": "Indicates that a sharp corner is to be used to join path segments."
37821 "description": "Indicates that a round corner is to be used to join path segments."
37825 "description": "Specifies the shape to be used at the corners of paths or basic shapes when they are stroked.",
37831 "name": "stroke-miterlimit",
37833 "description": "When two line segments meet at a sharp angle and miter joins have been specified for 'stroke-linejoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path.",
37839 "name": "stroke-opacity",
37841 "description": "Specifies the opacity of the painting operation used to stroke the current object.",
37847 "name": "stroke-width",
37849 "description": "Specifies the width of the stroke on the current object.",
37860 "syntax": "<symbol>",
37862 "description": "@counter-style descriptor. Specifies a <symbol> that is appended to the marker representation.",
37876 "name": "additive",
37877 "description": "Represents “sign-value” numbering systems, which, rather than using reusing digits in different positions to change their value, define additional digits with much larger values, so that the value of the number can be obtained by adding all the digits together."
37880 "name": "alphabetic",
37881 "description": "Interprets the list of counter symbols as digits to an alphabetic numbering system, similar to the default lower-alpha counter style, which wraps from \"a\", \"b\", \"c\", to \"aa\", \"ab\", \"ac\"."
37885 "description": "Cycles repeatedly through its provided symbols, looping back to the beginning when it reaches the end of the list."
37889 "description": "Use the algorithm of another counter style, but alter other aspects."
37893 "description": "Runs through its list of counter symbols once, then falls back."
37897 "description": "interprets the list of counter symbols as digits to a \"place-value\" numbering system, similar to the default 'decimal' counter style."
37900 "name": "symbolic",
37901 "description": "Cycles repeatedly through its provided symbols, doubling, tripling, etc. the symbols on each successive pass through the list."
37904 "syntax": "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
37906 "description": "@counter-style descriptor. Specifies which algorithm will be used to construct the counter’s representation based on the counter value.",
37917 "syntax": "<symbol>+",
37919 "description": "@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor.",
37927 "name": "table-layout",
37931 "description": "Use any automatic table layout algorithm."
37935 "description": "Use the fixed table layout algorithm."
37938 "syntax": "auto | fixed",
37942 "name": "MDN Reference",
37943 "url": "https://developer.mozilla.org/docs/Web/CSS/table-layout"
37946 "description": "Controls the algorithm used to lay out the table cells, rows, and columns.",
37952 "name": "tab-size",
37960 "syntax": "<integer> | <length>",
37964 "name": "MDN Reference",
37965 "url": "https://developer.mozilla.org/docs/Web/CSS/tab-size"
37968 "description": "Determines the width of the tab character (U+0009), in space characters (U+0020), when rendered.",
37975 "name": "text-align",
37979 "description": "The inline contents are centered within the line box."
37983 "description": "The inline contents are aligned to the end edge of the line box."
37987 "description": "The text is justified according to the method specified by the 'text-justify' property."
37991 "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
37995 "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
37999 "description": "The inline contents are aligned to the start edge of the line box."
38002 "syntax": "start | end | left | right | center | justify | match-parent",
38006 "name": "MDN Reference",
38007 "url": "https://developer.mozilla.org/docs/Web/CSS/text-align"
38010 "description": "Describes how inline contents of a block are horizontally aligned if the contents do not completely fill the line box.",
38016 "name": "text-align-last",
38027 "description": "Content on the affected line is aligned per 'text-align' unless 'text-align' is set to 'justify', in which case it is 'start-aligned'."
38031 "description": "The inline contents are centered within the line box."
38035 "description": "The text is justified according to the method specified by the 'text-justify' property."
38039 "description": "The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."
38043 "description": "The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."
38046 "syntax": "auto | start | end | left | right | center | justify",
38050 "name": "MDN Reference",
38051 "url": "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
38054 "description": "Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",
38060 "name": "text-anchor",
38064 "description": "The rendered characters are aligned such that the end of the resulting rendered text is at the initial current text position."
38068 "description": "The rendered characters are aligned such that the geometric middle of the resulting rendered text is at the initial current text position."
38072 "description": "The rendered characters are aligned such that the start of the resulting rendered text is at the initial current text position."
38076 "description": "Used to align (start-, middle- or end-alignment) a string of text relative to a given point.",
38082 "name": "text-decoration",
38086 "description": "Produces a dashed line style."
38090 "description": "Produces a dotted line."
38094 "description": "Produces a double line."
38097 "name": "line-through",
38098 "description": "Each line of text has a line through the middle."
38102 "description": "Produces no line."
38105 "name": "overline",
38106 "description": "Each line of text has a line above it."
38110 "description": "Produces a solid line."
38113 "name": "underline",
38114 "description": "Each line of text is underlined."
38118 "description": "Produces a wavy line."
38121 "syntax": "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
38125 "name": "MDN Reference",
38126 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
38129 "description": "Decorations applied to font used for an element's text.",
38136 "name": "text-decoration-color",
38144 "syntax": "<color>",
38148 "name": "MDN Reference",
38149 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
38152 "description": "Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",
38158 "name": "text-decoration-line",
38168 "name": "line-through",
38169 "description": "Each line of text has a line through the middle."
38173 "description": "Neither produces nor inhibits text decoration."
38176 "name": "overline",
38177 "description": "Each line of text has a line above it."
38180 "name": "underline",
38181 "description": "Each line of text is underlined."
38184 "syntax": "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
38188 "name": "MDN Reference",
38189 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
38192 "description": "Specifies what line decorations, if any, are added to the element.",
38198 "name": "text-decoration-style",
38209 "description": "Produces a dashed line style."
38213 "description": "Produces a dotted line."
38217 "description": "Produces a double line."
38221 "description": "Produces no line."
38225 "description": "Produces a solid line."
38229 "description": "Produces a wavy line."
38232 "syntax": "solid | double | dotted | dashed | wavy",
38236 "name": "MDN Reference",
38237 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
38240 "description": "Specifies the line style for underline, line-through and overline text decoration.",
38246 "name": "text-indent",
38248 "syntax": "<length-percentage> && hanging? && each-line?",
38252 "name": "MDN Reference",
38253 "url": "https://developer.mozilla.org/docs/Web/CSS/text-indent"
38256 "description": "Specifies the indentation applied to lines of inline content in a block. The indentation only affects the first line of inline content in the block unless the 'hanging' keyword is specified, in which case it affects all lines except the first.",
38263 "name": "text-justify",
38274 "description": "The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."
38277 "name": "distribute",
38278 "description": "Justification primarily changes spacing both at word separators and at grapheme cluster boundaries in all scripts except those in the connected and cursive groups. This value is sometimes used in e.g. Japanese, often with the 'text-align-last' property."
38281 "name": "distribute-all-lines"
38284 "name": "inter-cluster",
38285 "description": "Justification primarily changes spacing at word separators and at grapheme cluster boundaries in clustered scripts. This value is typically used for Southeast Asian scripts such as Thai."
38288 "name": "inter-ideograph",
38289 "description": "Justification primarily changes spacing at word separators and at inter-graphemic boundaries in scripts that use no word spaces. This value is typically used for CJK languages."
38292 "name": "inter-word",
38293 "description": "Justification primarily changes spacing at word separators. This value is typically used for languages that separate words using spaces, like English or (sometimes) Korean."
38297 "description": "Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."
38300 "name": "newspaper"
38303 "syntax": "auto | inter-character | inter-word | none",
38307 "name": "MDN Reference",
38308 "url": "https://developer.mozilla.org/docs/Web/CSS/text-justify"
38311 "description": "Selects the justification algorithm used when 'text-align' is set to 'justify'. The property applies to block containers, but the UA may (but is not required to) also support it on inline elements.",
38317 "name": "text-orientation",
38327 "name": "sideways",
38335 "description": "This value is equivalent to 'sideways-right' in 'vertical-rl' writing mode and equivalent to 'sideways-left' in 'vertical-lr' writing mode."
38338 "name": "sideways-right",
38346 "description": "In vertical writing modes, this causes text to be set as if in a horizontal layout, but rotated 90° clockwise."
38350 "description": "In vertical writing modes, characters from horizontal-only scripts are rendered upright, i.e. in their standard horizontal orientation."
38353 "syntax": "mixed | upright | sideways",
38357 "name": "MDN Reference",
38358 "url": "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
38361 "description": "Specifies the orientation of text within a line.",
38367 "name": "text-overflow",
38371 "description": "Clip inline content that overflows. Characters may be only partially rendered."
38374 "name": "ellipsis",
38375 "description": "Render an ellipsis character (U+2026) to represent clipped inline content."
38378 "syntax": "[ clip | ellipsis | <string> ]{1,2}",
38382 "name": "MDN Reference",
38383 "url": "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
38386 "description": "Text can overflow for example when it is prevented from wrapping.",
38393 "name": "text-rendering",
38406 "name": "geometricPrecision",
38407 "description": "Indicates that the user agent shall emphasize geometric precision over legibility and rendering speed."
38410 "name": "optimizeLegibility",
38411 "description": "Indicates that the user agent shall emphasize legibility over rendering speed and geometric precision."
38414 "name": "optimizeSpeed",
38415 "description": "Indicates that the user agent shall emphasize rendering speed over legibility and geometric precision."
38418 "syntax": "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
38422 "name": "MDN Reference",
38423 "url": "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
38426 "description": "The creator of SVG content might want to provide a hint to the implementation about what tradeoffs to make as it renders text. The ‘text-rendering’ property provides these hints.",
38432 "name": "text-shadow",
38436 "description": "No shadow."
38439 "syntax": "none | <shadow-t>#",
38443 "name": "MDN Reference",
38444 "url": "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
38447 "description": "Enables shadow effects to be applied to the text of the element.",
38454 "name": "text-transform",
38457 "name": "capitalize",
38458 "description": "Puts the first typographic letter unit of each word in titlecase."
38461 "name": "lowercase",
38462 "description": "Puts all letters in lowercase."
38466 "description": "No effects."
38469 "name": "uppercase",
38470 "description": "Puts all letters in uppercase."
38473 "syntax": "none | capitalize | uppercase | lowercase | full-width | full-size-kana",
38477 "name": "MDN Reference",
38478 "url": "https://developer.mozilla.org/docs/Web/CSS/text-transform"
38481 "description": "Controls capitalization effects of an element’s text.",
38487 "name": "text-underline-position",
38494 "description": "The user agent may use any algorithm to determine the underline’s position. In horizontal line layout, the underline should be aligned as for alphabetic. In vertical line layout, if the language is set to Japanese or Korean, the underline should be aligned as for over."
38498 "description": "The underline is aligned with the under edge of the element’s content box."
38501 "syntax": "auto | from-font | [ under || [ left | right ] ]",
38505 "name": "MDN Reference",
38506 "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
38509 "description": "Sets the position of an underline specified on the same element: it does not affect underlines specified by ancestor elements. This property is typically used in vertical writing contexts such as in Japanese documents where it often desired to have the underline appear 'over' (to the right of) the affected run of text",
38519 "description": "For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"
38522 "syntax": "<length> | <percentage> | auto",
38526 "name": "MDN Reference",
38527 "url": "https://developer.mozilla.org/docs/Web/CSS/top"
38530 "description": "Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's 'containing block'.",
38537 "name": "touch-action",
38541 "description": "The user agent may determine any permitted touch behaviors for touches that begin on the element."
38544 "name": "cross-slide-x"
38547 "name": "cross-slide-y"
38550 "name": "double-tap-zoom"
38553 "name": "manipulation",
38554 "description": "The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming."
38558 "description": "Touches that begin on the element must not trigger default touch behaviors."
38562 "description": "The user agent may consider touches that begin on the element only for the purposes of horizontally scrolling the element’s nearest ancestor with horizontally scrollable content."
38566 "description": "The user agent may consider touches that begin on the element only for the purposes of vertically scrolling the element’s nearest ancestor with vertically scrollable content."
38569 "name": "pinch-zoom"
38572 "syntax": "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
38576 "name": "MDN Reference",
38577 "url": "https://developer.mozilla.org/docs/Web/CSS/touch-action"
38580 "description": "Determines whether touch input may trigger default behavior supplied by user agent.",
38586 "name": "transform",
38589 "name": "matrix()",
38590 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
38593 "name": "matrix3d()",
38594 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
38600 "name": "perspective()",
38601 "description": "Specifies a perspective projection matrix."
38604 "name": "rotate()",
38605 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
38608 "name": "rotate3d()",
38609 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
38612 "name": "rotateX('angle')",
38613 "description": "Specifies a clockwise rotation by the given angle about the X axis."
38616 "name": "rotateY('angle')",
38617 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
38620 "name": "rotateZ('angle')",
38621 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
38625 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
38628 "name": "scale3d()",
38629 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
38632 "name": "scaleX()",
38633 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
38636 "name": "scaleY()",
38637 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
38640 "name": "scaleZ()",
38641 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
38645 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
38649 "description": "Specifies a skew transformation along the X axis by the given angle."
38653 "description": "Specifies a skew transformation along the Y axis by the given angle."
38656 "name": "translate()",
38657 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
38660 "name": "translate3d()",
38661 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
38664 "name": "translateX()",
38665 "description": "Specifies a translation by the given amount in the X direction."
38668 "name": "translateY()",
38669 "description": "Specifies a translation by the given amount in the Y direction."
38672 "name": "translateZ()",
38673 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
38676 "syntax": "none | <transform-list>",
38680 "name": "MDN Reference",
38681 "url": "https://developer.mozilla.org/docs/Web/CSS/transform"
38684 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
38690 "name": "transform-origin",
38691 "syntax": "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
38695 "name": "MDN Reference",
38696 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
38699 "description": "Establishes the origin of transformation for an element.",
38707 "name": "transform-style",
38718 "description": "All children of this element are rendered flattened into the 2D plane of the element."
38721 "name": "preserve-3d",
38729 "description": "Flattening is not performed, so children maintain their position in 3D space."
38732 "syntax": "flat | preserve-3d",
38736 "name": "MDN Reference",
38737 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-style"
38740 "description": "Defines how nested elements are rendered in 3D space.",
38746 "name": "transition",
38750 "description": "Every property that is able to undergo a transition will do so."
38754 "description": "No property will transition."
38757 "syntax": "<single-transition>#",
38761 "name": "MDN Reference",
38762 "url": "https://developer.mozilla.org/docs/Web/CSS/transition"
38765 "description": "Shorthand property combines four of the transition properties into a single property.",
38774 "name": "transition-delay",
38775 "syntax": "<time>#",
38779 "name": "MDN Reference",
38780 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
38783 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
38789 "name": "transition-duration",
38790 "syntax": "<time>#",
38794 "name": "MDN Reference",
38795 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
38798 "description": "Specifies how long the transition from the old value to the new value should take.",
38804 "name": "transition-property",
38808 "description": "Every property that is able to undergo a transition will do so."
38812 "description": "No property will transition."
38815 "syntax": "none | <single-transition-property>#",
38819 "name": "MDN Reference",
38820 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-property"
38823 "description": "Specifies the name of the CSS property to which the transition is applied.",
38829 "name": "transition-timing-function",
38830 "syntax": "<timing-function>#",
38834 "name": "MDN Reference",
38835 "url": "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
38838 "description": "Describes how the intermediate values used during a transition will be calculated.",
38844 "name": "unicode-bidi",
38847 "name": "bidi-override",
38848 "description": "Inside the element, reordering is strictly in sequence according to the 'direction' property; the implicit part of the bidirectional algorithm is ignored."
38852 "description": "If the element is inline-level, this value opens an additional level of embedding with respect to the bidirectional algorithm. The direction of this embedding level is given by the 'direction' property."
38856 "description": "The contents of the element are considered to be inside a separate, independent paragraph."
38859 "name": "isolate-override",
38860 "description": "This combines the isolation behavior of 'isolate' with the directional override behavior of 'bidi-override'"
38864 "description": "The element does not open an additional level of embedding with respect to the bidirectional algorithm. For inline-level elements, implicit reordering works across element boundaries."
38867 "name": "plaintext",
38868 "description": "For the purposes of the Unicode bidirectional algorithm, the base directionality of each bidi paragraph for which the element forms the containing block is determined not by the element's computed 'direction'."
38871 "syntax": "normal | embed | isolate | bidi-override | isolate-override | plaintext",
38875 "name": "MDN Reference",
38876 "url": "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
38879 "description": "The level of embedding with respect to the bidirectional algorithm.",
38885 "name": "unicode-range",
38889 "description": "Ampersand."
38892 "name": "U+20-24F, U+2B0-2FF, U+370-4FF, U+1E00-1EFF, U+2000-20CF, U+2100-23FF, U+2500-26FF, U+E000-F8FF, U+FB00–FB4F",
38893 "description": "WGL4 character set (Pan-European)."
38896 "name": "U+20-17F, U+2B0-2FF, U+2000-206F, U+20A0-20CF, U+2100-21FF, U+2600-26FF",
38897 "description": "The Multilingual European Subset No. 1. Latin. Covers ~44 languages."
38900 "name": "U+20-2FF, U+370-4FF, U+1E00-20CF, U+2100-23FF, U+2500-26FF, U+FB00-FB4F, U+FFF0-FFFD",
38901 "description": "The Multilingual European Subset No. 2. Latin, Greek, and Cyrillic. Covers ~128 language."
38904 "name": "U+20-4FF, U+530-58F, U+10D0-10FF, U+1E00-23FF, U+2440-245F, U+2500-26FF, U+FB00-FB4F, U+FE20-FE2F, U+FFF0-FFFD",
38905 "description": "The Multilingual European Subset No. 3. Covers all characters belonging to European scripts."
38909 "description": "Basic Latin (ASCII)."
38913 "description": "Latin-1 Supplement. Accented characters for Western European languages, common punctuation characters, multiplication and division signs."
38916 "name": "U+100-17F",
38917 "description": "Latin Extended-A. Accented characters for for Czech, Dutch, Polish, and Turkish."
38920 "name": "U+180-24F",
38921 "description": "Latin Extended-B. Croatian, Slovenian, Romanian, Non-European and historic latin, Khoisan, Pinyin, Livonian, Sinology."
38924 "name": "U+1E00-1EFF",
38925 "description": "Latin Extended Additional. Vietnamese, German captial sharp s, Medievalist, Latin general use."
38928 "name": "U+250-2AF",
38929 "description": "International Phonetic Alphabet Extensions."
38932 "name": "U+370-3FF",
38933 "description": "Greek and Coptic."
38936 "name": "U+1F00-1FFF",
38937 "description": "Greek Extended. Accented characters for polytonic Greek."
38940 "name": "U+400-4FF",
38941 "description": "Cyrillic."
38944 "name": "U+500-52F",
38945 "description": "Cyrillic Supplement. Extra letters for Komi, Khanty, Chukchi, Mordvin, Kurdish, Aleut, Chuvash, Abkhaz, Azerbaijani, and Orok."
38948 "name": "U+00-52F, U+1E00-1FFF, U+2200–22FF",
38949 "description": "Latin, Greek, Cyrillic, some punctuation and symbols."
38952 "name": "U+530–58F",
38953 "description": "Armenian."
38956 "name": "U+590–5FF",
38957 "description": "Hebrew."
38960 "name": "U+600–6FF",
38961 "description": "Arabic."
38964 "name": "U+750–77F",
38965 "description": "Arabic Supplement. Additional letters for African languages, Khowar, Torwali, Burushaski, and early Persian."
38968 "name": "U+8A0–8FF",
38969 "description": "Arabic Extended-A. Additional letters for African languages, European and Central Asian languages, Rohingya, Tamazight, Arwi, and Koranic annotation signs."
38972 "name": "U+700–74F",
38973 "description": "Syriac."
38976 "name": "U+900–97F",
38977 "description": "Devanagari."
38980 "name": "U+980–9FF",
38981 "description": "Bengali."
38984 "name": "U+A00–A7F",
38985 "description": "Gurmukhi."
38988 "name": "U+A80–AFF",
38989 "description": "Gujarati."
38992 "name": "U+B00–B7F",
38993 "description": "Oriya."
38996 "name": "U+B80–BFF",
38997 "description": "Tamil."
39000 "name": "U+C00–C7F",
39001 "description": "Telugu."
39004 "name": "U+C80–CFF",
39005 "description": "Kannada."
39008 "name": "U+D00–D7F",
39009 "description": "Malayalam."
39012 "name": "U+D80–DFF",
39013 "description": "Sinhala."
39016 "name": "U+118A0–118FF",
39017 "description": "Warang Citi."
39020 "name": "U+E00–E7F",
39021 "description": "Thai."
39024 "name": "U+1A20–1AAF",
39025 "description": "Tai Tham."
39028 "name": "U+AA80–AADF",
39029 "description": "Tai Viet."
39032 "name": "U+E80–EFF",
39033 "description": "Lao."
39036 "name": "U+F00–FFF",
39037 "description": "Tibetan."
39040 "name": "U+1000–109F",
39041 "description": "Myanmar (Burmese)."
39044 "name": "U+10A0–10FF",
39045 "description": "Georgian."
39048 "name": "U+1200–137F",
39049 "description": "Ethiopic."
39052 "name": "U+1380–139F",
39053 "description": "Ethiopic Supplement. Extra Syllables for Sebatbeit, and Tonal marks"
39056 "name": "U+2D80–2DDF",
39057 "description": "Ethiopic Extended. Extra Syllables for Me'en, Blin, and Sebatbeit."
39060 "name": "U+AB00–AB2F",
39061 "description": "Ethiopic Extended-A. Extra characters for Gamo-Gofa-Dawro, Basketo, and Gumuz."
39064 "name": "U+1780–17FF",
39065 "description": "Khmer."
39068 "name": "U+1800–18AF",
39069 "description": "Mongolian."
39072 "name": "U+1B80–1BBF",
39073 "description": "Sundanese."
39076 "name": "U+1CC0–1CCF",
39077 "description": "Sundanese Supplement. Punctuation."
39080 "name": "U+4E00–9FD5",
39081 "description": "CJK (Chinese, Japanese, Korean) Unified Ideographs. Most common ideographs for modern Chinese and Japanese."
39084 "name": "U+3400–4DB5",
39085 "description": "CJK Unified Ideographs Extension A. Rare ideographs."
39088 "name": "U+2F00–2FDF",
39089 "description": "Kangxi Radicals."
39092 "name": "U+2E80–2EFF",
39093 "description": "CJK Radicals Supplement. Alternative forms of Kangxi Radicals."
39096 "name": "U+1100–11FF",
39097 "description": "Hangul Jamo."
39100 "name": "U+AC00–D7AF",
39101 "description": "Hangul Syllables."
39104 "name": "U+3040–309F",
39105 "description": "Hiragana."
39108 "name": "U+30A0–30FF",
39109 "description": "Katakana."
39112 "name": "U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F",
39113 "description": "Japanese Kanji, Hiragana and Katakana characters plus Yen/Yuan symbol."
39116 "name": "U+A4D0–A4FF",
39117 "description": "Lisu."
39120 "name": "U+A000–A48F",
39121 "description": "Yi Syllables."
39124 "name": "U+A490–A4CF",
39125 "description": "Yi Radicals."
39128 "name": "U+2000-206F",
39129 "description": "General Punctuation."
39132 "name": "U+3000–303F",
39133 "description": "CJK Symbols and Punctuation."
39136 "name": "U+2070–209F",
39137 "description": "Superscripts and Subscripts."
39140 "name": "U+20A0–20CF",
39141 "description": "Currency Symbols."
39144 "name": "U+2100–214F",
39145 "description": "Letterlike Symbols."
39148 "name": "U+2150–218F",
39149 "description": "Number Forms."
39152 "name": "U+2190–21FF",
39153 "description": "Arrows."
39156 "name": "U+2200–22FF",
39157 "description": "Mathematical Operators."
39160 "name": "U+2300–23FF",
39161 "description": "Miscellaneous Technical."
39164 "name": "U+E000-F8FF",
39165 "description": "Private Use Area."
39168 "name": "U+FB00–FB4F",
39169 "description": "Alphabetic Presentation Forms. Ligatures for latin, Armenian, and Hebrew."
39172 "name": "U+FB50–FDFF",
39173 "description": "Arabic Presentation Forms-A. Contextual forms / ligatures for Persian, Urdu, Sindhi, Central Asian languages, etc, Arabic pedagogical symbols, word ligatures."
39176 "name": "U+1F600–1F64F",
39177 "description": "Emoji: Emoticons."
39180 "name": "U+2600–26FF",
39181 "description": "Emoji: Miscellaneous Symbols."
39184 "name": "U+1F300–1F5FF",
39185 "description": "Emoji: Miscellaneous Symbols and Pictographs."
39188 "name": "U+1F900–1F9FF",
39189 "description": "Emoji: Supplemental Symbols and Pictographs."
39192 "name": "U+1F680–1F6FF",
39193 "description": "Emoji: Transport and Map Symbols."
39196 "syntax": "<unicode-range>#",
39198 "description": "@font-face descriptor. Defines the set of Unicode codepoints that may be supported by the font face for which it is declared.",
39204 "name": "user-select",
39208 "description": "The content of the element must be selected atomically"
39215 "description": "UAs must not allow a selection which is started in this element to be extended outside of this element."
39219 "description": "The UA must not allow selections to be started in this element."
39223 "description": "The element imposes no constraint on the selection."
39226 "status": "nonstandard",
39227 "syntax": "auto | text | none | contain | all",
39231 "name": "MDN Reference",
39232 "url": "https://developer.mozilla.org/docs/Web/CSS/user-select"
39235 "description": "Controls the appearance of selection.",
39241 "name": "vertical-align",
39245 "description": "Align the dominant baseline of the parent box with the equivalent, or heuristically reconstructed, baseline of the element inline box."
39248 "name": "baseline",
39249 "description": "Align the 'alphabetic' baseline of the element with the 'alphabetic' baseline of the parent element."
39253 "description": "Align the after edge of the extended inline box with the after-edge of the line box."
39257 "description": "Align the 'middle' baseline of the inline element with the middle baseline of the parent."
39261 "description": "Lower the baseline of the box to the proper position for subscripts of the parent's box. (This value has no effect on the font size of the element's text.)"
39265 "description": "Raise the baseline of the box to the proper position for superscripts of the parent's box. (This value has no effect on the font size of the element's text.)"
39268 "name": "text-bottom",
39269 "description": "Align the bottom of the box with the after-edge of the parent element's font."
39272 "name": "text-top",
39273 "description": "Align the top of the box with the before-edge of the parent element's font."
39277 "description": "Align the before edge of the extended inline box with the before-edge of the line box."
39280 "name": "-webkit-baseline-middle"
39283 "syntax": "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
39287 "name": "MDN Reference",
39288 "url": "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
39291 "description": "Affects the vertical positioning of the inline boxes generated by an inline-level element inside a line box.",
39298 "name": "visibility",
39301 "name": "collapse",
39302 "description": "Table-specific. If used on elements other than rows, row groups, columns, or column groups, 'collapse' has the same meaning as 'hidden'."
39306 "description": "The generated box is invisible (fully transparent, nothing is drawn), but still affects layout."
39310 "description": "The generated box is visible."
39313 "syntax": "visible | hidden | collapse",
39317 "name": "MDN Reference",
39318 "url": "https://developer.mozilla.org/docs/Web/CSS/visibility"
39321 "description": "Specifies whether the boxes generated by an element are rendered. Invisible boxes still affect layout (set the ‘display’ property to ‘none’ to suppress box generation altogether).",
39327 "name": "-webkit-animation",
39334 "name": "alternate",
39335 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
39338 "name": "alternate-reverse",
39339 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
39342 "name": "backwards",
39343 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
39347 "description": "Both forwards and backwards fill modes are applied."
39350 "name": "forwards",
39351 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
39354 "name": "infinite",
39355 "description": "Causes the animation to repeat forever."
39359 "description": "No animation is performed"
39363 "description": "Normal playback."
39367 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
39371 "description": "Shorthand property combines six of the animation properties into a single property.",
39381 "name": "-webkit-animation-delay",
39387 "description": "Defines when the animation will start.",
39393 "name": "-webkit-animation-direction",
39400 "name": "alternate",
39401 "description": "The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."
39404 "name": "alternate-reverse",
39405 "description": "The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."
39409 "description": "Normal playback."
39413 "description": "All iterations of the animation are played in the reverse direction from the way they were specified."
39417 "description": "Defines whether or not the animation should play in reverse on alternate cycles.",
39423 "name": "-webkit-animation-duration",
39429 "description": "Defines the length of time that an animation takes to complete one cycle.",
39435 "name": "-webkit-animation-fill-mode",
39442 "name": "backwards",
39443 "description": "The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."
39447 "description": "Both forwards and backwards fill modes are applied."
39450 "name": "forwards",
39451 "description": "The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."
39455 "description": "There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."
39459 "description": "Defines what values are applied by the animation outside the time it is executing.",
39465 "name": "-webkit-animation-iteration-count",
39472 "name": "infinite",
39473 "description": "Causes the animation to repeat forever."
39477 "description": "Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",
39484 "name": "-webkit-animation-name",
39492 "description": "No animation is performed"
39496 "description": "Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",
39503 "name": "-webkit-animation-play-state",
39511 "description": "A running animation will be paused."
39515 "description": "Resume playback of a paused animation."
39519 "description": "Defines whether the animation is running or paused.",
39525 "name": "-webkit-animation-timing-function",
39531 "description": "Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",
39537 "name": "-webkit-appearance",
39547 "name": "button-bevel"
39550 "name": "caps-lock-indicator"
39559 "name": "default-button"
39568 "name": "media-fullscreen-button"
39571 "name": "media-mute-button"
39574 "name": "media-play-button"
39577 "name": "media-seek-back-button"
39580 "name": "media-seek-forward-button"
39583 "name": "media-slider"
39586 "name": "media-sliderthumb"
39592 "name": "menulist-button"
39595 "name": "menulist-text"
39598 "name": "menulist-textfield"
39604 "name": "push-button"
39610 "name": "scrollbarbutton-down"
39613 "name": "scrollbarbutton-left"
39616 "name": "scrollbarbutton-right"
39619 "name": "scrollbarbutton-up"
39622 "name": "scrollbargripper-horizontal"
39625 "name": "scrollbargripper-vertical"
39628 "name": "scrollbarthumb-horizontal"
39631 "name": "scrollbarthumb-vertical"
39634 "name": "scrollbartrack-horizontal"
39637 "name": "scrollbartrack-vertical"
39640 "name": "searchfield"
39643 "name": "searchfield-cancel-button"
39646 "name": "searchfield-decoration"
39649 "name": "searchfield-results-button"
39652 "name": "searchfield-results-decoration"
39655 "name": "slider-horizontal"
39658 "name": "sliderthumb-horizontal"
39661 "name": "sliderthumb-vertical"
39664 "name": "slider-vertical"
39667 "name": "square-button"
39673 "name": "textfield"
39676 "status": "nonstandard",
39677 "syntax": "none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield",
39679 "description": "Changes the appearance of buttons and other controls to resemble native controls.",
39685 "name": "-webkit-backdrop-filter",
39692 "description": "No filter effects are applied."
39696 "description": "Applies a Gaussian blur to the input image."
39699 "name": "brightness()",
39700 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
39703 "name": "contrast()",
39704 "description": "Adjusts the contrast of the input."
39707 "name": "drop-shadow()",
39708 "description": "Applies a drop shadow effect to the input image."
39711 "name": "grayscale()",
39712 "description": "Converts the input image to grayscale."
39715 "name": "hue-rotate()",
39716 "description": "Applies a hue rotation on the input image. "
39719 "name": "invert()",
39720 "description": "Inverts the samples in the input image."
39723 "name": "opacity()",
39724 "description": "Applies transparency to the samples in the input image."
39727 "name": "saturate()",
39728 "description": "Saturates the input image."
39732 "description": "Converts the input image to sepia."
39736 "description": "A filter reference to a <filter> element."
39740 "description": "Applies a filter effect where the first filter in the list takes the element's background image as the input image.",
39747 "name": "-webkit-backface-visibility",
39761 "description": "Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",
39767 "name": "-webkit-background-clip",
39773 "description": "Determines the background painting area.",
39779 "name": "-webkit-background-composite",
39798 "name": "-webkit-background-origin",
39804 "description": "For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",
39810 "name": "-webkit-border-image",
39818 "description": "If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."
39822 "description": "Causes the middle part of the border-image to be preserved."
39829 "description": "The image is tiled (repeated) to fill the area."
39833 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."
39837 "description": "The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."
39841 "description": "The image is stretched to fill the area."
39848 "description": "Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",
39858 "name": "-webkit-box-align",
39865 "name": "baseline",
39866 "description": "If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used."
39870 "description": "Any extra space is divided evenly, with half placed above the child and the other half placed after the child."
39874 "description": "For normal direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element."
39878 "description": "For normal direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element."
39882 "description": "The height of each child is adjusted to that of the containing block."
39886 "description": "Specifies the alignment of nested elements within an outer flexible box element.",
39892 "name": "-webkit-box-direction",
39900 "description": "A box with a computed value of horizontal for box-orient displays its children from left to right. A box with a computed value of vertical displays its children from top to bottom."
39904 "description": "A box with a computed value of horizontal for box-orient displays its children from right to left. A box with a computed value of vertical displays its children from bottom to top."
39908 "description": "In webkit applications, -webkit-box-direction specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).",
39914 "name": "-webkit-box-flex",
39920 "description": "Specifies an element's flexibility.",
39926 "name": "-webkit-box-flex-group",
39932 "description": "Flexible elements can be assigned to flex groups using the 'box-flex-group' property.",
39938 "name": "-webkit-box-ordinal-group",
39944 "description": "Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.",
39950 "name": "-webkit-box-orient",
39957 "name": "block-axis",
39958 "description": "Elements are oriented along the box's axis."
39961 "name": "horizontal",
39962 "description": "The box displays its children from left to right in a horizontal line."
39965 "name": "inline-axis",
39966 "description": "Elements are oriented vertically."
39969 "name": "vertical",
39970 "description": "The box displays its children from stacked from top to bottom vertically."
39974 "description": "In webkit applications, -webkit-box-orient specifies whether a box lays out its contents horizontally or vertically.",
39980 "name": "-webkit-box-pack",
39988 "description": "The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."
39992 "description": "For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."
39996 "description": "The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."
40000 "description": "For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."
40004 "description": "Specifies alignment of child elements within the current element in the direction of orientation.",
40010 "name": "-webkit-box-reflect",
40020 "description": "The reflection appears above the border box."
40024 "description": "The reflection appears below the border box."
40028 "description": "The reflection appears to the left of the border box."
40032 "description": "The reflection appears to the right of the border box."
40035 "status": "nonstandard",
40036 "syntax": "[ above | below | right | left ]? <length>? <image>?",
40040 "name": "MDN Reference",
40041 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
40044 "description": "Defines a reflection of a border box."
40047 "name": "-webkit-box-sizing",
40054 "name": "border-box",
40055 "description": "The specified width and height (and respective min/max properties) on this element determine the border box of the element."
40058 "name": "content-box",
40059 "description": "Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."
40063 "description": "Box Model addition in CSS3.",
40069 "name": "-webkit-break-after",
40076 "description": "Always force a page break before/after the generated box."
40080 "description": "Neither force nor forbid a page/column break before/after the generated box."
40084 "description": "Avoid a page/column break before/after the generated box."
40087 "name": "avoid-column",
40088 "description": "Avoid a column break before/after the generated box."
40091 "name": "avoid-page",
40092 "description": "Avoid a page break before/after the generated box."
40095 "name": "avoid-region"
40099 "description": "Always force a column break before/after the generated box."
40103 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
40107 "description": "Always force a page break before/after the generated box."
40114 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
40118 "description": "Describes the page/column break behavior before the generated box.",
40124 "name": "-webkit-break-before",
40131 "description": "Always force a page break before/after the generated box."
40135 "description": "Neither force nor forbid a page/column break before/after the generated box."
40139 "description": "Avoid a page/column break before/after the generated box."
40142 "name": "avoid-column",
40143 "description": "Avoid a column break before/after the generated box."
40146 "name": "avoid-page",
40147 "description": "Avoid a page break before/after the generated box."
40150 "name": "avoid-region"
40154 "description": "Always force a column break before/after the generated box."
40158 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
40162 "description": "Always force a page break before/after the generated box."
40169 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
40173 "description": "Describes the page/column break behavior before the generated box.",
40179 "name": "-webkit-break-inside",
40186 "description": "Neither force nor forbid a page/column break inside the generated box."
40190 "description": "Avoid a page/column break inside the generated box."
40193 "name": "avoid-column",
40194 "description": "Avoid a column break inside the generated box."
40197 "name": "avoid-page",
40198 "description": "Avoid a page break inside the generated box."
40201 "name": "avoid-region"
40205 "description": "Describes the page/column break behavior inside the generated box.",
40211 "name": "-webkit-column-break-after",
40219 "description": "Always force a page break before/after the generated box."
40223 "description": "Neither force nor forbid a page/column break before/after the generated box."
40227 "description": "Avoid a page/column break before/after the generated box."
40230 "name": "avoid-column",
40231 "description": "Avoid a column break before/after the generated box."
40234 "name": "avoid-page",
40235 "description": "Avoid a page break before/after the generated box."
40238 "name": "avoid-region"
40242 "description": "Always force a column break before/after the generated box."
40246 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
40250 "description": "Always force a page break before/after the generated box."
40257 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
40261 "description": "Describes the page/column break behavior before the generated box.",
40267 "name": "-webkit-column-break-before",
40275 "description": "Always force a page break before/after the generated box."
40279 "description": "Neither force nor forbid a page/column break before/after the generated box."
40283 "description": "Avoid a page/column break before/after the generated box."
40286 "name": "avoid-column",
40287 "description": "Avoid a column break before/after the generated box."
40290 "name": "avoid-page",
40291 "description": "Avoid a page break before/after the generated box."
40294 "name": "avoid-region"
40298 "description": "Always force a column break before/after the generated box."
40302 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."
40306 "description": "Always force a page break before/after the generated box."
40313 "description": "Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."
40317 "description": "Describes the page/column break behavior before the generated box.",
40323 "name": "-webkit-column-break-inside",
40331 "description": "Neither force nor forbid a page/column break inside the generated box."
40335 "description": "Avoid a page/column break inside the generated box."
40338 "name": "avoid-column",
40339 "description": "Avoid a column break inside the generated box."
40342 "name": "avoid-page",
40343 "description": "Avoid a page break inside the generated box."
40346 "name": "avoid-region"
40350 "description": "Describes the page/column break behavior inside the generated box.",
40356 "name": "-webkit-column-count",
40364 "description": "Determines the number of columns by the 'column-width' property and the element width."
40368 "description": "Describes the optimal number of columns into which the content of the element will be flowed.",
40374 "name": "-webkit-column-gap",
40382 "description": "User agent specific and typically equivalent to 1em."
40386 "description": "Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",
40392 "name": "-webkit-column-rule",
40398 "description": "This property is a shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",
40407 "name": "-webkit-column-rule-color",
40413 "description": "Sets the color of the column rule",
40419 "name": "-webkit-column-rule-style",
40425 "description": "Sets the style of the rule between columns of an element.",
40431 "name": "-webkit-column-rule-width",
40437 "description": "Sets the width of the rule between columns. Negative values are not allowed.",
40444 "name": "-webkit-columns",
40452 "description": "The width depends on the values of other properties."
40456 "description": "A shorthand property which sets both 'column-width' and 'column-count'.",
40463 "name": "-webkit-column-span",
40471 "description": "The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appear."
40475 "description": "The element does not span multiple columns."
40479 "description": "Describes the page/column break behavior after the generated box.",
40485 "name": "-webkit-column-width",
40493 "description": "The width depends on the values of other properties."
40497 "description": "This property describes the width of columns in multicol elements.",
40503 "name": "-webkit-filter",
40512 "description": "No filter effects are applied."
40516 "description": "Applies a Gaussian blur to the input image."
40519 "name": "brightness()",
40520 "description": "Applies a linear multiplier to input image, making it appear more or less bright."
40523 "name": "contrast()",
40524 "description": "Adjusts the contrast of the input."
40527 "name": "drop-shadow()",
40528 "description": "Applies a drop shadow effect to the input image."
40531 "name": "grayscale()",
40532 "description": "Converts the input image to grayscale."
40535 "name": "hue-rotate()",
40536 "description": "Applies a hue rotation on the input image. "
40539 "name": "invert()",
40540 "description": "Inverts the samples in the input image."
40543 "name": "opacity()",
40544 "description": "Applies transparency to the samples in the input image."
40547 "name": "saturate()",
40548 "description": "Saturates the input image."
40552 "description": "Converts the input image to sepia."
40556 "description": "A filter reference to a <filter> element."
40560 "description": "Processes an element’s rendering before it is displayed in the document, by applying one or more filter effects.",
40567 "name": "-webkit-flow-from",
40574 "description": "The block container is not a CSS Region."
40578 "description": "Makes a block container a region and associates it with a named flow.",
40584 "name": "-webkit-flow-into",
40591 "description": "The element is not moved to a named flow and normal CSS processing takes place."
40595 "description": "Places an element or its contents into a named flow.",
40601 "name": "-webkit-font-feature-settings",
40635 "description": "No change in glyph substitution or positioning occurs."
40645 "description": "This property provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",
40652 "name": "-webkit-hyphens",
40659 "description": "Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."
40663 "description": "Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"
40667 "description": "Words are not broken at line breaks, even if characters inside the word suggest line break points."
40671 "description": "Controls whether hyphenation is allowed to create more break opportunities within a line of text.",
40677 "name": "-webkit-line-break",
40684 "name": "after-white-space"
40691 "description": "Specifies line-breaking rules for CJK (Chinese, Japanese, and Korean) text."
40694 "name": "-webkit-margin-bottom-collapse",
40716 "name": "-webkit-margin-collapse",
40738 "name": "-webkit-margin-start",
40755 "name": "-webkit-margin-top-collapse",
40777 "name": "-webkit-mask-clip",
40783 "status": "nonstandard",
40784 "syntax": "[ <box> | border | padding | content | text ]#",
40786 "description": "Determines the mask painting area, which determines the area that is affected by the mask.",
40792 "name": "-webkit-mask-image",
40801 "description": "Counts as a transparent black image layer."
40805 "description": "Reference to a <mask element or to a CSS image."
40808 "status": "nonstandard",
40809 "syntax": "<mask-reference>#",
40811 "description": "Sets the mask layer image of an element.",
40819 "name": "-webkit-mask-origin",
40825 "status": "nonstandard",
40826 "syntax": "[ <box> | border | padding | content ]#",
40828 "description": "Specifies the mask positioning area.",
40834 "name": "-webkit-mask-repeat",
40840 "status": "nonstandard",
40841 "syntax": "<repeat-style>#",
40843 "description": "Specifies how mask layer images are tiled after they have been sized and positioned.",
40849 "name": "-webkit-mask-size",
40858 "description": "Resolved by using the image’s intrinsic ratio and the size of the other dimension, or failing that, using the image’s intrinsic size, or failing that, treating it as 100%."
40862 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."
40866 "description": "Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."
40869 "status": "nonstandard",
40870 "syntax": "<bg-size>#",
40872 "description": "Specifies the size of the mask layer images.",
40880 "name": "-webkit-nbsp-mode",
40894 "description": "Defines the behavior of nonbreaking spaces within text."
40897 "name": "-webkit-overflow-scrolling",
40910 "status": "nonstandard",
40911 "syntax": "auto | touch",
40915 "name": "MDN Reference",
40916 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"
40919 "description": "Specifies whether to use native-style scrolling in an overflow:scroll element."
40922 "name": "-webkit-padding-start",
40934 "name": "-webkit-perspective",
40942 "description": "No perspective transform is applied."
40946 "description": "Applies the same transform as the perspective(<number>) transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",
40952 "name": "-webkit-perspective-origin",
40958 "description": "Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",
40966 "name": "-webkit-region-fragment",
40973 "description": "Content flows as it would in a regular content box."
40977 "description": "If the content fits within the CSS Region, then this property has no effect."
40981 "description": "The 'region-fragment' property controls the behavior of the last region associated with a named flow.",
40987 "name": "-webkit-tap-highlight-color",
40993 "status": "nonstandard",
40994 "syntax": "<color>",
40998 "name": "MDN Reference",
40999 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"
41007 "name": "-webkit-text-fill-color",
41015 "status": "nonstandard",
41016 "syntax": "<color>",
41020 "name": "MDN Reference",
41021 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
41029 "name": "-webkit-text-size-adjust",
41038 "description": "Renderers must use the default size adjustment when displaying on a small device."
41042 "description": "Renderers must not do size adjustment when displaying on a small device."
41046 "description": "Specifies a size adjustment for displaying text content in mobile browsers.",
41052 "name": "-webkit-text-stroke",
41060 "status": "nonstandard",
41061 "syntax": "<length> || <color>",
41065 "name": "MDN Reference",
41066 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
41077 "name": "-webkit-text-stroke-color",
41085 "status": "nonstandard",
41086 "syntax": "<color>",
41090 "name": "MDN Reference",
41091 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
41099 "name": "-webkit-text-stroke-width",
41107 "status": "nonstandard",
41108 "syntax": "<length>",
41112 "name": "MDN Reference",
41113 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
41123 "name": "-webkit-touch-callout",
41132 "status": "nonstandard",
41133 "syntax": "default | none",
41137 "name": "MDN Reference",
41138 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
41146 "name": "-webkit-transform",
41154 "name": "matrix()",
41155 "description": "Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"
41158 "name": "matrix3d()",
41159 "description": "Specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."
41165 "name": "perspective()",
41166 "description": "Specifies a perspective projection matrix."
41169 "name": "rotate()",
41170 "description": "Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."
41173 "name": "rotate3d()",
41174 "description": "Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."
41177 "name": "rotateX('angle')",
41178 "description": "Specifies a clockwise rotation by the given angle about the X axis."
41181 "name": "rotateY('angle')",
41182 "description": "Specifies a clockwise rotation by the given angle about the Y axis."
41185 "name": "rotateZ('angle')",
41186 "description": "Specifies a clockwise rotation by the given angle about the Z axis."
41190 "description": "Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."
41193 "name": "scale3d()",
41194 "description": "Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."
41197 "name": "scaleX()",
41198 "description": "Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."
41201 "name": "scaleY()",
41202 "description": "Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."
41205 "name": "scaleZ()",
41206 "description": "Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."
41210 "description": "Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."
41214 "description": "Specifies a skew transformation along the X axis by the given angle."
41218 "description": "Specifies a skew transformation along the Y axis by the given angle."
41221 "name": "translate()",
41222 "description": "Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."
41225 "name": "translate3d()",
41226 "description": "Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."
41229 "name": "translateX()",
41230 "description": "Specifies a translation by the given amount in the X direction."
41233 "name": "translateY()",
41234 "description": "Specifies a translation by the given amount in the Y direction."
41237 "name": "translateZ()",
41238 "description": "Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."
41242 "description": "A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",
41248 "name": "-webkit-transform-origin",
41255 "description": "Establishes the origin of transformation for an element.",
41263 "name": "-webkit-transform-origin-x",
41269 "description": "The x coordinate of the origin for transforms applied to an element with respect to its border box.",
41276 "name": "-webkit-transform-origin-y",
41282 "description": "The y coordinate of the origin for transforms applied to an element with respect to its border box.",
41289 "name": "-webkit-transform-origin-z",
41295 "description": "The z coordinate of the origin for transforms applied to an element with respect to its border box.",
41302 "name": "-webkit-transform-style",
41310 "description": "All children of this element are rendered flattened into the 2D plane of the element."
41314 "description": "Defines how nested elements are rendered in 3D space.",
41320 "name": "-webkit-transition",
41329 "description": "Every property that is able to undergo a transition will do so."
41333 "description": "No property will transition."
41337 "description": "Shorthand property combines four of the transition properties into a single property.",
41346 "name": "-webkit-transition-delay",
41353 "description": "Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied.",
41359 "name": "-webkit-transition-duration",
41366 "description": "Specifies how long the transition from the old value to the new value should take.",
41372 "name": "-webkit-transition-property",
41381 "description": "Every property that is able to undergo a transition will do so."
41385 "description": "No property will transition."
41389 "description": "Specifies the name of the CSS property to which the transition is applied.",
41395 "name": "-webkit-transition-timing-function",
41402 "description": "Describes how the intermediate values used during a transition will be calculated.",
41408 "name": "-webkit-user-drag",
41429 "name": "-webkit-user-modify",
41436 "name": "read-only"
41439 "name": "read-write"
41442 "name": "read-write-plaintext-only"
41445 "status": "nonstandard",
41446 "syntax": "read-only | read-write | read-write-plaintext-only",
41448 "description": "Determines whether a user can edit the content of an element.",
41454 "name": "-webkit-user-select",
41471 "description": "Controls the appearance of selection.",
41477 "name": "white-space",
41481 "description": "Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'normal'."
41485 "description": "Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'none'."
41489 "description": "Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'none'."
41492 "name": "pre-line",
41493 "description": "Sets 'white-space-collapsing' to 'preserve-breaks' and 'text-wrap' to 'normal'."
41496 "name": "pre-wrap",
41497 "description": "Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'normal'."
41500 "syntax": "normal | pre | nowrap | pre-wrap | pre-line | break-spaces",
41504 "name": "MDN Reference",
41505 "url": "https://developer.mozilla.org/docs/Web/CSS/white-space"
41508 "description": "Shorthand property for the 'white-space-collapsing' and 'text-wrap' properties.",
41522 "syntax": "<integer>",
41526 "name": "MDN Reference",
41527 "url": "https://developer.mozilla.org/docs/Web/CSS/widows"
41530 "description": "Specifies the minimum number of line boxes of a block container that must be left in a fragment after a break.",
41540 "description": "The width depends on the values of other properties."
41543 "name": "fit-content",
41544 "description": "Use the fit-content inline size or fit-content block size, as appropriate to the writing mode."
41547 "name": "max-content",
41548 "description": "Use the max-content inline size or max-content block size, as appropriate to the writing mode."
41551 "name": "min-content",
41552 "description": "Use the min-content inline size or min-content block size, as appropriate to the writing mode."
41555 "syntax": "<viewport-length>{1,2}",
41559 "name": "MDN Reference",
41560 "url": "https://developer.mozilla.org/docs/Web/CSS/width"
41563 "description": "Specifies the width of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",
41570 "name": "will-change",
41581 "description": "Expresses no particular intent."
41584 "name": "contents",
41585 "description": "Indicates that the author expects to animate or change something about the element’s contents in the near future."
41588 "name": "scroll-position",
41589 "description": "Indicates that the author expects to animate or change the scroll position of the element in the near future."
41592 "syntax": "auto | <animateable-feature>#",
41596 "name": "MDN Reference",
41597 "url": "https://developer.mozilla.org/docs/Web/CSS/will-change"
41600 "description": "Provides a rendering hint to the user agent, stating what kinds of changes the author expects to perform on the element.",
41607 "name": "word-break",
41610 "name": "break-all",
41611 "description": "Lines may break between any two grapheme clusters for non-CJK scripts."
41614 "name": "keep-all",
41615 "description": "Block characters can no longer create implied break points."
41619 "description": "Breaks non-CJK scripts according to their own rules."
41622 "syntax": "normal | break-all | keep-all | break-word",
41626 "name": "MDN Reference",
41627 "url": "https://developer.mozilla.org/docs/Web/CSS/word-break"
41630 "description": "Specifies line break opportunities for non-CJK scripts.",
41636 "name": "word-spacing",
41640 "description": "No additional spacing is applied. Computes to zero."
41643 "syntax": "normal | <length-percentage>",
41647 "name": "MDN Reference",
41648 "url": "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
41651 "description": "Specifies additional spacing between “words”.",
41658 "name": "word-wrap",
41661 "name": "break-word",
41662 "description": "An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."
41666 "description": "Lines may break only at allowed break points."
41669 "syntax": "normal | break-word",
41673 "name": "MDN Reference",
41674 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
41677 "description": "Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",
41683 "name": "writing-mode",
41686 "name": "horizontal-tb",
41687 "description": "Top-to-bottom block flow direction. The writing mode is horizontal."
41690 "name": "sideways-lr",
41691 "description": "Left-to-right block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
41694 "name": "sideways-rl",
41695 "description": "Right-to-left block flow direction. The writing mode is vertical, while the typographic mode is horizontal."
41698 "name": "vertical-lr",
41699 "description": "Left-to-right block flow direction. The writing mode is vertical."
41702 "name": "vertical-rl",
41703 "description": "Right-to-left block flow direction. The writing mode is vertical."
41706 "syntax": "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
41710 "name": "MDN Reference",
41711 "url": "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
41714 "description": "This is a shorthand property for both 'direction' and 'block-progression'.",
41724 "description": "The stack level of the generated box in the current stacking context is 0. The box does not establish a new stacking context unless it is the root element."
41727 "syntax": "auto | <integer>",
41731 "name": "MDN Reference",
41732 "url": "https://developer.mozilla.org/docs/Web/CSS/z-index"
41735 "description": "For a positioned box, the 'z-index' property specifies the stack level of the box in the current stacking context and whether the box establishes a local stacking context.",
41754 "syntax": "auto | <number> | <percentage>",
41758 "name": "MDN Reference",
41759 "url": "https://developer.mozilla.org/docs/Web/CSS/zoom"
41762 "description": "Non-standard. Specifies the magnification scale of the object. See 'transform: scale()' for a standards-based alternative.",
41771 "name": "-ms-ime-align",
41772 "status": "nonstandard",
41773 "syntax": "auto | after",
41775 "description": "Aligns the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active."
41778 "name": "-moz-binding",
41779 "status": "nonstandard",
41780 "syntax": "<url> | none",
41787 "name": "MDN Reference",
41788 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-binding"
41791 "description": "The -moz-binding CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element."
41794 "name": "-moz-context-properties",
41795 "status": "nonstandard",
41796 "syntax": "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
41803 "name": "MDN Reference",
41804 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"
41807 "description": "If you reference an SVG image in a webpage (such as with the <img> element or as a background image), the SVG image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element. To do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the -moz-context-properties property, and the image needs to opt in to using those properties by using values such as the context-fill value.\n\nThis feature is available since Firefox 55, but is only currently supported with SVG images loaded via chrome:// or resource:// URLs. To experiment with the feature in SVG on the Web it is necessary to set the svg.context-properties.content.enabled pref to true."
41810 "name": "-moz-float-edge",
41811 "status": "nonstandard",
41812 "syntax": "border-box | content-box | margin-box | padding-box",
41819 "name": "MDN Reference",
41820 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"
41823 "description": "The non-standard -moz-float-edge CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness."
41826 "name": "-moz-force-broken-image-icon",
41827 "status": "nonstandard",
41828 "syntax": "<integer>",
41835 "name": "MDN Reference",
41836 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"
41839 "description": "The -moz-force-broken-image-icon extended CSS property can be used to force the broken image icon to be shown even when a broken image has an alt attribute."
41842 "name": "-moz-image-region",
41843 "status": "nonstandard",
41844 "syntax": "<shape> | auto",
41851 "name": "MDN Reference",
41852 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
41855 "description": "For certain XUL elements and pseudo-elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance."
41858 "name": "-moz-orient",
41859 "status": "nonstandard",
41860 "syntax": "inline | block | horizontal | vertical",
41867 "name": "MDN Reference",
41868 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
41871 "description": "The -moz-orient CSS property specifies the orientation of the element to which it's applied."
41874 "name": "-moz-outline-radius",
41875 "status": "nonstandard",
41876 "syntax": "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
41883 "name": "MDN Reference",
41884 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"
41887 "description": "In Mozilla applications like Firefox, the -moz-outline-radius CSS property can be used to give an element's outline rounded corners."
41890 "name": "-moz-outline-radius-bottomleft",
41891 "status": "nonstandard",
41892 "syntax": "<outline-radius>",
41899 "name": "MDN Reference",
41900 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomleft"
41903 "description": "In Mozilla applications, the -moz-outline-radius-bottomleft CSS property can be used to round the bottom-left corner of an element's outline."
41906 "name": "-moz-outline-radius-bottomright",
41907 "status": "nonstandard",
41908 "syntax": "<outline-radius>",
41915 "name": "MDN Reference",
41916 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomright"
41919 "description": "In Mozilla applications, the -moz-outline-radius-bottomright CSS property can be used to round the bottom-right corner of an element's outline."
41922 "name": "-moz-outline-radius-topleft",
41923 "status": "nonstandard",
41924 "syntax": "<outline-radius>",
41931 "name": "MDN Reference",
41932 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topleft"
41935 "description": "In Mozilla applications, the -moz-outline-radius-topleft CSS property can be used to round the top-left corner of an element's outline."
41938 "name": "-moz-outline-radius-topright",
41939 "status": "nonstandard",
41940 "syntax": "<outline-radius>",
41947 "name": "MDN Reference",
41948 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topright"
41951 "description": "In Mozilla applications, the -moz-outline-radius-topright CSS property can be used to round the top-right corner of an element's outline."
41954 "name": "-moz-stack-sizing",
41955 "status": "nonstandard",
41956 "syntax": "ignore | stretch-to-fit",
41958 "description": "-moz-stack-sizing is an extended CSS property. Normally, a stack will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible."
41961 "name": "-moz-text-blink",
41962 "status": "nonstandard",
41963 "syntax": "none | blink",
41965 "description": "The -moz-text-blink non-standard Mozilla CSS extension specifies the blink mode."
41968 "name": "-moz-user-input",
41969 "status": "nonstandard",
41970 "syntax": "auto | none | enabled | disabled",
41977 "name": "MDN Reference",
41978 "url": "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
41981 "description": "In Mozilla applications, -moz-user-input determines if an element will accept user input."
41984 "name": "-moz-user-modify",
41985 "status": "nonstandard",
41986 "syntax": "read-only | read-write | write-only",
41988 "description": "The -moz-user-modify property has no effect. It was originally planned to determine whether or not the content of an element can be edited by a user."
41991 "name": "-moz-window-dragging",
41992 "status": "nonstandard",
41993 "syntax": "drag | no-drag",
41995 "description": "The -moz-window-dragging CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X."
41998 "name": "-moz-window-shadow",
41999 "status": "nonstandard",
42000 "syntax": "default | menu | tooltip | sheet | none",
42002 "description": "The -moz-window-shadow CSS property specifies whether a window will have a shadow. It only works on Mac OS X."
42005 "name": "-webkit-border-before",
42006 "status": "nonstandard",
42007 "syntax": "<'border-width'> || <'border-style'> || <'color'>",
42017 "name": "MDN Reference",
42018 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
42021 "description": "The -webkit-border-before CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet."
42024 "name": "-webkit-border-before-color",
42025 "status": "nonstandard",
42026 "syntax": "<'color'>",
42028 "description": "The -webkit-border-before-color CSS property sets the color of the individual logical block start border in a single place in the style sheet."
42031 "name": "-webkit-border-before-style",
42032 "status": "nonstandard",
42033 "syntax": "<'border-style'>",
42035 "description": "The -webkit-border-before-style CSS property sets the style of the individual logical block start border in a single place in the style sheet."
42038 "name": "-webkit-border-before-width",
42039 "status": "nonstandard",
42040 "syntax": "<'border-width'>",
42042 "description": "The -webkit-border-before-width CSS property sets the width of the individual logical block start border in a single place in the style sheet."
42045 "name": "-webkit-line-clamp",
42046 "syntax": "none | <integer>",
42057 "name": "MDN Reference",
42058 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"
42061 "description": "The -webkit-line-clamp CSS property allows limiting of the contents of a block container to the specified number of lines."
42064 "name": "-webkit-mask",
42065 "status": "nonstandard",
42066 "syntax": "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#",
42068 "description": "The mask CSS property alters the visibility of an element by either partially or fully hiding it. This is accomplished by either masking or clipping the image at specific points."
42071 "name": "-webkit-mask-attachment",
42072 "status": "nonstandard",
42073 "syntax": "<attachment>#",
42081 "name": "MDN Reference",
42082 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"
42085 "description": "If a -webkit-mask-image is specified, -webkit-mask-attachment determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block."
42088 "name": "-webkit-mask-composite",
42089 "status": "nonstandard",
42090 "syntax": "<composite-style>#",
42101 "name": "MDN Reference",
42102 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
42105 "description": "The -webkit-mask-composite property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the -webkit-mask-image property."
42108 "name": "-webkit-mask-position",
42109 "status": "nonstandard",
42110 "syntax": "<position>#",
42112 "description": "The mask-position CSS property sets the initial position, relative to the mask position layer defined by mask-origin, for each defined mask image."
42115 "name": "-webkit-mask-position-x",
42116 "status": "nonstandard",
42117 "syntax": "[ <length-percentage> | left | center | right ]#",
42128 "name": "MDN Reference",
42129 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
42132 "description": "The -webkit-mask-position-x CSS property sets the initial horizontal position of a mask image."
42135 "name": "-webkit-mask-position-y",
42136 "status": "nonstandard",
42137 "syntax": "[ <length-percentage> | top | center | bottom ]#",
42148 "name": "MDN Reference",
42149 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
42152 "description": "The -webkit-mask-position-y CSS property sets the initial vertical position of a mask image."
42155 "name": "-webkit-mask-repeat-x",
42156 "status": "nonstandard",
42157 "syntax": "repeat | no-repeat | space | round",
42167 "name": "MDN Reference",
42168 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
42171 "description": "The -webkit-mask-repeat-x property specifies whether and how a mask image is repeated (tiled) horizontally."
42174 "name": "-webkit-mask-repeat-y",
42175 "status": "nonstandard",
42176 "syntax": "repeat | no-repeat | space | round",
42186 "name": "MDN Reference",
42187 "url": "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
42190 "description": "The -webkit-mask-repeat-y property specifies whether and how a mask image is repeated (tiled) vertically."
42193 "name": "appearance",
42194 "status": "experimental",
42195 "syntax": "none | auto | button | textfield | menulist-button | <compat-auto>",
42206 "name": "MDN Reference",
42207 "url": "https://developer.mozilla.org/docs/Web/CSS/appearance"
42210 "description": "Changes the appearance of buttons and other controls to resemble native controls."
42213 "name": "aspect-ratio",
42214 "status": "experimental",
42215 "syntax": "auto | <ratio>",
42224 "name": "MDN Reference",
42225 "url": "https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"
42228 "description": "The aspect-ratio CSS property sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions."
42232 "status": "obsolete",
42233 "syntax": "<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",
42237 "name": "MDN Reference",
42238 "url": "https://developer.mozilla.org/docs/Web/CSS/azimuth"
42241 "description": "In combination with elevation, the azimuth CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage."
42244 "name": "backdrop-filter",
42245 "syntax": "none | <filter-function-list>",
42256 "name": "MDN Reference",
42257 "url": "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
42260 "description": "The backdrop-filter CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything behind the element, to see the effect you must make the element or its background at least partially transparent."
42263 "name": "border-block",
42264 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
42274 "name": "MDN Reference",
42275 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block"
42278 "description": "The border-block CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet."
42281 "name": "border-block-color",
42282 "syntax": "<'border-top-color'>{1,2}",
42292 "name": "MDN Reference",
42293 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
42296 "description": "The border-block-color CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-color and border-bottom-color, or border-right-color and border-left-color property depending on the values defined for writing-mode, direction, and text-orientation."
42299 "name": "border-block-style",
42300 "syntax": "<'border-top-style'>",
42310 "name": "MDN Reference",
42311 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
42314 "description": "The border-block-style CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-style and border-bottom-style, or border-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and text-orientation."
42317 "name": "border-block-width",
42318 "syntax": "<'border-top-width'>",
42328 "name": "MDN Reference",
42329 "url": "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
42332 "description": "The border-block-width CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-width and border-bottom-width, or border-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation."
42335 "name": "border-end-end-radius",
42336 "syntax": "<length-percentage>{1,2}",
42343 "name": "MDN Reference",
42344 "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
42347 "description": "The border-end-end-radius CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's writing-mode, direction, and text-orientation."
42350 "name": "border-end-start-radius",
42351 "syntax": "<length-percentage>{1,2}",
42358 "name": "MDN Reference",
42359 "url": "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
42362 "description": "The border-end-start-radius CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation."
42365 "name": "border-inline",
42366 "syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
42376 "name": "MDN Reference",
42377 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline"
42380 "description": "The border-inline CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet."
42383 "name": "border-inline-color",
42384 "syntax": "<'border-top-color'>{1,2}",
42394 "name": "MDN Reference",
42395 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
42398 "description": "The border-inline-color CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-color and border-bottom-color, or border-right-color and border-left-color property depending on the values defined for writing-mode, direction, and text-orientation."
42401 "name": "border-inline-style",
42402 "syntax": "<'border-top-style'>",
42412 "name": "MDN Reference",
42413 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
42416 "description": "The border-inline-style CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-style and border-bottom-style, or border-left-style and border-right-style properties depending on the values defined for writing-mode, direction, and text-orientation."
42419 "name": "border-inline-width",
42420 "syntax": "<'border-top-width'>",
42430 "name": "MDN Reference",
42431 "url": "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
42434 "description": "The border-inline-width CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the border-top-width and border-bottom-width, or border-left-width, and border-right-width property depending on the values defined for writing-mode, direction, and text-orientation."
42437 "name": "border-start-end-radius",
42438 "syntax": "<length-percentage>{1,2}",
42445 "name": "MDN Reference",
42446 "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
42449 "description": "The border-start-end-radius CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation."
42452 "name": "border-start-start-radius",
42453 "syntax": "<length-percentage>{1,2}",
42460 "name": "MDN Reference",
42461 "url": "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
42464 "description": "The border-start-start-radius CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's writing-mode, direction, and text-orientation."
42467 "name": "box-align",
42468 "status": "nonstandard",
42469 "syntax": "start | center | end | baseline | stretch",
42480 "name": "MDN Reference",
42481 "url": "https://developer.mozilla.org/docs/Web/CSS/box-align"
42484 "description": "The box-align CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box."
42487 "name": "box-direction",
42488 "status": "nonstandard",
42489 "syntax": "normal | reverse | inherit",
42500 "name": "MDN Reference",
42501 "url": "https://developer.mozilla.org/docs/Web/CSS/box-direction"
42504 "description": "The box-direction CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge)."
42507 "name": "box-flex",
42508 "status": "nonstandard",
42509 "syntax": "<number>",
42520 "name": "MDN Reference",
42521 "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex"
42524 "description": "The -moz-box-flex and -webkit-box-flex CSS properties specify how a -moz-box or -webkit-box grows to fill the box that contains it, in the direction of the containing box's layout."
42527 "name": "box-flex-group",
42528 "status": "nonstandard",
42529 "syntax": "<integer>",
42538 "name": "MDN Reference",
42539 "url": "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
42542 "description": "The box-flex-group CSS property assigns the flexbox's child elements to a flex group."
42545 "name": "box-lines",
42546 "status": "nonstandard",
42547 "syntax": "single | multiple",
42556 "name": "MDN Reference",
42557 "url": "https://developer.mozilla.org/docs/Web/CSS/box-lines"
42560 "description": "The box-lines CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes)."
42563 "name": "box-ordinal-group",
42564 "status": "nonstandard",
42565 "syntax": "<integer>",
42576 "name": "MDN Reference",
42577 "url": "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
42580 "description": "The box-ordinal-group CSS property assigns the flexbox's child elements to an ordinal group."
42583 "name": "box-orient",
42584 "status": "nonstandard",
42585 "syntax": "horizontal | vertical | inline-axis | block-axis | inherit",
42596 "name": "MDN Reference",
42597 "url": "https://developer.mozilla.org/docs/Web/CSS/box-orient"
42600 "description": "The box-orient CSS property specifies whether an element lays out its contents horizontally or vertically."
42603 "name": "box-pack",
42604 "status": "nonstandard",
42605 "syntax": "start | center | end | justify",
42616 "name": "MDN Reference",
42617 "url": "https://developer.mozilla.org/docs/Web/CSS/box-pack"
42620 "description": "The -moz-box-pack and -webkit-box-pack CSS properties specify how a -moz-box or -webkit-box packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box."
42623 "name": "color-adjust",
42624 "syntax": "economy | exact",
42635 "name": "MDN Reference",
42636 "url": "https://developer.mozilla.org/docs/Web/CSS/color-adjust"
42639 "description": "The color-adjust property is a non-standard CSS extension that can be used to force printing of background colors and images in browsers based on the WebKit engine."
42642 "name": "counter-set",
42643 "syntax": "[ <custom-ident> <integer>? ]+ | none",
42650 "name": "MDN Reference",
42651 "url": "https://developer.mozilla.org/docs/Web/CSS/counter-set"
42654 "description": "The counter-set CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element."
42657 "name": "font-optical-sizing",
42658 "syntax": "auto | none",
42669 "name": "MDN Reference",
42670 "url": "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
42673 "description": "The font-optical-sizing CSS property allows developers to control whether browsers render text with slightly differing visual representations to optimize viewing at different sizes, or not. This only works for fonts that have an optical size variation axis."
42676 "name": "font-variation-settings",
42677 "syntax": "normal | [ <string> <number> ]#",
42688 "name": "MDN Reference",
42689 "url": "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
42692 "description": "The font-variation-settings CSS property provides low-level control over OpenType or TrueType font variations, by specifying the four letter axis names of the features you want to vary, along with their variation values."
42695 "name": "font-smooth",
42696 "status": "nonstandard",
42697 "syntax": "auto | never | always | <absolute-size> | <length>",
42708 "name": "MDN Reference",
42709 "url": "https://developer.mozilla.org/docs/Web/CSS/font-smooth"
42716 "syntax": "<'row-gap'> <'column-gap'>?",
42725 "description": "The gap CSS property is a shorthand property for row-gap and column-gap specifying the gutters between grid rows and columns."
42728 "name": "hanging-punctuation",
42729 "syntax": "none | [ first || [ force-end | allow-end ] || last ]",
42736 "name": "MDN Reference",
42737 "url": "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
42740 "description": "The hanging-punctuation CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box."
42743 "name": "image-resolution",
42744 "status": "experimental",
42745 "syntax": "[ from-image || <resolution> ] && snap?",
42747 "description": "The image-resolution property specifies the intrinsic resolution of all raster images used in or on the element. It affects both content images (e.g. replaced elements and generated content) and decorative images (such as background-image). The intrinsic resolution of an image is used to determine the image’s intrinsic dimensions."
42750 "name": "initial-letter",
42751 "status": "experimental",
42752 "syntax": "normal | [ <number> <integer>? ]",
42759 "name": "MDN Reference",
42760 "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
42763 "description": "The initial-letter CSS property specifies styling for dropped, raised, and sunken initial letters."
42766 "name": "initial-letter-align",
42767 "status": "experimental",
42768 "syntax": "[ auto | alphabetic | hanging | ideographic ]",
42772 "name": "MDN Reference",
42773 "url": "https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"
42776 "description": "The initial-letter-align CSS property specifies the alignment of initial letters within a paragraph."
42780 "syntax": "<'top'>{1,4}",
42787 "name": "MDN Reference",
42788 "url": "https://developer.mozilla.org/docs/Web/CSS/inset"
42791 "description": "The inset CSS property defines the logical block and inline start and end offsets of an element, which map to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
42794 "name": "inset-block",
42795 "syntax": "<'top'>{1,2}",
42805 "name": "MDN Reference",
42806 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block"
42809 "description": "The inset-block CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
42812 "name": "inset-block-end",
42813 "syntax": "<'top'>",
42823 "name": "MDN Reference",
42824 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
42827 "description": "The inset-block-end CSS property defines the logical block end offset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
42830 "name": "inset-block-start",
42831 "syntax": "<'top'>",
42841 "name": "MDN Reference",
42842 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
42845 "description": "The inset-block-start CSS property defines the logical block start offset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
42848 "name": "inset-inline",
42849 "syntax": "<'top'>{1,2}",
42859 "name": "MDN Reference",
42860 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
42863 "description": "The inset-inline CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the top and bottom, or right and left properties depending on the values defined for writing-mode, direction, and text-orientation."
42866 "name": "inset-inline-end",
42867 "syntax": "<'top'>",
42877 "name": "MDN Reference",
42878 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
42881 "description": "The inset-inline-end CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
42884 "name": "inset-inline-start",
42885 "syntax": "<'top'>",
42895 "name": "MDN Reference",
42896 "url": "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
42899 "description": "The inset-inline-start CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the top, right, bottom, or left property depending on the values defined for writing-mode, direction, and text-orientation."
42902 "name": "line-clamp",
42903 "status": "experimental",
42904 "syntax": "none | <integer>",
42906 "description": "The line-clamp property allows limiting the contents of a block container to the specified number of lines; remaining content is fragmented away and neither rendered nor measured. Optionally, it also allows inserting content into the last line box to indicate the continuity of truncated/interrupted content."
42909 "name": "line-height-step",
42910 "status": "experimental",
42911 "syntax": "<length>",
42920 "name": "MDN Reference",
42921 "url": "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
42924 "description": "The line-height-step CSS property defines the step units for line box heights. When the step unit is positive, line box heights are rounded up to the closest multiple of the unit. Negative values are invalid."
42927 "name": "margin-block",
42928 "syntax": "<'margin-left'>{1,2}",
42938 "name": "MDN Reference",
42939 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-block"
42942 "description": "The margin-block CSS property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation."
42945 "name": "margin-inline",
42946 "syntax": "<'margin-left'>{1,2}",
42956 "name": "MDN Reference",
42957 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
42960 "description": "The margin-inline CSS property defines the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation."
42963 "name": "margin-trim",
42964 "status": "experimental",
42965 "syntax": "none | in-flow | all",
42969 "name": "MDN Reference",
42970 "url": "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
42973 "description": "The margin-trim property allows the container to trim the margins of its children where they adjoin the container’s edges."
42977 "syntax": "<mask-layer>#",
42988 "name": "MDN Reference",
42989 "url": "https://developer.mozilla.org/docs/Web/CSS/mask"
42992 "description": "The mask CSS property alters the visibility of an element by either partially or fully hiding it. This is accomplished by either masking or clipping the image at specific points."
42995 "name": "mask-border",
42996 "syntax": "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
42998 "description": "The mask-border CSS property lets you create a mask along the edge of an element's border.\n\nThis property is a shorthand for mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, mask-border-repeat, and mask-border-mode. As with all shorthand properties, any omitted sub-values will be set to their initial value."
43001 "name": "mask-border-mode",
43002 "syntax": "luminance | alpha",
43004 "description": "The mask-border-mode CSS property specifies the blending mode used in a mask border."
43007 "name": "mask-border-outset",
43008 "syntax": "[ <length> | <number> ]{1,4}",
43010 "description": "The mask-border-outset CSS property specifies the distance by which an element's mask border is set out from its border box."
43013 "name": "mask-border-repeat",
43014 "syntax": "[ stretch | repeat | round | space ]{1,2}",
43016 "description": "The mask-border-repeat CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border."
43019 "name": "mask-border-slice",
43020 "syntax": "<number-percentage>{1,4} fill?",
43022 "description": "The mask-border-slice CSS property divides the image specified by mask-border-source into regions. These regions are used to form the components of an element's mask border."
43025 "name": "mask-border-source",
43026 "syntax": "none | <image>",
43028 "description": "The mask-border-source CSS property specifies the source image used to create an element's mask border.\n\nThe mask-border-slice property is used to divide the source image into regions, which are then dynamically applied to the final mask border."
43031 "name": "mask-border-width",
43032 "syntax": "[ <length-percentage> | <number> | auto ]{1,4}",
43034 "description": "The mask-border-width CSS property specifies the width of an element's mask border."
43037 "name": "mask-clip",
43038 "syntax": "[ <geometry-box> | no-clip ]#",
43049 "name": "MDN Reference",
43050 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
43053 "description": "The mask-clip CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area."
43056 "name": "mask-composite",
43057 "syntax": "<compositing-operator>#",
43065 "name": "MDN Reference",
43066 "url": "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
43069 "description": "The mask-composite CSS property represents a compositing operation used on the current mask layer with the mask layers below it."
43072 "name": "max-lines",
43073 "status": "experimental",
43074 "syntax": "none | <integer>",
43076 "description": "The max-liens property forces a break after a set number of lines"
43080 "syntax": "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
43090 "name": "MDN Reference",
43091 "url": "https://developer.mozilla.org/docs/Web/CSS/offset"
43094 "description": "The offset CSS property is a shorthand property for animating an element along a defined path."
43097 "name": "offset-anchor",
43098 "syntax": "auto | <position>",
43107 "name": "MDN Reference",
43108 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-anchor"
43111 "description": "Defines an anchor point of the box positioned along the path. The anchor point specifies the point of the box which is to be considered as the point that is moved along the path."
43114 "name": "offset-distance",
43115 "syntax": "<length-percentage>",
43125 "name": "MDN Reference",
43126 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
43129 "description": "The offset-distance CSS property specifies a position along an offset-path."
43132 "name": "offset-path",
43133 "syntax": "none | ray( [ <angle> && <size>? && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
43143 "name": "MDN Reference",
43144 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-path"
43147 "description": "The offset-path CSS property specifies the offset path where the element gets positioned. The exact element’s position on the offset path is determined by the offset-distance property. An offset path is either a specified path with one or multiple sub-paths or the geometry of a not-styled basic shape. Each shape or path must define an initial position for the computed value of \"0\" for offset-distance and an initial direction which specifies the rotation of the object to the initial position.\n\nIn this specification, a direction (or rotation) of 0 degrees is equivalent to the direction of the positive x-axis in the object’s local coordinate system. In other words, a rotation of 0 degree points to the right side of the UA if the object and its ancestors have no transformation applied."
43150 "name": "offset-position",
43151 "status": "experimental",
43152 "syntax": "auto | <position>",
43156 "name": "MDN Reference",
43157 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-position"
43160 "description": "Specifies the initial position of the offset path. If position is specified with static, offset-position would be ignored."
43163 "name": "offset-rotate",
43164 "syntax": "[ auto | reverse ] || <angle>",
43174 "name": "MDN Reference",
43175 "url": "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
43178 "description": "The offset-rotate CSS property defines the direction of the element while positioning along the offset path."
43181 "name": "overflow-anchor",
43182 "syntax": "auto | none",
43192 "name": "MDN Reference",
43193 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-anchor"
43196 "description": "The overflow-anchor CSS property provides a way to opt out browser scroll anchoring behavior which adjusts scroll position to minimize content shifts."
43199 "name": "overflow-block",
43200 "syntax": "visible | hidden | clip | scroll | auto",
43207 "name": "MDN Reference",
43208 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-block"
43211 "description": "The overflow-block CSS media feature can be used to test how the output device handles content that overflows the initial containing block along the block axis."
43214 "name": "overflow-clip-box",
43215 "status": "nonstandard",
43216 "syntax": "padding-box | content-box",
43223 "name": "MDN Reference",
43224 "url": "https://developer.mozilla.org/docs/Mozilla/Gecko/Chrome/CSS/overflow-clip-box"
43227 "description": "The overflow-clip-box CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the overflow-clip-box-inline and overflow-clip-box-block properties."
43230 "name": "overflow-inline",
43231 "syntax": "visible | hidden | clip | scroll | auto",
43238 "name": "MDN Reference",
43239 "url": "https://developer.mozilla.org/docs/Web/CSS/overflow-inline"
43242 "description": "The overflow-inline CSS media feature can be used to test how the output device handles content that overflows the initial containing block along the inline axis."
43245 "name": "overscroll-behavior",
43246 "syntax": "[ contain | none | auto ]{1,2}",
43256 "name": "MDN Reference",
43257 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
43260 "description": "The overscroll-behavior CSS property is shorthand for the overscroll-behavior-x and overscroll-behavior-y properties, which allow you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached."
43263 "name": "overscroll-behavior-block",
43264 "syntax": "contain | none | auto",
43274 "name": "MDN Reference",
43275 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
43278 "description": "The overscroll-behavior-block CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached."
43281 "name": "overscroll-behavior-inline",
43282 "syntax": "contain | none | auto",
43292 "name": "MDN Reference",
43293 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
43296 "description": "The overscroll-behavior-inline CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached."
43299 "name": "overscroll-behavior-x",
43300 "syntax": "contain | none | auto",
43310 "name": "MDN Reference",
43311 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
43314 "description": "The overscroll-behavior-x CSS property is allows you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached — in the x axis direction."
43317 "name": "overscroll-behavior-y",
43318 "syntax": "contain | none | auto",
43328 "name": "MDN Reference",
43329 "url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
43332 "description": "The overscroll-behavior-y CSS property is allows you to control the browser's scroll overflow behavior — what happens when the boundary of a scrolling area is reached — in the y axis direction."
43335 "name": "padding-block",
43336 "syntax": "<'padding-left'>{1,2}",
43346 "name": "MDN Reference",
43347 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-block"
43350 "description": "The padding-block CSS property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation."
43353 "name": "padding-inline",
43354 "syntax": "<'padding-left'>{1,2}",
43364 "name": "MDN Reference",
43365 "url": "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
43368 "description": "The padding-inline CSS property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation."
43371 "name": "place-content",
43372 "syntax": "<'align-content'> <'justify-content'>?",
43381 "description": "The place-content CSS shorthand property sets both the align-content and justify-content properties."
43384 "name": "place-items",
43385 "syntax": "<'align-items'> <'justify-items'>?",
43394 "description": "The CSS place-items shorthand property sets both the align-items and justify-items properties. The first value is the align-items property value, the second the justify-items one. If the second value is not present, the first value is also used for it."
43397 "name": "place-self",
43398 "syntax": "<'align-self'> <'justify-self'>?",
43406 "description": "The place-self CSS property is a shorthand property sets both the align-self and justify-self properties. The first value is the align-self property value, the second the justify-self one. If the second value is not present, the first value is also used for it."
43410 "syntax": "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
43417 "name": "MDN Reference",
43418 "url": "https://developer.mozilla.org/docs/Web/CSS/rotate"
43421 "description": "The rotate CSS property allows you to specify rotation transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
43425 "syntax": "normal | <length-percentage>",
43434 "description": "The row-gap CSS property specifies the gutter between grid rows."
43437 "name": "ruby-merge",
43438 "status": "experimental",
43439 "syntax": "separate | collapse | auto",
43441 "description": "This property controls how ruby annotation boxes should be rendered when there are more than one in a ruby container box: whether each pair should be kept separate, the annotations should be collapsed and rendered as a group, or the separation should be determined based on the space available."
43445 "syntax": "none | <number>{1,3}",
43452 "name": "MDN Reference",
43453 "url": "https://developer.mozilla.org/docs/Web/CSS/scale"
43456 "description": "The scale CSS property allows you to specify scale transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
43459 "name": "scrollbar-color",
43460 "syntax": "auto | dark | light | <color>{2}",
43467 "name": "MDN Reference",
43468 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
43471 "description": "The scrollbar-color CSS property sets the color of the scrollbar track and thumb."
43474 "name": "scrollbar-width",
43475 "syntax": "auto | thin | none",
43482 "name": "MDN Reference",
43483 "url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
43486 "description": "The scrollbar-width property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. "
43489 "name": "scroll-margin",
43490 "syntax": "<length>{1,4}",
43501 "name": "MDN Reference",
43502 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
43505 "description": "The scroll-margin property is a shorthand property which sets all of the scroll-margin longhands, assigning values much like the margin property does for the margin-* longhands."
43508 "name": "scroll-margin-block",
43509 "syntax": "<length>{1,2}",
43519 "name": "MDN Reference",
43520 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
43523 "description": "The scroll-margin-block property is a shorthand property which sets the scroll-margin longhands in the block dimension."
43526 "name": "scroll-margin-block-start",
43527 "syntax": "<length>",
43537 "name": "MDN Reference",
43538 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
43541 "description": "The scroll-margin-block-start property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
43544 "name": "scroll-margin-block-end",
43545 "syntax": "<length>",
43555 "name": "MDN Reference",
43556 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
43559 "description": "The scroll-margin-block-end property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
43562 "name": "scroll-margin-bottom",
43563 "syntax": "<length>",
43574 "name": "MDN Reference",
43575 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
43578 "description": "The scroll-margin-bottom property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
43581 "name": "scroll-margin-inline",
43582 "syntax": "<length>{1,2}",
43589 "name": "MDN Reference",
43590 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
43593 "description": "The scroll-margin-inline property is a shorthand property which sets the scroll-margin longhands in the inline dimension."
43596 "name": "scroll-margin-inline-start",
43597 "syntax": "<length>",
43607 "name": "MDN Reference",
43608 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
43611 "description": "The scroll-margin-inline-start property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
43614 "name": "scroll-margin-inline-end",
43615 "syntax": "<length>",
43625 "name": "MDN Reference",
43626 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
43629 "description": "The scroll-margin-inline-end property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
43632 "name": "scroll-margin-left",
43633 "syntax": "<length>",
43644 "name": "MDN Reference",
43645 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
43648 "description": "The scroll-margin-left property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
43651 "name": "scroll-margin-right",
43652 "syntax": "<length>",
43663 "name": "MDN Reference",
43664 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
43667 "description": "The scroll-margin-right property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
43670 "name": "scroll-margin-top",
43671 "syntax": "<length>",
43682 "name": "MDN Reference",
43683 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
43686 "description": "The scroll-margin-top property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets."
43689 "name": "scroll-padding",
43690 "syntax": "[ auto | <length-percentage> ]{1,4}",
43701 "name": "MDN Reference",
43702 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
43705 "description": "The scroll-padding property is a shorthand property which sets all of the scroll-padding longhands, assigning values much like the padding property does for the padding-* longhands."
43708 "name": "scroll-padding-block",
43709 "syntax": "[ auto | <length-percentage> ]{1,2}",
43719 "name": "MDN Reference",
43720 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
43723 "description": "The scroll-padding-block property is a shorthand property which sets the scroll-padding longhands for the block dimension."
43726 "name": "scroll-padding-block-start",
43727 "syntax": "auto | <length-percentage>",
43737 "name": "MDN Reference",
43738 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
43741 "description": "The scroll-padding-block-start property defines offsets for the start edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
43744 "name": "scroll-padding-block-end",
43745 "syntax": "auto | <length-percentage>",
43755 "name": "MDN Reference",
43756 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
43759 "description": "The scroll-padding-block-end property defines offsets for the end edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
43762 "name": "scroll-padding-bottom",
43763 "syntax": "auto | <length-percentage>",
43774 "name": "MDN Reference",
43775 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
43778 "description": "The scroll-padding-bottom property defines offsets for the bottom of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
43781 "name": "scroll-padding-inline",
43782 "syntax": "[ auto | <length-percentage> ]{1,2}",
43792 "name": "MDN Reference",
43793 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
43796 "description": "The scroll-padding-inline property is a shorthand property which sets the scroll-padding longhands for the inline dimension."
43799 "name": "scroll-padding-inline-start",
43800 "syntax": "auto | <length-percentage>",
43810 "name": "MDN Reference",
43811 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
43814 "description": "The scroll-padding-inline-start property defines offsets for the start edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
43817 "name": "scroll-padding-inline-end",
43818 "syntax": "auto | <length-percentage>",
43828 "name": "MDN Reference",
43829 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
43832 "description": "The scroll-padding-inline-end property defines offsets for the end edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
43835 "name": "scroll-padding-left",
43836 "syntax": "auto | <length-percentage>",
43847 "name": "MDN Reference",
43848 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
43851 "description": "The scroll-padding-left property defines offsets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
43854 "name": "scroll-padding-right",
43855 "syntax": "auto | <length-percentage>",
43866 "name": "MDN Reference",
43867 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
43870 "description": "The scroll-padding-right property defines offsets for the right of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
43873 "name": "scroll-padding-top",
43874 "syntax": "auto | <length-percentage>",
43885 "name": "MDN Reference",
43886 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
43889 "description": "The scroll-padding-top property defines offsets for the top of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport."
43892 "name": "scroll-snap-align",
43893 "syntax": "[ none | start | end | center ]{1,2}",
43904 "name": "MDN Reference",
43905 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
43908 "description": "The scroll-snap-align property specifies the box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value."
43911 "name": "scroll-snap-stop",
43912 "syntax": "normal | always",
43921 "name": "MDN Reference",
43922 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
43925 "description": "The scroll-snap-stop CSS property defines whether the scroll container is allowed to \"pass over\" possible snap positions."
43928 "name": "scroll-snap-type-x",
43929 "status": "obsolete",
43930 "syntax": "none | mandatory | proximity",
43938 "name": "MDN Reference",
43939 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"
43942 "description": "The scroll-snap-type-x CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one.\n\nSpecifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent."
43945 "name": "scroll-snap-type-y",
43946 "status": "obsolete",
43947 "syntax": "none | mandatory | proximity",
43954 "name": "MDN Reference",
43955 "url": "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"
43958 "description": "The scroll-snap-type-y CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one.\n\nSpecifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent."
43961 "name": "text-combine-upright",
43962 "syntax": "none | all | [ digits <integer>? ]",
43966 "name": "MDN Reference",
43967 "url": "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
43970 "description": "The text-combine-upright CSS property specifies the combination of multiple characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes.\n\nThis is used to produce an effect that is known as tate-chū-yoko (縦中横) in Japanese, or as 直書橫向 in Chinese."
43973 "name": "text-decoration-skip",
43974 "status": "experimental",
43975 "syntax": "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
43984 "name": "MDN Reference",
43985 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
43988 "description": "The text-decoration-skip CSS property specifies what parts of the element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors."
43991 "name": "text-decoration-skip-ink",
43992 "syntax": "auto | all | none",
44002 "name": "MDN Reference",
44003 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
44006 "description": "The text-decoration-skip-ink CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders."
44009 "name": "text-decoration-thickness",
44010 "syntax": "auto | from-font | <length> | <percentage> ",
44018 "name": "MDN Reference",
44019 "url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
44022 "description": "The text-decoration-thickness CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline."
44025 "name": "text-emphasis",
44026 "syntax": "<'text-emphasis-style'> || <'text-emphasis-color'>",
44037 "name": "MDN Reference",
44038 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
44041 "description": "The text-emphasis CSS property is a shorthand property for setting text-emphasis-style and text-emphasis-color in one declaration. This property will apply the specified emphasis mark to each character of the element's text, except separator characters, like spaces, and control characters."
44044 "name": "text-emphasis-color",
44045 "syntax": "<color>",
44056 "name": "MDN Reference",
44057 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
44060 "description": "The text-emphasis-color CSS property defines the color used to draw emphasis marks on text being rendered in the HTML document. This value can also be set and reset using the text-emphasis shorthand."
44063 "name": "text-emphasis-position",
44064 "syntax": "[ over | under ] && [ right | left ]",
44075 "name": "MDN Reference",
44076 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
44079 "description": "The text-emphasis-position CSS property describes where emphasis marks are drawn at. The effect of emphasis marks on the line height is the same as for ruby text: if there isn't enough place, the line height is increased."
44082 "name": "text-emphasis-style",
44083 "syntax": "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
44094 "name": "MDN Reference",
44095 "url": "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
44098 "description": "The text-emphasis-style CSS property defines the type of emphasis used. It can also be set, and reset, using the text-emphasis shorthand."
44101 "name": "text-size-adjust",
44102 "status": "experimental",
44103 "syntax": "none | auto | <percentage>",
44112 "name": "MDN Reference",
44113 "url": "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
44116 "description": "The text-size-adjust CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property."
44119 "name": "text-underline-offset",
44120 "syntax": "auto | <length> | <percentage> ",
44128 "name": "MDN Reference",
44129 "url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
44132 "description": "The text-underline-offset CSS property sets the offset distance of an underline text decoration line (applied using text-decoration) from its original position."
44135 "name": "transform-box",
44136 "syntax": "content-box | border-box | fill-box | stroke-box | view-box",
44147 "name": "MDN Reference",
44148 "url": "https://developer.mozilla.org/docs/Web/CSS/transform-box"
44151 "description": "The transform-box CSS property defines the layout box to which the transform and transform-origin properties relate."
44154 "name": "translate",
44155 "syntax": "none | <length-percentage> [ <length-percentage> <length>? ]?",
44162 "name": "MDN Reference",
44163 "url": "https://developer.mozilla.org/docs/Web/CSS/translate"
44166 "description": "The translate CSS property allows you to specify translation transforms individually and independently of the transform property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value."
44169 "name": "speak-as",
44170 "syntax": "auto | bullets | numbers | words | spell-out | <counter-style-name>",
44172 "description": "The speak-as descriptor specifies how a counter symbol constructed with a given @counter-style will be represented in the spoken form. For example, an author can specify a counter symbol to be either spoken as its numerical value or just represented with an audio cue."
44175 "name": "font-display",
44176 "status": "experimental",
44177 "syntax": "[ auto | block | swap | fallback | optional ]",
44179 "description": "The font-display descriptor determines how a font face is displayed based on whether and when it is downloaded and ready to use."
44183 "syntax": "auto | <length>",
44185 "description": "The bleed CSS at-rule descriptor, used with the @page at-rule, specifies the extent of the page bleed area outside the page box. This property only has effect if crop marks are enabled using the marks property."
44189 "syntax": "none | [ crop || cross ]",
44191 "description": "The marks CSS at-rule descriptor, used with the @page at-rule, adds crop and/or cross marks to the presentation of the document. Crop marks indicate where the page should be cut. Cross marks are used to align sheets."
44194 "name": "max-zoom",
44195 "syntax": "auto | <number> | <percentage>",
44197 "description": "The max-zoom CSS descriptor sets the maximum zoom factor of a document defined by the @viewport at-rule. The browser will not zoom in any further than this, whether automatically or at the user's request.\n\nA zoom factor of 1.0 or 100% corresponds to no zooming. Larger values are zoomed in. Smaller values are zoomed out."
44200 "name": "min-zoom",
44201 "syntax": "auto | <number> | <percentage>",
44203 "description": "The min-zoom CSS descriptor sets the minimum zoom factor of a document defined by the @viewport at-rule. The browser will not zoom out any further than this, whether automatically or at the user's request.\n\nA zoom factor of 1.0 or 100% corresponds to no zooming. Larger values are zoomed in. Smaller values are zoomed out."
44206 "name": "orientation",
44207 "syntax": "auto | portrait | landscape",
44209 "description": "The orientation CSS @media media feature can be used to apply styles based on the orientation of the viewport (or the page box, for paged media)."
44212 "name": "user-zoom",
44213 "syntax": "zoom | fixed",
44215 "description": "The user-zoom CSS descriptor controls whether or not the user can change the zoom factor of a document defined by @viewport."
44218 "name": "viewport-fit",
44219 "syntax": "auto | contain | cover",
44221 "description": "The border-block-style CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation."
44226 "name": "@charset",
44229 "name": "MDN Reference",
44230 "url": "https://developer.mozilla.org/docs/Web/CSS/@charset"
44233 "description": "Defines character set of the document."
44236 "name": "@counter-style",
44242 "name": "MDN Reference",
44243 "url": "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
44246 "description": "Defines a custom counter style."
44249 "name": "@font-face",
44252 "name": "MDN Reference",
44253 "url": "https://developer.mozilla.org/docs/Web/CSS/@font-face"
44256 "description": "Allows for linking to fonts that are automatically activated when needed. This permits authors to work around the limitation of 'web-safe' fonts, allowing for consistent rendering independent of the fonts available in a given user's environment."
44259 "name": "@font-feature-values",
44266 "name": "MDN Reference",
44267 "url": "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
44270 "description": "Defines named values for the indices used to select alternate glyphs for a given font family."
44276 "name": "MDN Reference",
44277 "url": "https://developer.mozilla.org/docs/Web/CSS/@import"
44280 "description": "Includes content of another file."
44283 "name": "@keyframes",
44286 "name": "MDN Reference",
44287 "url": "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
44290 "description": "Defines set of animation key frames."
44296 "name": "MDN Reference",
44297 "url": "https://developer.mozilla.org/docs/Web/CSS/@media"
44300 "description": "Defines a stylesheet for a particular media type."
44303 "name": "@-moz-document",
44307 "description": "Gecko-specific at-rule that restricts the style rules contained within it based on the URL of the document."
44310 "name": "@-moz-keyframes",
44314 "description": "Defines set of animation key frames."
44317 "name": "@-ms-viewport",
44322 "description": "Specifies the size, zoom factor, and orientation of the viewport."
44325 "name": "@namespace",
44328 "name": "MDN Reference",
44329 "url": "https://developer.mozilla.org/docs/Web/CSS/@namespace"
44332 "description": "Declares a prefix and associates it with a namespace name."
44335 "name": "@-o-keyframes",
44339 "description": "Defines set of animation key frames."
44342 "name": "@-o-viewport",
44346 "description": "Specifies the size, zoom factor, and orientation of the viewport."
44359 "name": "MDN Reference",
44360 "url": "https://developer.mozilla.org/docs/Web/CSS/@page"
44363 "description": "Directive defines various page parameters."
44366 "name": "@supports",
44376 "name": "MDN Reference",
44377 "url": "https://developer.mozilla.org/docs/Web/CSS/@supports"
44380 "description": "A conditional group rule whose condition tests whether the user agent supports CSS property:value pairs."
44383 "name": "@-webkit-keyframes",
44388 "description": "Defines set of animation key frames."
44396 "name": "MDN Reference",
44397 "url": "https://developer.mozilla.org/docs/Web/CSS/:active"
44400 "description": "Applies while an element is being activated by the user. For example, between the times the user presses the mouse button and releases it."
44403 "name": ":any-link",
44413 "name": "MDN Reference",
44414 "url": "https://developer.mozilla.org/docs/Web/CSS/:any-link"
44417 "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
44420 "name": ":checked",
44423 "name": "MDN Reference",
44424 "url": "https://developer.mozilla.org/docs/Web/CSS/:checked"
44427 "description": "Radio and checkbox elements can be toggled by the user. Some menu items are 'checked' when the user selects them. When such elements are toggled 'on' the :checked pseudo-class applies."
44430 "name": ":corner-present",
44435 "description": "Non-standard. Indicates whether or not a scrollbar corner is present."
44438 "name": ":decrement",
44443 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will decrement the view’s position when used."
44446 "name": ":default",
44456 "name": "MDN Reference",
44457 "url": "https://developer.mozilla.org/docs/Web/CSS/:default"
44460 "description": "Applies to the one or more UI elements that are the default among a set of similar elements. Typically applies to context menu items, buttons, and select lists/menus."
44463 "name": ":disabled",
44466 "name": "MDN Reference",
44467 "url": "https://developer.mozilla.org/docs/Web/CSS/:disabled"
44470 "description": "Represents user interface elements that are in a disabled state; such elements have a corresponding enabled state."
44473 "name": ":double-button",
44478 "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed together at the same end of the scrollbar."
44484 "name": "MDN Reference",
44485 "url": "https://developer.mozilla.org/docs/Web/CSS/:empty"
44488 "description": "Represents an element that has no children at all."
44491 "name": ":enabled",
44494 "name": "MDN Reference",
44495 "url": "https://developer.mozilla.org/docs/Web/CSS/:enabled"
44498 "description": "Represents user interface elements that are in an enabled state; such elements have a corresponding disabled state."
44506 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed after the thumb."
44519 "name": "MDN Reference",
44520 "url": "https://developer.mozilla.org/docs/Web/CSS/:first"
44523 "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."
44526 "name": ":first-child",
44529 "name": "MDN Reference",
44530 "url": "https://developer.mozilla.org/docs/Web/CSS/:first-child"
44533 "description": "Same as :nth-child(1). Represents an element that is the first child of some other element."
44536 "name": ":first-of-type",
44539 "name": "MDN Reference",
44540 "url": "https://developer.mozilla.org/docs/Web/CSS/:first-of-type"
44543 "description": "Same as :nth-of-type(1). Represents an element that is the first sibling of its type in the list of children of its parent element."
44549 "name": "MDN Reference",
44550 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus"
44553 "description": "Applies while an element has the focus (accepts keyboard or mouse events, or other forms of input)."
44556 "name": ":fullscreen",
44559 "name": "MDN Reference",
44560 "url": "https://developer.mozilla.org/docs/Web/CSS/:fullscreen"
44563 "description": "Matches any element that has its fullscreen flag set."
44572 "description": "Represents any element that is defined to occur entirely after a :current element."
44575 "name": ":horizontal",
44580 "description": "Non-standard. Applies to any scrollbar pieces that have a horizontal orientation."
44593 "name": "MDN Reference",
44594 "url": "https://developer.mozilla.org/docs/Web/CSS/:host"
44597 "description": "When evaluated in the context of a shadow tree, matches the shadow tree’s host element."
44605 "description": "When evaluated in the context of a shadow tree, it matches the shadow tree’s host element if the host element, in its normal context, matches the selector argument."
44608 "name": ":host-context()",
44613 "description": "Tests whether there is an ancestor, outside the shadow tree, which matches a particular selector."
44619 "name": "MDN Reference",
44620 "url": "https://developer.mozilla.org/docs/Web/CSS/:hover"
44623 "description": "Applies while the user designates an element with a pointing device, but does not necessarily activate it. For example, a visual user agent could apply this pseudo-class when the cursor (mouse pointer) hovers over a box generated by the element."
44626 "name": ":increment",
44631 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether or not the button or track piece will increment the view’s position when used."
44634 "name": ":indeterminate",
44637 "name": "MDN Reference",
44638 "url": "https://developer.mozilla.org/docs/Web/CSS/:indeterminate"
44641 "description": "Applies to UI elements whose value is in an indeterminate state."
44644 "name": ":in-range",
44654 "name": "MDN Reference",
44655 "url": "https://developer.mozilla.org/docs/Web/CSS/:in-range"
44658 "description": "Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes."
44661 "name": ":invalid",
44664 "name": "MDN Reference",
44665 "url": "https://developer.mozilla.org/docs/Web/CSS/:invalid"
44668 "description": "An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification."
44680 "description": "Represents an element that is in language specified."
44683 "name": ":last-child",
44686 "name": "MDN Reference",
44687 "url": "https://developer.mozilla.org/docs/Web/CSS/:last-child"
44690 "description": "Same as :nth-last-child(1). Represents an element that is the last child of some other element."
44693 "name": ":last-of-type",
44696 "name": "MDN Reference",
44697 "url": "https://developer.mozilla.org/docs/Web/CSS/:last-of-type"
44700 "description": "Same as :nth-last-of-type(1). Represents an element that is the last sibling of its type in the list of children of its parent element."
44713 "name": "MDN Reference",
44714 "url": "https://developer.mozilla.org/docs/Web/CSS/:left"
44717 "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."
44723 "name": "MDN Reference",
44724 "url": "https://developer.mozilla.org/docs/Web/CSS/:link"
44727 "description": "Applies to links that have not yet been visited."
44730 "name": ":matches()",
44734 "description": "Takes a selector list as its argument. It represents an element that is represented by its argument."
44737 "name": ":-moz-any()",
44741 "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
44744 "name": ":-moz-any-link",
44748 "description": "Represents an element that acts as the source anchor of a hyperlink. Applies to both visited and unvisited links."
44751 "name": ":-moz-broken",
44757 "name": "MDN Reference",
44758 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-broken"
44761 "description": "Non-standard. Matches elements representing broken images."
44764 "name": ":-moz-drag-over",
44768 "description": "Non-standard. Matches elements when a drag-over event applies to it."
44771 "name": ":-moz-first-node",
44775 "description": "Non-standard. Represents an element that is the first child node of some other element."
44778 "name": ":-moz-focusring",
44782 "description": "Non-standard. Matches an element that has focus and focus ring drawing is enabled in the browser."
44785 "name": ":-moz-full-screen",
44789 "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
44792 "name": ":-moz-last-node",
44796 "description": "Non-standard. Represents an element that is the last child node of some other element."
44799 "name": ":-moz-loading",
44803 "description": "Non-standard. Matches elements, such as images, that haven’t started loading yet."
44806 "name": ":-moz-only-whitespace",
44812 "name": "MDN Reference",
44813 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-only-whitespace"
44816 "description": "The same as :empty, except that it additionally matches elements that only contain code points affected by whitespace processing. Standardized as :blank."
44819 "name": ":-moz-placeholder",
44823 "description": "Deprecated. Represents placeholder text in an input field. Use ::-moz-placeholder for Firefox 19+."
44826 "name": ":-moz-submit-invalid",
44832 "name": "MDN Reference",
44833 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-submit-invalid"
44836 "description": "Non-standard. Represents any submit button when the contents of the associated form are not valid."
44839 "name": ":-moz-suppressed",
44843 "description": "Non-standard. Matches elements representing images that have been blocked from loading."
44846 "name": ":-moz-ui-invalid",
44852 "name": "MDN Reference",
44853 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-ui-invalid"
44856 "description": "Non-standard. Represents any validated form element whose value isn't valid "
44859 "name": ":-moz-ui-valid",
44865 "name": "MDN Reference",
44866 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-ui-valid"
44869 "description": "Non-standard. Represents any validated form element whose value is valid "
44872 "name": ":-moz-user-disabled",
44876 "description": "Non-standard. Matches elements representing images that have been disabled due to the user’s preferences."
44879 "name": ":-moz-window-inactive",
44885 "name": "MDN Reference",
44886 "url": "https://developer.mozilla.org/docs/Web/CSS/:-moz-window-inactive"
44889 "description": "Non-standard. Matches elements in an inactive window."
44892 "name": ":-ms-fullscreen",
44896 "description": "Matches any element that has its fullscreen flag set."
44899 "name": ":-ms-input-placeholder",
44903 "description": "Represents placeholder text in an input field. Note: for Edge use the pseudo-element ::-ms-input-placeholder. Standardized as ::placeholder."
44906 "name": ":-ms-keyboard-active",
44910 "description": "Windows Store apps only. Applies one or more styles to an element when it has focus and the user presses the space bar."
44913 "name": ":-ms-lang()",
44918 "description": "Represents an element that is in the language specified. Accepts a comma separated list of language tokens."
44921 "name": ":no-button",
44926 "description": "Non-standard. Applies to track pieces. Applies when there is no button at that end of the track."
44938 "description": "The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself) as an argument. It represents an element that is not represented by its argument."
44941 "name": ":nth-child()",
44950 "description": "Represents an element that has an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element."
44953 "name": ":nth-last-child()",
44962 "description": "Represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n, and has a parent element."
44965 "name": ":nth-last-of-type()",
44974 "description": "Represents an element that has an+b-1 siblings with the same expanded element name after it in the document tree, for any zero or positive integer value of n, and has a parent element."
44977 "name": ":nth-of-type()",
44986 "description": "Represents an element that has an+b-1 siblings with the same expanded element name before it in the document tree, for any zero or positive integer value of n, and has a parent element."
44989 "name": ":only-child",
44992 "name": "MDN Reference",
44993 "url": "https://developer.mozilla.org/docs/Web/CSS/:only-child"
44996 "description": "Represents an element that has a parent element and whose parent element has no other element children. Same as :first-child:last-child or :nth-child(1):nth-last-child(1), but with a lower specificity."
44999 "name": ":only-of-type",
45002 "name": "MDN Reference",
45003 "url": "https://developer.mozilla.org/docs/Web/CSS/:only-of-type"
45006 "description": "Matches every element that is the only child of its type, of its parent. Same as :first-of-type:last-of-type or :nth-of-type(1):nth-last-of-type(1), but with a lower specificity."
45009 "name": ":optional",
45012 "name": "MDN Reference",
45013 "url": "https://developer.mozilla.org/docs/Web/CSS/:optional"
45016 "description": "A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional."
45019 "name": ":out-of-range",
45029 "name": "MDN Reference",
45030 "url": "https://developer.mozilla.org/docs/Web/CSS/:out-of-range"
45033 "description": "Used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes."
45042 "description": "Represents any element that is defined to occur entirely prior to a :current element."
45045 "name": ":read-only",
45055 "name": "MDN Reference",
45056 "url": "https://developer.mozilla.org/docs/Web/CSS/:read-only"
45059 "description": "An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only."
45062 "name": ":read-write",
45072 "name": "MDN Reference",
45073 "url": "https://developer.mozilla.org/docs/Web/CSS/:read-write"
45076 "description": "An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only."
45079 "name": ":required",
45082 "name": "MDN Reference",
45083 "url": "https://developer.mozilla.org/docs/Web/CSS/:required"
45086 "description": "A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional."
45099 "name": "MDN Reference",
45100 "url": "https://developer.mozilla.org/docs/Web/CSS/:right"
45103 "description": "When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."
45109 "name": "MDN Reference",
45110 "url": "https://developer.mozilla.org/docs/Web/CSS/:root"
45113 "description": "Represents an element that is the root of the document. In HTML 4, this is always the HTML element."
45126 "name": "MDN Reference",
45127 "url": "https://developer.mozilla.org/docs/Web/CSS/:scope"
45130 "description": "Represents any element that is in the contextual reference element set."
45133 "name": ":single-button",
45138 "description": "Non-standard. Applies to buttons and track pieces. Applies when both buttons are displayed separately at either end of the scrollbar."
45146 "description": "Non-standard. Applies to buttons and track pieces. Indicates whether the object is placed before the thumb."
45152 "name": "MDN Reference",
45153 "url": "https://developer.mozilla.org/docs/Web/CSS/:target"
45156 "description": "Some URIs refer to a location within a resource. This kind of URI ends with a 'number sign' (#) followed by an anchor identifier (called the fragment identifier)."
45162 "name": "MDN Reference",
45163 "url": "https://developer.mozilla.org/docs/Web/CSS/:valid"
45166 "description": "An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification."
45169 "name": ":vertical",
45174 "description": "Non-standard. Applies to any scrollbar pieces that have a vertical orientation."
45177 "name": ":visited",
45180 "name": "MDN Reference",
45181 "url": "https://developer.mozilla.org/docs/Web/CSS/:visited"
45184 "description": "Applies once the link has been visited by the user."
45187 "name": ":-webkit-any()",
45192 "description": "Represents an element that is represented by the selector list passed as its argument. Standardized as :matches()."
45195 "name": ":-webkit-full-screen",
45200 "description": "Matches any element that has its fullscreen flag set. Standardized as :fullscreen."
45203 "name": ":window-inactive",
45208 "description": "Non-standard. Applies to all scrollbar pieces. Indicates whether or not the window containing the scrollbar is currently active."
45212 "status": "experimental",
45215 "name": "MDN Reference",
45216 "url": "https://developer.mozilla.org/docs/Web/CSS/:blank"
45219 "description": "The :blank CSS pseudo-class selects empty user input elements (eg. <input> or <textarea>)."
45222 "name": ":defined",
45223 "status": "experimental",
45233 "name": "MDN Reference",
45234 "url": "https://developer.mozilla.org/docs/Web/CSS/:defined"
45237 "description": "The :defined CSS pseudo-class represents any element that has been defined. This includes any standard element built in to the browser, and custom elements that have been successfully defined (i.e. with the CustomElementRegistry.define() method)."
45246 "name": "MDN Reference",
45247 "url": "https://developer.mozilla.org/docs/Web/CSS/:dir"
45250 "description": "The :dir() CSS pseudo-class matches elements based on the directionality of the text contained in them."
45253 "name": ":focus-visible",
45254 "status": "experimental",
45263 "name": "MDN Reference",
45264 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-visible"
45267 "description": "The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the UA determines via heuristics that the focus should be made evident on the element."
45270 "name": ":focus-within",
45271 "status": "experimental",
45281 "name": "MDN Reference",
45282 "url": "https://developer.mozilla.org/docs/Web/CSS/:focus-within"
45285 "description": "The :focus-within pseudo-class applies to any element for which the :focus pseudo class applies as well as to an element whose descendant in the flat tree (including non-element nodes, such as text nodes) matches the conditions for matching :focus."
45289 "status": "experimental",
45292 "name": "MDN Reference",
45293 "url": "https://developer.mozilla.org/docs/Web/CSS/:has"
45296 "description": ":The :has() CSS pseudo-class represents an element if any of the selectors passed as parameters (relative to the :scope of the given element), match at least one element."
45300 "status": "experimental",
45310 "name": "MDN Reference",
45311 "url": "https://developer.mozilla.org/docs/Web/CSS/:is"
45314 "description": "The :is() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form."
45317 "name": ":placeholder-shown",
45318 "status": "experimental",
45321 "name": "MDN Reference",
45322 "url": "https://developer.mozilla.org/docs/Web/CSS/:placeholder-shown"
45325 "description": "The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text."
45329 "status": "experimental",
45336 "name": "MDN Reference",
45337 "url": "https://developer.mozilla.org/docs/Web/CSS/:where"
45340 "description": "The :where() CSS pseudo-class function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list."
45343 "pseudoElements": [
45348 "name": "MDN Reference",
45349 "url": "https://developer.mozilla.org/docs/Web/CSS/::after"
45352 "description": "Represents a styleable child pseudo-element immediately after the originating element’s actual content."
45355 "name": "::backdrop",
45365 "name": "MDN Reference",
45366 "url": "https://developer.mozilla.org/docs/Web/CSS/::backdrop"
45369 "description": "Used to create a backdrop that hides the underlying document for an element in a top layer (such as an element that is displayed fullscreen)."
45372 "name": "::before",
45375 "name": "MDN Reference",
45376 "url": "https://developer.mozilla.org/docs/Web/CSS/::before"
45379 "description": "Represents a styleable child pseudo-element immediately before the originating element’s actual content."
45382 "name": "::content",
45387 "description": "Deprecated. Matches the distribution list itself, on elements that have one. Use ::slotted for forward compatibility."
45400 "name": "MDN Reference",
45401 "url": "https://developer.mozilla.org/docs/Web/CSS/::cue"
45414 "name": "::cue-region",
45422 "name": "::cue-region()",
45430 "name": "::first-letter",
45433 "name": "MDN Reference",
45434 "url": "https://developer.mozilla.org/docs/Web/CSS/::first-letter"
45437 "description": "Represents the first letter of an element, if it is not preceded by any other content (such as images or inline tables) on its line."
45440 "name": "::first-line",
45443 "name": "MDN Reference",
45444 "url": "https://developer.mozilla.org/docs/Web/CSS/::first-line"
45447 "description": "Describes the contents of the first formatted line of its originating element."
45450 "name": "::-moz-focus-inner",
45456 "name": "::-moz-focus-outer",
45462 "name": "::-moz-list-bullet",
45466 "description": "Used to style the bullet of a list element. Similar to the standardized ::marker."
45469 "name": "::-moz-list-number",
45473 "description": "Used to style the numbers of a list element. Similar to the standardized ::marker."
45476 "name": "::-moz-placeholder",
45480 "description": "Represents placeholder text in an input field"
45483 "name": "::-moz-progress-bar",
45487 "description": "Represents the bar portion of a progress bar."
45490 "name": "::-moz-selection",
45494 "description": "Represents the portion of a document that has been highlighted by the user."
45497 "name": "::-ms-backdrop",
45501 "description": "Used to create a backdrop that hides the underlying document for an element in a top layer (such as an element that is displayed fullscreen)."
45504 "name": "::-ms-browse",
45509 "description": "Represents the browse button of an input type=file control."
45512 "name": "::-ms-check",
45517 "description": "Represents the check of a checkbox or radio button input control."
45520 "name": "::-ms-clear",
45525 "description": "Represents the clear button of a text input control"
45528 "name": "::-ms-expand",
45533 "description": "Represents the drop-down button of a select control."
45536 "name": "::-ms-fill",
45541 "description": "Represents the bar portion of a progress bar."
45544 "name": "::-ms-fill-lower",
45549 "description": "Represents the portion of the slider track from its smallest value up to the value currently selected by the thumb. In a left-to-right layout, this is the portion of the slider track to the left of the thumb."
45552 "name": "::-ms-fill-upper",
45557 "description": "Represents the portion of the slider track from the value currently selected by the thumb up to the slider's largest value. In a left-to-right layout, this is the portion of the slider track to the right of the thumb."
45560 "name": "::-ms-reveal",
45565 "description": "Represents the password reveal button of an input type=password control."
45568 "name": "::-ms-thumb",
45573 "description": "Represents the portion of range input control (also known as a slider control) that the user drags."
45576 "name": "::-ms-ticks-after",
45581 "description": "Represents the tick marks of a slider that begin just after the thumb and continue up to the slider's largest value. In a left-to-right layout, these are the ticks to the right of the thumb."
45584 "name": "::-ms-ticks-before",
45589 "description": "Represents the tick marks of a slider that represent its smallest values up to the value currently selected by the thumb. In a left-to-right layout, these are the ticks to the left of the thumb."
45592 "name": "::-ms-tooltip",
45597 "description": "Represents the tooltip of a slider (input type=range)."
45600 "name": "::-ms-track",
45605 "description": "Represents the track of a slider."
45608 "name": "::-ms-value",
45613 "description": "Represents the content of a text or password input control, or a select control."
45616 "name": "::selection",
45619 "name": "MDN Reference",
45620 "url": "https://developer.mozilla.org/docs/Web/CSS/::selection"
45623 "description": "Represents the portion of a document that has been highlighted by the user."
45626 "name": "::shadow",
45631 "description": "Matches the shadow root if an element has a shadow tree."
45634 "name": "::-webkit-file-upload-button",
45643 "name": "MDN Reference",
45644 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-file-upload-button"
45649 "name": "::-webkit-inner-spin-button",
45658 "name": "MDN Reference",
45659 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-inner-spin-button"
45664 "name": "::-webkit-input-placeholder",
45671 "name": "::-webkit-keygen-select",
45679 "name": "::-webkit-meter-bar",
45688 "name": "MDN Reference",
45689 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-bar"
45694 "name": "::-webkit-meter-even-less-good-value",
45703 "name": "MDN Reference",
45704 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-even-less-good-value"
45709 "name": "::-webkit-meter-optimum-value",
45718 "name": "MDN Reference",
45719 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-optimum-value"
45724 "name": "::-webkit-meter-suboptimum-value",
45733 "name": "MDN Reference",
45734 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-meter-suboptimum-value"
45739 "name": "::-webkit-outer-spin-button",
45746 "name": "MDN Reference",
45747 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-outer-spin-button"
45752 "name": "::-webkit-progress-bar",
45761 "name": "MDN Reference",
45762 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-bar"
45767 "name": "::-webkit-progress-inner-element",
45776 "name": "MDN Reference",
45777 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-inner-element"
45782 "name": "::-webkit-progress-value",
45791 "name": "MDN Reference",
45792 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-progress-value"
45797 "name": "::-webkit-resizer",
45806 "name": "MDN Reference",
45807 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
45812 "name": "::-webkit-scrollbar",
45821 "name": "MDN Reference",
45822 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
45827 "name": "::-webkit-scrollbar-button",
45836 "name": "MDN Reference",
45837 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
45842 "name": "::-webkit-scrollbar-corner",
45851 "name": "MDN Reference",
45852 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
45857 "name": "::-webkit-scrollbar-thumb",
45866 "name": "MDN Reference",
45867 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
45872 "name": "::-webkit-scrollbar-track",
45881 "name": "MDN Reference",
45882 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
45887 "name": "::-webkit-scrollbar-track-piece",
45896 "name": "MDN Reference",
45897 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-scrollbar"
45902 "name": "::-webkit-search-cancel-button",
45911 "name": "MDN Reference",
45912 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-cancel-button"
45917 "name": "::-webkit-search-decoration",
45924 "name": "::-webkit-search-results-button",
45933 "name": "MDN Reference",
45934 "url": "https://developer.mozilla.org/docs/Web/CSS/::-webkit-search-results-button"
45939 "name": "::-webkit-search-results-decoration",
45946 "name": "::-webkit-slider-runnable-track",
45954 "name": "::-webkit-slider-thumb",
45962 "name": "::-webkit-textfield-decoration-container",
45970 "name": "::-webkit-validation-bubble",
45978 "name": "::-webkit-validation-bubble-arrow",
45986 "name": "::-webkit-validation-bubble-arrow-clipper",
45994 "name": "::-webkit-validation-bubble-heading",
46002 "name": "::-webkit-validation-bubble-message",
46010 "name": "::-webkit-validation-bubble-text-block",
46018 "name": "::-moz-range-progress",
46019 "status": "nonstandard",
46025 "name": "MDN Reference",
46026 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-progress"
46029 "description": "The ::-moz-range-progress CSS pseudo-element is a Mozilla extension that represents the lower portion of the track (i.e., groove) in which the indicator slides in an <input> of type=\"range\". This portion corresponds to values lower than the value currently selected by the thumb (i.e., virtual knob)."
46032 "name": "::-moz-range-thumb",
46033 "status": "nonstandard",
46039 "name": "MDN Reference",
46040 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-thumb"
46043 "description": "The ::-moz-range-thumb CSS pseudo-element is a Mozilla extension that represents the thumb (i.e., virtual knob) of an <input> of type=\"range\". The user can move the thumb along the input's track to alter its numerical value."
46046 "name": "::-moz-range-track",
46047 "status": "nonstandard",
46053 "name": "MDN Reference",
46054 "url": "https://developer.mozilla.org/docs/Web/CSS/::-moz-range-track"
46057 "description": "The ::-moz-range-track CSS pseudo-element is a Mozilla extension that represents the track (i.e., groove) in which the indicator slides in an <input> of type=\"range\"."
46060 "name": "::-webkit-progress-inner-value",
46061 "status": "nonstandard",
46062 "description": "The ::-webkit-progress-value CSS pseudo-element represents the filled-in portion of the bar of a <progress> element. It is a child of the ::-webkit-progress-bar pseudo-element.\n\nIn order to let ::-webkit-progress-value take effect, -webkit-appearance needs to be set to none on the <progress> element."
46065 "name": "::grammar-error",
46066 "status": "experimental",
46069 "name": "MDN Reference",
46070 "url": "https://developer.mozilla.org/docs/Web/CSS/::grammar-error"
46073 "description": "The ::grammar-error CSS pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect."
46076 "name": "::marker",
46085 "name": "MDN Reference",
46086 "url": "https://developer.mozilla.org/docs/Web/CSS/::marker"
46089 "description": "The ::marker CSS pseudo-element selects the marker box of a list item, which typically contains a bullet or number. It works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements."
46093 "status": "experimental",
46103 "name": "MDN Reference",
46104 "url": "https://developer.mozilla.org/docs/Web/CSS/::part"
46107 "description": "The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute."
46110 "name": "::placeholder",
46120 "name": "MDN Reference",
46121 "url": "https://developer.mozilla.org/docs/Web/CSS/::placeholder"
46124 "description": "The ::placeholder CSS pseudo-element represents the placeholder text of a form element."
46127 "name": "::slotted",
46137 "name": "MDN Reference",
46138 "url": "https://developer.mozilla.org/docs/Web/CSS/::slotted"
46141 "description": "The :slotted() CSS pseudo-element represents any element that has been placed into a slot inside an HTML template."
46144 "name": "::spelling-error",
46145 "status": "experimental",
46148 "name": "MDN Reference",
46149 "url": "https://developer.mozilla.org/docs/Web/CSS/::spelling-error"
46152 "description": "The ::spelling-error CSS pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled."
46160 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46162 __webpack_require__.r(__webpack_exports__);
46163 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46164 /* harmony export */ "CSSDataProvider": () => /* binding */ CSSDataProvider
46165 /* harmony export */ });
46166 /*---------------------------------------------------------------------------------------------
46167 * Copyright (c) Microsoft Corporation. All rights reserved.
46168 * Licensed under the MIT License. See License.txt in the project root for license information.
46169 *--------------------------------------------------------------------------------------------*/
46171 var CSSDataProvider = /** @class */ (function () {
46173 * Currently, unversioned data uses the V1 implementation
46174 * In the future when the provider handles multiple versions of HTML custom data,
46175 * use the latest implementation for unversioned data
46177 function CSSDataProvider(data) {
46178 this._properties = [];
46179 this._atDirectives = [];
46180 this._pseudoClasses = [];
46181 this._pseudoElements = [];
46182 this.addData(data);
46184 CSSDataProvider.prototype.provideProperties = function () {
46185 return this._properties;
46187 CSSDataProvider.prototype.provideAtDirectives = function () {
46188 return this._atDirectives;
46190 CSSDataProvider.prototype.providePseudoClasses = function () {
46191 return this._pseudoClasses;
46193 CSSDataProvider.prototype.providePseudoElements = function () {
46194 return this._pseudoElements;
46196 CSSDataProvider.prototype.addData = function (data) {
46197 if (Array.isArray(data.properties)) {
46198 for (var _i = 0, _a = data.properties; _i < _a.length; _i++) {
46200 if (isPropertyData(prop)) {
46201 this._properties.push(prop);
46205 if (Array.isArray(data.atDirectives)) {
46206 for (var _b = 0, _c = data.atDirectives; _b < _c.length; _b++) {
46208 if (isAtDirective(prop)) {
46209 this._atDirectives.push(prop);
46213 if (Array.isArray(data.pseudoClasses)) {
46214 for (var _d = 0, _e = data.pseudoClasses; _d < _e.length; _d++) {
46216 if (isPseudoClassData(prop)) {
46217 this._pseudoClasses.push(prop);
46221 if (Array.isArray(data.pseudoElements)) {
46222 for (var _f = 0, _g = data.pseudoElements; _f < _g.length; _f++) {
46224 if (isPseudoElementData(prop)) {
46225 this._pseudoElements.push(prop);
46230 return CSSDataProvider;
46233 function isPropertyData(d) {
46234 return typeof d.name === 'string';
46236 function isAtDirective(d) {
46237 return typeof d.name === 'string';
46239 function isPseudoClassData(d) {
46240 return typeof d.name === 'string';
46242 function isPseudoElementData(d) {
46243 return typeof d.name === 'string';
46249 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46251 __webpack_require__.r(__webpack_exports__);
46252 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46253 /* harmony export */ "getSelectionRanges": () => /* binding */ getSelectionRanges
46254 /* harmony export */ });
46255 /* harmony import */ var _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(88);
46256 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
46257 /*---------------------------------------------------------------------------------------------
46258 * Copyright (c) Microsoft Corporation. All rights reserved.
46259 * Licensed under the MIT License. See License.txt in the project root for license information.
46260 *--------------------------------------------------------------------------------------------*/
46264 function getSelectionRanges(document, positions, stylesheet) {
46265 function getSelectionRange(position) {
46266 var applicableRanges = getApplicableRanges(position);
46267 var current = undefined;
46268 for (var index = applicableRanges.length - 1; index >= 0; index--) {
46269 current = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SelectionRange.create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(document.positionAt(applicableRanges[index][0]), document.positionAt(applicableRanges[index][1])), current);
46272 current = _cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SelectionRange.create(_cssLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(position, position));
46276 return positions.map(getSelectionRange);
46277 function getApplicableRanges(position) {
46278 var offset = document.offsetAt(position);
46279 var currNode = stylesheet.findChildAtOffset(offset, true);
46285 if (currNode.parent &&
46286 currNode.offset === currNode.parent.offset &&
46287 currNode.end === currNode.parent.end) {
46288 currNode = currNode.parent;
46291 // The `{ }` part of `.a { }`
46292 if (currNode.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Declarations) {
46293 if (offset > currNode.offset && offset < currNode.end) {
46294 // Return `{ }` and the range inside `{` and `}`
46295 result.push([currNode.offset + 1, currNode.end - 1]);
46298 result.push([currNode.offset, currNode.end]);
46299 currNode = currNode.parent;
46308 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46310 __webpack_require__.r(__webpack_exports__);
46311 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46312 /* harmony export */ "SCSSNavigation": () => /* binding */ SCSSNavigation
46313 /* harmony export */ });
46314 /* harmony import */ var _cssNavigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96);
46315 /* harmony import */ var _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
46316 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93);
46317 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75);
46318 /*---------------------------------------------------------------------------------------------
46319 * Copyright (c) Microsoft Corporation. All rights reserved.
46320 * Licensed under the MIT License. See License.txt in the project root for license information.
46321 *--------------------------------------------------------------------------------------------*/
46323 var __extends = (undefined && undefined.__extends) || (function () {
46324 var extendStatics = function (d, b) {
46325 extendStatics = Object.setPrototypeOf ||
46326 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
46327 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
46328 return extendStatics(d, b);
46330 return function (d, b) {
46331 extendStatics(d, b);
46332 function __() { this.constructor = d; }
46333 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
46336 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
46337 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
46338 return new (P || (P = Promise))(function (resolve, reject) {
46339 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
46340 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46341 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
46342 step((generator = generator.apply(thisArg, _arguments || [])).next());
46345 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
46346 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
46347 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
46348 function verb(n) { return function (v) { return step([n, v]); }; }
46349 function step(op) {
46350 if (f) throw new TypeError("Generator is already executing.");
46352 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
46353 if (y = 0, t) op = [op[0] & 2, t.value];
46355 case 0: case 1: t = op; break;
46356 case 4: _.label++; return { value: op[1], done: false };
46357 case 5: _.label++; y = op[1]; op = [0]; continue;
46358 case 7: op = _.ops.pop(); _.trys.pop(); continue;
46360 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
46361 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
46362 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
46363 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
46364 if (t[2]) _.ops.pop();
46365 _.trys.pop(); continue;
46367 op = body.call(thisArg, _);
46368 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46369 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46376 var SCSSNavigation = /** @class */ (function (_super) {
46377 __extends(SCSSNavigation, _super);
46378 function SCSSNavigation(fileSystemProvider) {
46379 return _super.call(this, fileSystemProvider) || this;
46381 SCSSNavigation.prototype.isRawStringDocumentLinkNode = function (node) {
46382 return (_super.prototype.isRawStringDocumentLinkNode.call(this, node) ||
46383 node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Use ||
46384 node.type === _parser_cssNodes__WEBPACK_IMPORTED_MODULE_1__.NodeType.Forward);
46386 SCSSNavigation.prototype.resolveRelativeReference = function (ref, documentUri, documentContext) {
46387 return __awaiter(this, void 0, void 0, function () {
46388 function toPathVariations(uri) {
46390 if (uri.path === '') {
46393 // No variation for links that ends with suffix
46394 if (uri.path.endsWith('.scss') || uri.path.endsWith('.css')) {
46397 // If a link is like a/, try resolving a/index.scss and a/_index.scss
46398 if (uri.path.endsWith('/')) {
46400 uri.with({ path: uri.path + 'index.scss' }).toString(),
46401 uri.with({ path: uri.path + '_index.scss' }).toString()
46404 // Use `uri.path` since it's normalized to use `/` in all platforms
46405 var pathFragments = uri.path.split('/');
46406 var basename = pathFragments[pathFragments.length - 1];
46407 var pathWithoutBasename = uri.path.slice(0, -basename.length);
46408 // No variation for links such as _a
46409 if (basename.startsWith('_')) {
46410 if (uri.path.endsWith('.scss')) {
46414 return [uri.with({ path: uri.path + '.scss' }).toString()];
46417 var normalizedBasename = basename + '.scss';
46418 var documentUriWithBasename = function (newBasename) {
46419 return uri.with({ path: pathWithoutBasename + newBasename }).toString();
46421 var normalizedPath = documentUriWithBasename(normalizedBasename);
46422 var underScorePath = documentUriWithBasename('_' + normalizedBasename);
46423 var indexPath = documentUriWithBasename(normalizedBasename.slice(0, -5) + '/index.scss');
46424 var indexUnderscoreUri = documentUriWithBasename(normalizedBasename.slice(0, -5) + '/_index.scss');
46425 var cssPath = documentUriWithBasename(normalizedBasename.slice(0, -5) + '.css');
46426 return [normalizedPath, underScorePath, indexPath, indexUnderscoreUri, cssPath];
46428 var target, parsedUri, pathVariations, j, e_1;
46429 return __generator(this, function (_a) {
46430 switch (_a.label) {
46432 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.startsWith)(ref, 'sass:')) {
46433 return [2 /*return*/, undefined]; // sass library
46435 return [4 /*yield*/, _super.prototype.resolveRelativeReference.call(this, ref, documentUri, documentContext)];
46437 target = _a.sent();
46438 if (!(this.fileSystemProvider && target)) return [3 /*break*/, 8];
46439 parsedUri = vscode_uri__WEBPACK_IMPORTED_MODULE_3__.URI.parse(target);
46440 if (!(parsedUri.path && vscode_uri__WEBPACK_IMPORTED_MODULE_3__.Utils.extname(parsedUri).length === 0)) return [3 /*break*/, 8];
46443 _a.trys.push([2, 7, , 8]);
46444 pathVariations = toPathVariations(parsedUri);
46445 if (!pathVariations) return [3 /*break*/, 6];
46449 if (!(j < pathVariations.length)) return [3 /*break*/, 6];
46450 return [4 /*yield*/, this.fileExists(pathVariations[j])];
46453 return [2 /*return*/, pathVariations[j]];
46458 return [3 /*break*/, 3];
46459 case 6: return [2 /*return*/, undefined];
46462 return [3 /*break*/, 8];
46463 case 8: return [2 /*return*/, target];
46468 return SCSSNavigation;
46469 }(_cssNavigation__WEBPACK_IMPORTED_MODULE_0__.CSSNavigation));
46475 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46477 __webpack_require__.r(__webpack_exports__);
46478 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46479 /* harmony export */ "AnnotatedTextEdit": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.AnnotatedTextEdit,
46480 /* harmony export */ "ChangeAnnotation": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ChangeAnnotation,
46481 /* harmony export */ "ChangeAnnotationIdentifier": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ChangeAnnotationIdentifier,
46482 /* harmony export */ "ClientCapabilities": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ClientCapabilities,
46483 /* harmony export */ "CodeAction": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeAction,
46484 /* harmony export */ "CodeActionContext": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeActionContext,
46485 /* harmony export */ "CodeActionKind": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeActionKind,
46486 /* harmony export */ "CodeDescription": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeDescription,
46487 /* harmony export */ "CodeLens": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CodeLens,
46488 /* harmony export */ "Color": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Color,
46489 /* harmony export */ "ColorInformation": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ColorInformation,
46490 /* harmony export */ "ColorPresentation": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ColorPresentation,
46491 /* harmony export */ "Command": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Command,
46492 /* harmony export */ "CompletionItem": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItem,
46493 /* harmony export */ "CompletionItemKind": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItemKind,
46494 /* harmony export */ "CompletionItemTag": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionItemTag,
46495 /* harmony export */ "CompletionList": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CompletionList,
46496 /* harmony export */ "CreateFile": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.CreateFile,
46497 /* harmony export */ "DeleteFile": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DeleteFile,
46498 /* harmony export */ "Diagnostic": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Diagnostic,
46499 /* harmony export */ "DiagnosticRelatedInformation": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticRelatedInformation,
46500 /* harmony export */ "DiagnosticSeverity": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticSeverity,
46501 /* harmony export */ "DiagnosticTag": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DiagnosticTag,
46502 /* harmony export */ "DocumentHighlight": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentHighlight,
46503 /* harmony export */ "DocumentHighlightKind": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentHighlightKind,
46504 /* harmony export */ "DocumentLink": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentLink,
46505 /* harmony export */ "DocumentSymbol": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.DocumentSymbol,
46506 /* harmony export */ "EOL": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.EOL,
46507 /* harmony export */ "FileType": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FileType,
46508 /* harmony export */ "FoldingRange": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FoldingRange,
46509 /* harmony export */ "FoldingRangeKind": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FoldingRangeKind,
46510 /* harmony export */ "FormattingOptions": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.FormattingOptions,
46511 /* harmony export */ "Hover": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Hover,
46512 /* harmony export */ "InsertReplaceEdit": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.InsertReplaceEdit,
46513 /* harmony export */ "InsertTextFormat": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.InsertTextFormat,
46514 /* harmony export */ "InsertTextMode": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.InsertTextMode,
46515 /* harmony export */ "Location": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Location,
46516 /* harmony export */ "LocationLink": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.LocationLink,
46517 /* harmony export */ "MarkedString": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkedString,
46518 /* harmony export */ "MarkupContent": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkupContent,
46519 /* harmony export */ "MarkupKind": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.MarkupKind,
46520 /* harmony export */ "OptionalVersionedTextDocumentIdentifier": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.OptionalVersionedTextDocumentIdentifier,
46521 /* harmony export */ "ParameterInformation": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ParameterInformation,
46522 /* harmony export */ "Position": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Position,
46523 /* harmony export */ "Range": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.Range,
46524 /* harmony export */ "RenameFile": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.RenameFile,
46525 /* harmony export */ "ScannerState": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.ScannerState,
46526 /* harmony export */ "SelectionRange": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SelectionRange,
46527 /* harmony export */ "SignatureInformation": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SignatureInformation,
46528 /* harmony export */ "SymbolInformation": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolInformation,
46529 /* harmony export */ "SymbolKind": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolKind,
46530 /* harmony export */ "SymbolTag": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.SymbolTag,
46531 /* harmony export */ "TextDocument": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocument,
46532 /* harmony export */ "TextDocumentEdit": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentEdit,
46533 /* harmony export */ "TextDocumentIdentifier": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentIdentifier,
46534 /* harmony export */ "TextDocumentItem": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextDocumentItem,
46535 /* harmony export */ "TextEdit": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TextEdit,
46536 /* harmony export */ "TokenType": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.TokenType,
46537 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.VersionedTextDocumentIdentifier,
46538 /* harmony export */ "WorkspaceChange": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.WorkspaceChange,
46539 /* harmony export */ "WorkspaceEdit": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.WorkspaceEdit,
46540 /* harmony export */ "integer": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.integer,
46541 /* harmony export */ "uinteger": () => /* reexport safe */ _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__.uinteger,
46542 /* harmony export */ "getLanguageService": () => /* binding */ getLanguageService,
46543 /* harmony export */ "newHTMLDataProvider": () => /* binding */ newHTMLDataProvider,
46544 /* harmony export */ "getDefaultHTMLDataProvider": () => /* binding */ getDefaultHTMLDataProvider
46545 /* harmony export */ });
46546 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(116);
46547 /* harmony import */ var _parser_htmlParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(119);
46548 /* harmony import */ var _services_htmlCompletion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(122);
46549 /* harmony import */ var _services_htmlHover__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(129);
46550 /* harmony import */ var _services_htmlFormatter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(130);
46551 /* harmony import */ var _services_htmlLinks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(134);
46552 /* harmony import */ var _services_htmlHighlighting__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(136);
46553 /* harmony import */ var _services_htmlSymbolsProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(137);
46554 /* harmony import */ var _services_htmlRename__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(138);
46555 /* harmony import */ var _services_htmlMatchingTagPosition__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(139);
46556 /* harmony import */ var _services_htmlLinkedEditing__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(140);
46557 /* harmony import */ var _services_htmlFolding__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(141);
46558 /* harmony import */ var _services_htmlSelectionRange__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(142);
46559 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(126);
46560 /* harmony import */ var _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(143);
46561 /* harmony import */ var _languageFacts_data_webCustomData__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(144);
46562 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(117);
46563 /*---------------------------------------------------------------------------------------------
46564 * Copyright (c) Microsoft Corporation. All rights reserved.
46565 * Licensed under the MIT License. See License.txt in the project root for license information.
46566 *--------------------------------------------------------------------------------------------*/
46584 var defaultLanguageServiceOptions = {};
46585 function getLanguageService(options) {
46586 if (options === void 0) { options = defaultLanguageServiceOptions; }
46587 var dataManager = new _languageFacts_dataManager__WEBPACK_IMPORTED_MODULE_14__.HTMLDataManager(options);
46588 var htmlHover = new _services_htmlHover__WEBPACK_IMPORTED_MODULE_3__.HTMLHover(options, dataManager);
46589 var htmlCompletion = new _services_htmlCompletion__WEBPACK_IMPORTED_MODULE_2__.HTMLCompletion(options, dataManager);
46591 setDataProviders: dataManager.setDataProviders.bind(dataManager),
46592 createScanner: _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner,
46593 parseHTMLDocument: function (document) { return (0,_parser_htmlParser__WEBPACK_IMPORTED_MODULE_1__.parse)(document.getText()); },
46594 doComplete: htmlCompletion.doComplete.bind(htmlCompletion),
46595 doComplete2: htmlCompletion.doComplete2.bind(htmlCompletion),
46596 setCompletionParticipants: htmlCompletion.setCompletionParticipants.bind(htmlCompletion),
46597 doHover: htmlHover.doHover.bind(htmlHover),
46598 format: _services_htmlFormatter__WEBPACK_IMPORTED_MODULE_4__.format,
46599 findDocumentHighlights: _services_htmlHighlighting__WEBPACK_IMPORTED_MODULE_6__.findDocumentHighlights,
46600 findDocumentLinks: _services_htmlLinks__WEBPACK_IMPORTED_MODULE_5__.findDocumentLinks,
46601 findDocumentSymbols: _services_htmlSymbolsProvider__WEBPACK_IMPORTED_MODULE_7__.findDocumentSymbols,
46602 getFoldingRanges: _services_htmlFolding__WEBPACK_IMPORTED_MODULE_11__.getFoldingRanges,
46603 getSelectionRanges: _services_htmlSelectionRange__WEBPACK_IMPORTED_MODULE_12__.getSelectionRanges,
46604 doTagComplete: htmlCompletion.doTagComplete.bind(htmlCompletion),
46605 doRename: _services_htmlRename__WEBPACK_IMPORTED_MODULE_8__.doRename,
46606 findMatchingTagPosition: _services_htmlMatchingTagPosition__WEBPACK_IMPORTED_MODULE_9__.findMatchingTagPosition,
46607 findOnTypeRenameRanges: _services_htmlLinkedEditing__WEBPACK_IMPORTED_MODULE_10__.findLinkedEditingRanges,
46608 findLinkedEditingRanges: _services_htmlLinkedEditing__WEBPACK_IMPORTED_MODULE_10__.findLinkedEditingRanges
46611 function newHTMLDataProvider(id, customData) {
46612 return new _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_13__.HTMLDataProvider(id, customData);
46614 function getDefaultHTMLDataProvider() {
46615 return newHTMLDataProvider('default', _languageFacts_data_webCustomData__WEBPACK_IMPORTED_MODULE_15__.htmlData);
46621 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46623 __webpack_require__.r(__webpack_exports__);
46624 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46625 /* harmony export */ "createScanner": () => /* binding */ createScanner
46626 /* harmony export */ });
46627 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
46628 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(117);
46629 /*---------------------------------------------------------------------------------------------
46630 * Copyright (c) Microsoft Corporation. All rights reserved.
46631 * Licensed under the MIT License. See License.txt in the project root for license information.
46632 *--------------------------------------------------------------------------------------------*/
46635 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__.loadMessageBundle();
46636 var MultiLineStream = /** @class */ (function () {
46637 function MultiLineStream(source, position) {
46638 this.source = source;
46639 this.len = source.length;
46640 this.position = position;
46642 MultiLineStream.prototype.eos = function () {
46643 return this.len <= this.position;
46645 MultiLineStream.prototype.getSource = function () {
46646 return this.source;
46648 MultiLineStream.prototype.pos = function () {
46649 return this.position;
46651 MultiLineStream.prototype.goBackTo = function (pos) {
46652 this.position = pos;
46654 MultiLineStream.prototype.goBack = function (n) {
46655 this.position -= n;
46657 MultiLineStream.prototype.advance = function (n) {
46658 this.position += n;
46660 MultiLineStream.prototype.goToEnd = function () {
46661 this.position = this.source.length;
46663 MultiLineStream.prototype.nextChar = function () {
46664 return this.source.charCodeAt(this.position++) || 0;
46666 MultiLineStream.prototype.peekChar = function (n) {
46667 if (n === void 0) { n = 0; }
46668 return this.source.charCodeAt(this.position + n) || 0;
46670 MultiLineStream.prototype.advanceIfChar = function (ch) {
46671 if (ch === this.source.charCodeAt(this.position)) {
46677 MultiLineStream.prototype.advanceIfChars = function (ch) {
46679 if (this.position + ch.length > this.source.length) {
46682 for (i = 0; i < ch.length; i++) {
46683 if (this.source.charCodeAt(this.position + i) !== ch[i]) {
46690 MultiLineStream.prototype.advanceIfRegExp = function (regex) {
46691 var str = this.source.substr(this.position);
46692 var match = str.match(regex);
46694 this.position = this.position + match.index + match[0].length;
46699 MultiLineStream.prototype.advanceUntilRegExp = function (regex) {
46700 var str = this.source.substr(this.position);
46701 var match = str.match(regex);
46703 this.position = this.position + match.index;
46711 MultiLineStream.prototype.advanceUntilChar = function (ch) {
46712 while (this.position < this.source.length) {
46713 if (this.source.charCodeAt(this.position) === ch) {
46720 MultiLineStream.prototype.advanceUntilChars = function (ch) {
46721 while (this.position + ch.length <= this.source.length) {
46723 for (; i < ch.length && this.source.charCodeAt(this.position + i) === ch[i]; i++) {
46725 if (i === ch.length) {
46733 MultiLineStream.prototype.skipWhitespace = function () {
46734 var n = this.advanceWhileChar(function (ch) {
46735 return ch === _WSP || ch === _TAB || ch === _NWL || ch === _LFD || ch === _CAR;
46739 MultiLineStream.prototype.advanceWhileChar = function (condition) {
46740 var posNow = this.position;
46741 while (this.position < this.len && condition(this.source.charCodeAt(this.position))) {
46744 return this.position - posNow;
46746 return MultiLineStream;
46748 var _BNG = '!'.charCodeAt(0);
46749 var _MIN = '-'.charCodeAt(0);
46750 var _LAN = '<'.charCodeAt(0);
46751 var _RAN = '>'.charCodeAt(0);
46752 var _FSL = '/'.charCodeAt(0);
46753 var _EQS = '='.charCodeAt(0);
46754 var _DQO = '"'.charCodeAt(0);
46755 var _SQO = '\''.charCodeAt(0);
46756 var _NWL = '\n'.charCodeAt(0);
46757 var _CAR = '\r'.charCodeAt(0);
46758 var _LFD = '\f'.charCodeAt(0);
46759 var _WSP = ' '.charCodeAt(0);
46760 var _TAB = '\t'.charCodeAt(0);
46761 var htmlScriptContents = {
46762 'text/x-handlebars-template': true
46764 function createScanner(input, initialOffset, initialState, emitPseudoCloseTags) {
46765 if (initialOffset === void 0) { initialOffset = 0; }
46766 if (initialState === void 0) { initialState = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent; }
46767 if (emitPseudoCloseTags === void 0) { emitPseudoCloseTags = false; }
46768 var stream = new MultiLineStream(input, initialOffset);
46769 var state = initialState;
46770 var tokenOffset = 0;
46771 var tokenType = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Unknown;
46773 var hasSpaceAfterTag;
46775 var lastAttributeName;
46777 function nextElementName() {
46778 return stream.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/).toLowerCase();
46780 function nextAttributeName() {
46781 return stream.advanceIfRegExp(/^[^\s"'></=\x00-\x0F\x7F\x80-\x9F]*/).toLowerCase();
46783 function finishToken(offset, type, errorMessage) {
46785 tokenOffset = offset;
46786 tokenError = errorMessage;
46790 var offset = stream.pos();
46791 var oldState = state;
46792 var token = internalScan();
46793 if (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS && offset === stream.pos() && !(emitPseudoCloseTags && (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTagClose || token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTagClose))) {
46794 console.log('Scanner.scan has not advanced at offset ' + offset + ', state before: ' + oldState + ' after: ' + state);
46796 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Unknown);
46800 function internalScan() {
46801 var offset = stream.pos();
46802 if (stream.eos()) {
46803 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS);
46807 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinComment:
46808 if (stream.advanceIfChars([_MIN, _MIN, _RAN])) { // -->
46809 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
46810 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndCommentTag);
46812 stream.advanceUntilChars([_MIN, _MIN, _RAN]); // -->
46813 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Comment);
46814 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinDoctype:
46815 if (stream.advanceIfChar(_RAN)) {
46816 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
46817 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndDoctypeTag);
46819 stream.advanceUntilChar(_RAN); // >
46820 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Doctype);
46821 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent:
46822 if (stream.advanceIfChar(_LAN)) { // <
46823 if (!stream.eos() && stream.peekChar() === _BNG) { // !
46824 if (stream.advanceIfChars([_BNG, _MIN, _MIN])) { // <!--
46825 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinComment;
46826 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartCommentTag);
46828 if (stream.advanceIfRegExp(/^!doctype/i)) {
46829 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinDoctype;
46830 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartDoctypeTag);
46833 if (stream.advanceIfChar(_FSL)) { // /
46834 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterOpeningEndTag;
46835 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTagOpen);
46837 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterOpeningStartTag;
46838 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTagOpen);
46840 stream.advanceUntilChar(_LAN);
46841 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Content);
46842 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterOpeningEndTag:
46843 var tagName = nextElementName();
46844 if (tagName.length > 0) {
46845 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinEndTag;
46846 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTag);
46848 if (stream.skipWhitespace()) { // white space is not valid here
46849 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Whitespace, localize('error.unexpectedWhitespace', 'Tag name must directly follow the open bracket.'));
46851 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinEndTag;
46852 stream.advanceUntilChar(_RAN);
46853 if (offset < stream.pos()) {
46854 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Unknown, localize('error.endTagNameExpected', 'End tag name expected.'));
46856 return internalScan();
46857 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinEndTag:
46858 if (stream.skipWhitespace()) { // white space is valid here
46859 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Whitespace);
46861 if (stream.advanceIfChar(_RAN)) { // >
46862 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
46863 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTagClose);
46865 if (emitPseudoCloseTags && stream.peekChar() === _LAN) { // <
46866 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
46867 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTagClose, localize('error.closingBracketMissing', 'Closing bracket missing.'));
46869 errorMessage = localize('error.closingBracketExpected', 'Closing bracket expected.');
46871 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterOpeningStartTag:
46872 lastTag = nextElementName();
46873 lastTypeValue = void 0;
46874 lastAttributeName = void 0;
46875 if (lastTag.length > 0) {
46876 hasSpaceAfterTag = false;
46877 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinTag;
46878 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTag);
46880 if (stream.skipWhitespace()) { // white space is not valid here
46881 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Whitespace, localize('error.unexpectedWhitespace', 'Tag name must directly follow the open bracket.'));
46883 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinTag;
46884 stream.advanceUntilChar(_RAN);
46885 if (offset < stream.pos()) {
46886 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Unknown, localize('error.startTagNameExpected', 'Start tag name expected.'));
46888 return internalScan();
46889 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinTag:
46890 if (stream.skipWhitespace()) {
46891 hasSpaceAfterTag = true; // remember that we have seen a whitespace
46892 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Whitespace);
46894 if (hasSpaceAfterTag) {
46895 lastAttributeName = nextAttributeName();
46896 if (lastAttributeName.length > 0) {
46897 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterAttributeName;
46898 hasSpaceAfterTag = false;
46899 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeName);
46902 if (stream.advanceIfChars([_FSL, _RAN])) { // />
46903 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
46904 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTagSelfClose);
46906 if (stream.advanceIfChar(_RAN)) { // >
46907 if (lastTag === 'script') {
46908 if (lastTypeValue && htmlScriptContents[lastTypeValue]) {
46910 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
46913 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinScriptContent;
46916 else if (lastTag === 'style') {
46917 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinStyleContent;
46920 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
46922 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTagClose);
46924 if (emitPseudoCloseTags && stream.peekChar() === _LAN) { // <
46925 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
46926 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTagClose, localize('error.closingBracketMissing', 'Closing bracket missing.'));
46929 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Unknown, localize('error.unexpectedCharacterInTag', 'Unexpected character in tag.'));
46930 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterAttributeName:
46931 if (stream.skipWhitespace()) {
46932 hasSpaceAfterTag = true;
46933 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Whitespace);
46935 if (stream.advanceIfChar(_EQS)) {
46936 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.BeforeAttributeValue;
46937 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.DelimiterAssign);
46939 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinTag;
46940 return internalScan(); // no advance yet - jump to WithinTag
46941 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.BeforeAttributeValue:
46942 if (stream.skipWhitespace()) {
46943 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Whitespace);
46945 var attributeValue = stream.advanceIfRegExp(/^[^\s"'`=<>]+/);
46946 if (attributeValue.length > 0) {
46947 if (stream.peekChar() === _RAN && stream.peekChar(-1) === _FSL) { // <foo bar=http://foo/>
46949 attributeValue = attributeValue.substr(0, attributeValue.length - 1);
46951 if (lastAttributeName === 'type') {
46952 lastTypeValue = attributeValue;
46954 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinTag;
46955 hasSpaceAfterTag = false;
46956 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeValue);
46958 var ch = stream.peekChar();
46959 if (ch === _SQO || ch === _DQO) {
46960 stream.advance(1); // consume quote
46961 if (stream.advanceUntilChar(ch)) {
46962 stream.advance(1); // consume quote
46964 if (lastAttributeName === 'type') {
46965 lastTypeValue = stream.getSource().substring(offset + 1, stream.pos() - 1);
46967 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinTag;
46968 hasSpaceAfterTag = false;
46969 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeValue);
46971 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinTag;
46972 hasSpaceAfterTag = false;
46973 return internalScan(); // no advance yet - jump to WithinTag
46974 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinScriptContent:
46975 // see http://stackoverflow.com/questions/14574471/how-do-browsers-parse-a-script-tag-exactly
46976 var sciptState = 1;
46977 while (!stream.eos()) {
46978 var match = stream.advanceIfRegExp(/<!--|-->|<\/?script\s*\/?>?/i);
46979 if (match.length === 0) {
46981 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Script);
46983 else if (match === '<!--') {
46984 if (sciptState === 1) {
46988 else if (match === '-->') {
46991 else if (match[1] !== '/') { // <script
46992 if (sciptState === 2) {
46997 if (sciptState === 3) {
47001 stream.goBack(match.length); // to the beginning of the closing tag
47006 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
47007 if (offset < stream.pos()) {
47008 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Script);
47010 return internalScan(); // no advance yet - jump to content
47011 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinStyleContent:
47012 stream.advanceUntilRegExp(/<\/style/i);
47013 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
47014 if (offset < stream.pos()) {
47015 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Styles);
47017 return internalScan(); // no advance yet - jump to content
47020 state = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent;
47021 return finishToken(offset, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Unknown, errorMessage);
47025 getTokenType: function () { return tokenType; },
47026 getTokenOffset: function () { return tokenOffset; },
47027 getTokenLength: function () { return stream.pos() - tokenOffset; },
47028 getTokenEnd: function () { return stream.pos(); },
47029 getTokenText: function () { return stream.getSource().substring(tokenOffset, stream.pos()); },
47030 getScannerState: function () { return state; },
47031 getTokenError: function () { return tokenError; }
47038 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
47040 __webpack_require__.r(__webpack_exports__);
47041 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
47042 /* harmony export */ "TextDocument": () => /* reexport safe */ vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__.TextDocument,
47043 /* harmony export */ "AnnotatedTextEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.AnnotatedTextEdit,
47044 /* harmony export */ "ChangeAnnotation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ChangeAnnotation,
47045 /* harmony export */ "ChangeAnnotationIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ChangeAnnotationIdentifier,
47046 /* harmony export */ "CodeAction": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeAction,
47047 /* harmony export */ "CodeActionContext": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeActionContext,
47048 /* harmony export */ "CodeActionKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeActionKind,
47049 /* harmony export */ "CodeDescription": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeDescription,
47050 /* harmony export */ "CodeLens": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CodeLens,
47051 /* harmony export */ "Color": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Color,
47052 /* harmony export */ "ColorInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ColorInformation,
47053 /* harmony export */ "ColorPresentation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ColorPresentation,
47054 /* harmony export */ "Command": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Command,
47055 /* harmony export */ "CompletionItem": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItem,
47056 /* harmony export */ "CompletionItemKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind,
47057 /* harmony export */ "CompletionItemTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionItemTag,
47058 /* harmony export */ "CompletionList": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CompletionList,
47059 /* harmony export */ "CreateFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.CreateFile,
47060 /* harmony export */ "DeleteFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DeleteFile,
47061 /* harmony export */ "Diagnostic": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Diagnostic,
47062 /* harmony export */ "DiagnosticRelatedInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticRelatedInformation,
47063 /* harmony export */ "DiagnosticSeverity": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticSeverity,
47064 /* harmony export */ "DiagnosticTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DiagnosticTag,
47065 /* harmony export */ "DocumentHighlight": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlight,
47066 /* harmony export */ "DocumentHighlightKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind,
47067 /* harmony export */ "DocumentLink": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentLink,
47068 /* harmony export */ "DocumentSymbol": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.DocumentSymbol,
47069 /* harmony export */ "EOL": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.EOL,
47070 /* harmony export */ "FoldingRange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FoldingRange,
47071 /* harmony export */ "FoldingRangeKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FoldingRangeKind,
47072 /* harmony export */ "FormattingOptions": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.FormattingOptions,
47073 /* harmony export */ "Hover": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Hover,
47074 /* harmony export */ "InsertReplaceEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.InsertReplaceEdit,
47075 /* harmony export */ "InsertTextFormat": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.InsertTextFormat,
47076 /* harmony export */ "InsertTextMode": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.InsertTextMode,
47077 /* harmony export */ "Location": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Location,
47078 /* harmony export */ "LocationLink": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.LocationLink,
47079 /* harmony export */ "MarkedString": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkedString,
47080 /* harmony export */ "MarkupContent": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupContent,
47081 /* harmony export */ "MarkupKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind,
47082 /* harmony export */ "OptionalVersionedTextDocumentIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.OptionalVersionedTextDocumentIdentifier,
47083 /* harmony export */ "ParameterInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.ParameterInformation,
47084 /* harmony export */ "Position": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Position,
47085 /* harmony export */ "Range": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.Range,
47086 /* harmony export */ "RenameFile": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.RenameFile,
47087 /* harmony export */ "SelectionRange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SelectionRange,
47088 /* harmony export */ "SignatureInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SignatureInformation,
47089 /* harmony export */ "SymbolInformation": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolInformation,
47090 /* harmony export */ "SymbolKind": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolKind,
47091 /* harmony export */ "SymbolTag": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.SymbolTag,
47092 /* harmony export */ "TextDocumentEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentEdit,
47093 /* harmony export */ "TextDocumentIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentIdentifier,
47094 /* harmony export */ "TextDocumentItem": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextDocumentItem,
47095 /* harmony export */ "TextEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.TextEdit,
47096 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.VersionedTextDocumentIdentifier,
47097 /* harmony export */ "WorkspaceChange": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.WorkspaceChange,
47098 /* harmony export */ "WorkspaceEdit": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.WorkspaceEdit,
47099 /* harmony export */ "integer": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.integer,
47100 /* harmony export */ "uinteger": () => /* reexport safe */ vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.uinteger,
47101 /* harmony export */ "TokenType": () => /* binding */ TokenType,
47102 /* harmony export */ "ScannerState": () => /* binding */ ScannerState,
47103 /* harmony export */ "ClientCapabilities": () => /* binding */ ClientCapabilities,
47104 /* harmony export */ "FileType": () => /* binding */ FileType
47105 /* harmony export */ });
47106 /* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(118);
47107 /* harmony import */ var vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90);
47108 /*---------------------------------------------------------------------------------------------
47109 * Copyright (c) Microsoft Corporation. All rights reserved.
47110 * Licensed under the MIT License. See License.txt in the project root for license information.
47111 *--------------------------------------------------------------------------------------------*/
47116 (function (TokenType) {
47117 TokenType[TokenType["StartCommentTag"] = 0] = "StartCommentTag";
47118 TokenType[TokenType["Comment"] = 1] = "Comment";
47119 TokenType[TokenType["EndCommentTag"] = 2] = "EndCommentTag";
47120 TokenType[TokenType["StartTagOpen"] = 3] = "StartTagOpen";
47121 TokenType[TokenType["StartTagClose"] = 4] = "StartTagClose";
47122 TokenType[TokenType["StartTagSelfClose"] = 5] = "StartTagSelfClose";
47123 TokenType[TokenType["StartTag"] = 6] = "StartTag";
47124 TokenType[TokenType["EndTagOpen"] = 7] = "EndTagOpen";
47125 TokenType[TokenType["EndTagClose"] = 8] = "EndTagClose";
47126 TokenType[TokenType["EndTag"] = 9] = "EndTag";
47127 TokenType[TokenType["DelimiterAssign"] = 10] = "DelimiterAssign";
47128 TokenType[TokenType["AttributeName"] = 11] = "AttributeName";
47129 TokenType[TokenType["AttributeValue"] = 12] = "AttributeValue";
47130 TokenType[TokenType["StartDoctypeTag"] = 13] = "StartDoctypeTag";
47131 TokenType[TokenType["Doctype"] = 14] = "Doctype";
47132 TokenType[TokenType["EndDoctypeTag"] = 15] = "EndDoctypeTag";
47133 TokenType[TokenType["Content"] = 16] = "Content";
47134 TokenType[TokenType["Whitespace"] = 17] = "Whitespace";
47135 TokenType[TokenType["Unknown"] = 18] = "Unknown";
47136 TokenType[TokenType["Script"] = 19] = "Script";
47137 TokenType[TokenType["Styles"] = 20] = "Styles";
47138 TokenType[TokenType["EOS"] = 21] = "EOS";
47139 })(TokenType || (TokenType = {}));
47141 (function (ScannerState) {
47142 ScannerState[ScannerState["WithinContent"] = 0] = "WithinContent";
47143 ScannerState[ScannerState["AfterOpeningStartTag"] = 1] = "AfterOpeningStartTag";
47144 ScannerState[ScannerState["AfterOpeningEndTag"] = 2] = "AfterOpeningEndTag";
47145 ScannerState[ScannerState["WithinDoctype"] = 3] = "WithinDoctype";
47146 ScannerState[ScannerState["WithinTag"] = 4] = "WithinTag";
47147 ScannerState[ScannerState["WithinEndTag"] = 5] = "WithinEndTag";
47148 ScannerState[ScannerState["WithinComment"] = 6] = "WithinComment";
47149 ScannerState[ScannerState["WithinScriptContent"] = 7] = "WithinScriptContent";
47150 ScannerState[ScannerState["WithinStyleContent"] = 8] = "WithinStyleContent";
47151 ScannerState[ScannerState["AfterAttributeName"] = 9] = "AfterAttributeName";
47152 ScannerState[ScannerState["BeforeAttributeValue"] = 10] = "BeforeAttributeValue";
47153 })(ScannerState || (ScannerState = {}));
47154 var ClientCapabilities;
47155 (function (ClientCapabilities) {
47156 ClientCapabilities.LATEST = {
47160 documentationFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.PlainText]
47164 contentFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.PlainText]
47168 })(ClientCapabilities || (ClientCapabilities = {}));
47170 (function (FileType) {
47172 * The file type is unknown.
47174 FileType[FileType["Unknown"] = 0] = "Unknown";
47178 FileType[FileType["File"] = 1] = "File";
47182 FileType[FileType["Directory"] = 2] = "Directory";
47184 * A symbolic link to a file.
47186 FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
47187 })(FileType || (FileType = {}));
47192 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
47194 __webpack_require__.r(__webpack_exports__);
47195 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
47196 /* harmony export */ "integer": () => /* binding */ integer,
47197 /* harmony export */ "uinteger": () => /* binding */ uinteger,
47198 /* harmony export */ "Position": () => /* binding */ Position,
47199 /* harmony export */ "Range": () => /* binding */ Range,
47200 /* harmony export */ "Location": () => /* binding */ Location,
47201 /* harmony export */ "LocationLink": () => /* binding */ LocationLink,
47202 /* harmony export */ "Color": () => /* binding */ Color,
47203 /* harmony export */ "ColorInformation": () => /* binding */ ColorInformation,
47204 /* harmony export */ "ColorPresentation": () => /* binding */ ColorPresentation,
47205 /* harmony export */ "FoldingRangeKind": () => /* binding */ FoldingRangeKind,
47206 /* harmony export */ "FoldingRange": () => /* binding */ FoldingRange,
47207 /* harmony export */ "DiagnosticRelatedInformation": () => /* binding */ DiagnosticRelatedInformation,
47208 /* harmony export */ "DiagnosticSeverity": () => /* binding */ DiagnosticSeverity,
47209 /* harmony export */ "DiagnosticTag": () => /* binding */ DiagnosticTag,
47210 /* harmony export */ "CodeDescription": () => /* binding */ CodeDescription,
47211 /* harmony export */ "Diagnostic": () => /* binding */ Diagnostic,
47212 /* harmony export */ "Command": () => /* binding */ Command,
47213 /* harmony export */ "TextEdit": () => /* binding */ TextEdit,
47214 /* harmony export */ "ChangeAnnotation": () => /* binding */ ChangeAnnotation,
47215 /* harmony export */ "ChangeAnnotationIdentifier": () => /* binding */ ChangeAnnotationIdentifier,
47216 /* harmony export */ "AnnotatedTextEdit": () => /* binding */ AnnotatedTextEdit,
47217 /* harmony export */ "TextDocumentEdit": () => /* binding */ TextDocumentEdit,
47218 /* harmony export */ "CreateFile": () => /* binding */ CreateFile,
47219 /* harmony export */ "RenameFile": () => /* binding */ RenameFile,
47220 /* harmony export */ "DeleteFile": () => /* binding */ DeleteFile,
47221 /* harmony export */ "WorkspaceEdit": () => /* binding */ WorkspaceEdit,
47222 /* harmony export */ "WorkspaceChange": () => /* binding */ WorkspaceChange,
47223 /* harmony export */ "TextDocumentIdentifier": () => /* binding */ TextDocumentIdentifier,
47224 /* harmony export */ "VersionedTextDocumentIdentifier": () => /* binding */ VersionedTextDocumentIdentifier,
47225 /* harmony export */ "OptionalVersionedTextDocumentIdentifier": () => /* binding */ OptionalVersionedTextDocumentIdentifier,
47226 /* harmony export */ "TextDocumentItem": () => /* binding */ TextDocumentItem,
47227 /* harmony export */ "MarkupKind": () => /* binding */ MarkupKind,
47228 /* harmony export */ "MarkupContent": () => /* binding */ MarkupContent,
47229 /* harmony export */ "CompletionItemKind": () => /* binding */ CompletionItemKind,
47230 /* harmony export */ "InsertTextFormat": () => /* binding */ InsertTextFormat,
47231 /* harmony export */ "CompletionItemTag": () => /* binding */ CompletionItemTag,
47232 /* harmony export */ "InsertReplaceEdit": () => /* binding */ InsertReplaceEdit,
47233 /* harmony export */ "InsertTextMode": () => /* binding */ InsertTextMode,
47234 /* harmony export */ "CompletionItem": () => /* binding */ CompletionItem,
47235 /* harmony export */ "CompletionList": () => /* binding */ CompletionList,
47236 /* harmony export */ "MarkedString": () => /* binding */ MarkedString,
47237 /* harmony export */ "Hover": () => /* binding */ Hover,
47238 /* harmony export */ "ParameterInformation": () => /* binding */ ParameterInformation,
47239 /* harmony export */ "SignatureInformation": () => /* binding */ SignatureInformation,
47240 /* harmony export */ "DocumentHighlightKind": () => /* binding */ DocumentHighlightKind,
47241 /* harmony export */ "DocumentHighlight": () => /* binding */ DocumentHighlight,
47242 /* harmony export */ "SymbolKind": () => /* binding */ SymbolKind,
47243 /* harmony export */ "SymbolTag": () => /* binding */ SymbolTag,
47244 /* harmony export */ "SymbolInformation": () => /* binding */ SymbolInformation,
47245 /* harmony export */ "DocumentSymbol": () => /* binding */ DocumentSymbol,
47246 /* harmony export */ "CodeActionKind": () => /* binding */ CodeActionKind,
47247 /* harmony export */ "CodeActionContext": () => /* binding */ CodeActionContext,
47248 /* harmony export */ "CodeAction": () => /* binding */ CodeAction,
47249 /* harmony export */ "CodeLens": () => /* binding */ CodeLens,
47250 /* harmony export */ "FormattingOptions": () => /* binding */ FormattingOptions,
47251 /* harmony export */ "DocumentLink": () => /* binding */ DocumentLink,
47252 /* harmony export */ "SelectionRange": () => /* binding */ SelectionRange,
47253 /* harmony export */ "EOL": () => /* binding */ EOL,
47254 /* harmony export */ "TextDocument": () => /* binding */ TextDocument
47255 /* harmony export */ });
47256 /* --------------------------------------------------------------------------------------------
47257 * Copyright (c) Microsoft Corporation. All rights reserved.
47258 * Licensed under the MIT License. See License.txt in the project root for license information.
47259 * ------------------------------------------------------------------------------------------ */
47262 (function (integer) {
47263 integer.MIN_VALUE = -2147483648;
47264 integer.MAX_VALUE = 2147483647;
47265 })(integer || (integer = {}));
47267 (function (uinteger) {
47268 uinteger.MIN_VALUE = 0;
47269 uinteger.MAX_VALUE = 2147483647;
47270 })(uinteger || (uinteger = {}));
47272 * The Position namespace provides helper functions to work with
47273 * [Position](#Position) literals.
47276 (function (Position) {
47278 * Creates a new Position literal from the given line and character.
47279 * @param line The position's line.
47280 * @param character The position's character.
47282 function create(line, character) {
47283 if (line === Number.MAX_VALUE) {
47284 line = uinteger.MAX_VALUE;
47286 if (character === Number.MAX_VALUE) {
47287 character = uinteger.MAX_VALUE;
47289 return { line: line, character: character };
47291 Position.create = create;
47293 * Checks whether the given literal conforms to the [Position](#Position) interface.
47295 function is(value) {
47296 var candidate = value;
47297 return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
47300 })(Position || (Position = {}));
47302 * The Range namespace provides helper functions to work with
47303 * [Range](#Range) literals.
47306 (function (Range) {
47307 function create(one, two, three, four) {
47308 if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
47309 return { start: Position.create(one, two), end: Position.create(three, four) };
47311 else if (Position.is(one) && Position.is(two)) {
47312 return { start: one, end: two };
47315 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
47318 Range.create = create;
47320 * Checks whether the given literal conforms to the [Range](#Range) interface.
47322 function is(value) {
47323 var candidate = value;
47324 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
47327 })(Range || (Range = {}));
47329 * The Location namespace provides helper functions to work with
47330 * [Location](#Location) literals.
47333 (function (Location) {
47335 * Creates a Location literal.
47336 * @param uri The location's uri.
47337 * @param range The location's range.
47339 function create(uri, range) {
47340 return { uri: uri, range: range };
47342 Location.create = create;
47344 * Checks whether the given literal conforms to the [Location](#Location) interface.
47346 function is(value) {
47347 var candidate = value;
47348 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
47351 })(Location || (Location = {}));
47353 * The LocationLink namespace provides helper functions to work with
47354 * [LocationLink](#LocationLink) literals.
47357 (function (LocationLink) {
47359 * Creates a LocationLink literal.
47360 * @param targetUri The definition's uri.
47361 * @param targetRange The full range of the definition.
47362 * @param targetSelectionRange The span of the symbol definition at the target.
47363 * @param originSelectionRange The span of the symbol being defined in the originating source file.
47365 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
47366 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
47368 LocationLink.create = create;
47370 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
47372 function is(value) {
47373 var candidate = value;
47374 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
47375 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
47376 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
47378 LocationLink.is = is;
47379 })(LocationLink || (LocationLink = {}));
47381 * The Color namespace provides helper functions to work with
47382 * [Color](#Color) literals.
47385 (function (Color) {
47387 * Creates a new Color literal.
47389 function create(red, green, blue, alpha) {
47397 Color.create = create;
47399 * Checks whether the given literal conforms to the [Color](#Color) interface.
47401 function is(value) {
47402 var candidate = value;
47403 return Is.numberRange(candidate.red, 0, 1)
47404 && Is.numberRange(candidate.green, 0, 1)
47405 && Is.numberRange(candidate.blue, 0, 1)
47406 && Is.numberRange(candidate.alpha, 0, 1);
47409 })(Color || (Color = {}));
47411 * The ColorInformation namespace provides helper functions to work with
47412 * [ColorInformation](#ColorInformation) literals.
47414 var ColorInformation;
47415 (function (ColorInformation) {
47417 * Creates a new ColorInformation literal.
47419 function create(range, color) {
47425 ColorInformation.create = create;
47427 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
47429 function is(value) {
47430 var candidate = value;
47431 return Range.is(candidate.range) && Color.is(candidate.color);
47433 ColorInformation.is = is;
47434 })(ColorInformation || (ColorInformation = {}));
47436 * The Color namespace provides helper functions to work with
47437 * [ColorPresentation](#ColorPresentation) literals.
47439 var ColorPresentation;
47440 (function (ColorPresentation) {
47442 * Creates a new ColorInformation literal.
47444 function create(label, textEdit, additionalTextEdits) {
47447 textEdit: textEdit,
47448 additionalTextEdits: additionalTextEdits,
47451 ColorPresentation.create = create;
47453 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
47455 function is(value) {
47456 var candidate = value;
47457 return Is.string(candidate.label)
47458 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
47459 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
47461 ColorPresentation.is = is;
47462 })(ColorPresentation || (ColorPresentation = {}));
47464 * Enum of known range kinds
47466 var FoldingRangeKind;
47467 (function (FoldingRangeKind) {
47469 * Folding range for a comment
47471 FoldingRangeKind["Comment"] = "comment";
47473 * Folding range for a imports or includes
47475 FoldingRangeKind["Imports"] = "imports";
47477 * Folding range for a region (e.g. `#region`)
47479 FoldingRangeKind["Region"] = "region";
47480 })(FoldingRangeKind || (FoldingRangeKind = {}));
47482 * The folding range namespace provides helper functions to work with
47483 * [FoldingRange](#FoldingRange) literals.
47486 (function (FoldingRange) {
47488 * Creates a new FoldingRange literal.
47490 function create(startLine, endLine, startCharacter, endCharacter, kind) {
47492 startLine: startLine,
47495 if (Is.defined(startCharacter)) {
47496 result.startCharacter = startCharacter;
47498 if (Is.defined(endCharacter)) {
47499 result.endCharacter = endCharacter;
47501 if (Is.defined(kind)) {
47502 result.kind = kind;
47506 FoldingRange.create = create;
47508 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
47510 function is(value) {
47511 var candidate = value;
47512 return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
47513 && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
47514 && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
47515 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
47517 FoldingRange.is = is;
47518 })(FoldingRange || (FoldingRange = {}));
47520 * The DiagnosticRelatedInformation namespace provides helper functions to work with
47521 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
47523 var DiagnosticRelatedInformation;
47524 (function (DiagnosticRelatedInformation) {
47526 * Creates a new DiagnosticRelatedInformation literal.
47528 function create(location, message) {
47530 location: location,
47534 DiagnosticRelatedInformation.create = create;
47536 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
47538 function is(value) {
47539 var candidate = value;
47540 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
47542 DiagnosticRelatedInformation.is = is;
47543 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
47545 * The diagnostic's severity.
47547 var DiagnosticSeverity;
47548 (function (DiagnosticSeverity) {
47550 * Reports an error.
47552 DiagnosticSeverity.Error = 1;
47554 * Reports a warning.
47556 DiagnosticSeverity.Warning = 2;
47558 * Reports an information.
47560 DiagnosticSeverity.Information = 3;
47564 DiagnosticSeverity.Hint = 4;
47565 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
47567 * The diagnostic tags.
47572 (function (DiagnosticTag) {
47574 * Unused or unnecessary code.
47576 * Clients are allowed to render diagnostics with this tag faded out instead of having
47577 * an error squiggle.
47579 DiagnosticTag.Unnecessary = 1;
47581 * Deprecated or obsolete code.
47583 * Clients are allowed to rendered diagnostics with this tag strike through.
47585 DiagnosticTag.Deprecated = 2;
47586 })(DiagnosticTag || (DiagnosticTag = {}));
47588 * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
47592 var CodeDescription;
47593 (function (CodeDescription) {
47594 function is(value) {
47595 var candidate = value;
47596 return candidate !== undefined && candidate !== null && Is.string(candidate.href);
47598 CodeDescription.is = is;
47599 })(CodeDescription || (CodeDescription = {}));
47601 * The Diagnostic namespace provides helper functions to work with
47602 * [Diagnostic](#Diagnostic) literals.
47605 (function (Diagnostic) {
47607 * Creates a new Diagnostic literal.
47609 function create(range, message, severity, code, source, relatedInformation) {
47610 var result = { range: range, message: message };
47611 if (Is.defined(severity)) {
47612 result.severity = severity;
47614 if (Is.defined(code)) {
47615 result.code = code;
47617 if (Is.defined(source)) {
47618 result.source = source;
47620 if (Is.defined(relatedInformation)) {
47621 result.relatedInformation = relatedInformation;
47625 Diagnostic.create = create;
47627 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
47629 function is(value) {
47631 var candidate = value;
47632 return Is.defined(candidate)
47633 && Range.is(candidate.range)
47634 && Is.string(candidate.message)
47635 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
47636 && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
47637 && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
47638 && (Is.string(candidate.source) || Is.undefined(candidate.source))
47639 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
47641 Diagnostic.is = is;
47642 })(Diagnostic || (Diagnostic = {}));
47644 * The Command namespace provides helper functions to work with
47645 * [Command](#Command) literals.
47648 (function (Command) {
47650 * Creates a new Command literal.
47652 function create(title, command) {
47654 for (var _i = 2; _i < arguments.length; _i++) {
47655 args[_i - 2] = arguments[_i];
47657 var result = { title: title, command: command };
47658 if (Is.defined(args) && args.length > 0) {
47659 result.arguments = args;
47663 Command.create = create;
47665 * Checks whether the given literal conforms to the [Command](#Command) interface.
47667 function is(value) {
47668 var candidate = value;
47669 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
47672 })(Command || (Command = {}));
47674 * The TextEdit namespace provides helper function to create replace,
47675 * insert and delete edits more easily.
47678 (function (TextEdit) {
47680 * Creates a replace text edit.
47681 * @param range The range of text to be replaced.
47682 * @param newText The new text.
47684 function replace(range, newText) {
47685 return { range: range, newText: newText };
47687 TextEdit.replace = replace;
47689 * Creates a insert text edit.
47690 * @param position The position to insert the text at.
47691 * @param newText The text to be inserted.
47693 function insert(position, newText) {
47694 return { range: { start: position, end: position }, newText: newText };
47696 TextEdit.insert = insert;
47698 * Creates a delete text edit.
47699 * @param range The range of text to be deleted.
47701 function del(range) {
47702 return { range: range, newText: '' };
47704 TextEdit.del = del;
47705 function is(value) {
47706 var candidate = value;
47707 return Is.objectLiteral(candidate)
47708 && Is.string(candidate.newText)
47709 && Range.is(candidate.range);
47712 })(TextEdit || (TextEdit = {}));
47713 var ChangeAnnotation;
47714 (function (ChangeAnnotation) {
47715 function create(label, needsConfirmation, description) {
47716 var result = { label: label };
47717 if (needsConfirmation !== undefined) {
47718 result.needsConfirmation = needsConfirmation;
47720 if (description !== undefined) {
47721 result.description = description;
47725 ChangeAnnotation.create = create;
47726 function is(value) {
47727 var candidate = value;
47728 return candidate !== undefined && Is.objectLiteral(candidate) && Is.string(candidate.label) &&
47729 (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
47730 (Is.string(candidate.description) || candidate.description === undefined);
47732 ChangeAnnotation.is = is;
47733 })(ChangeAnnotation || (ChangeAnnotation = {}));
47734 var ChangeAnnotationIdentifier;
47735 (function (ChangeAnnotationIdentifier) {
47736 function is(value) {
47737 var candidate = value;
47738 return typeof candidate === 'string';
47740 ChangeAnnotationIdentifier.is = is;
47741 })(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
47742 var AnnotatedTextEdit;
47743 (function (AnnotatedTextEdit) {
47745 * Creates an annotated replace text edit.
47747 * @param range The range of text to be replaced.
47748 * @param newText The new text.
47749 * @param annotation The annotation.
47751 function replace(range, newText, annotation) {
47752 return { range: range, newText: newText, annotationId: annotation };
47754 AnnotatedTextEdit.replace = replace;
47756 * Creates an annotated insert text edit.
47758 * @param position The position to insert the text at.
47759 * @param newText The text to be inserted.
47760 * @param annotation The annotation.
47762 function insert(position, newText, annotation) {
47763 return { range: { start: position, end: position }, newText: newText, annotationId: annotation };
47765 AnnotatedTextEdit.insert = insert;
47767 * Creates an annotated delete text edit.
47769 * @param range The range of text to be deleted.
47770 * @param annotation The annotation.
47772 function del(range, annotation) {
47773 return { range: range, newText: '', annotationId: annotation };
47775 AnnotatedTextEdit.del = del;
47776 function is(value) {
47777 var candidate = value;
47778 return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
47780 AnnotatedTextEdit.is = is;
47781 })(AnnotatedTextEdit || (AnnotatedTextEdit = {}));
47783 * The TextDocumentEdit namespace provides helper function to create
47784 * an edit that manipulates a text document.
47786 var TextDocumentEdit;
47787 (function (TextDocumentEdit) {
47789 * Creates a new `TextDocumentEdit`
47791 function create(textDocument, edits) {
47792 return { textDocument: textDocument, edits: edits };
47794 TextDocumentEdit.create = create;
47795 function is(value) {
47796 var candidate = value;
47797 return Is.defined(candidate)
47798 && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
47799 && Array.isArray(candidate.edits);
47801 TextDocumentEdit.is = is;
47802 })(TextDocumentEdit || (TextDocumentEdit = {}));
47804 (function (CreateFile) {
47805 function create(uri, options, annotation) {
47810 if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
47811 result.options = options;
47813 if (annotation !== undefined) {
47814 result.annotationId = annotation;
47818 CreateFile.create = create;
47819 function is(value) {
47820 var candidate = value;
47821 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
47822 ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
47824 CreateFile.is = is;
47825 })(CreateFile || (CreateFile = {}));
47827 (function (RenameFile) {
47828 function create(oldUri, newUri, options, annotation) {
47834 if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
47835 result.options = options;
47837 if (annotation !== undefined) {
47838 result.annotationId = annotation;
47842 RenameFile.create = create;
47843 function is(value) {
47844 var candidate = value;
47845 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
47846 ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
47848 RenameFile.is = is;
47849 })(RenameFile || (RenameFile = {}));
47851 (function (DeleteFile) {
47852 function create(uri, options, annotation) {
47857 if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
47858 result.options = options;
47860 if (annotation !== undefined) {
47861 result.annotationId = annotation;
47865 DeleteFile.create = create;
47866 function is(value) {
47867 var candidate = value;
47868 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
47869 ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
47871 DeleteFile.is = is;
47872 })(DeleteFile || (DeleteFile = {}));
47874 (function (WorkspaceEdit) {
47875 function is(value) {
47876 var candidate = value;
47877 return candidate &&
47878 (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
47879 (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
47880 if (Is.string(change.kind)) {
47881 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
47884 return TextDocumentEdit.is(change);
47888 WorkspaceEdit.is = is;
47889 })(WorkspaceEdit || (WorkspaceEdit = {}));
47890 var TextEditChangeImpl = /** @class */ (function () {
47891 function TextEditChangeImpl(edits, changeAnnotations) {
47892 this.edits = edits;
47893 this.changeAnnotations = changeAnnotations;
47895 TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
47898 if (annotation === undefined) {
47899 edit = TextEdit.insert(position, newText);
47901 else if (ChangeAnnotationIdentifier.is(annotation)) {
47903 edit = AnnotatedTextEdit.insert(position, newText, annotation);
47906 this.assertChangeAnnotations(this.changeAnnotations);
47907 id = this.changeAnnotations.manage(annotation);
47908 edit = AnnotatedTextEdit.insert(position, newText, id);
47910 this.edits.push(edit);
47911 if (id !== undefined) {
47915 TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
47918 if (annotation === undefined) {
47919 edit = TextEdit.replace(range, newText);
47921 else if (ChangeAnnotationIdentifier.is(annotation)) {
47923 edit = AnnotatedTextEdit.replace(range, newText, annotation);
47926 this.assertChangeAnnotations(this.changeAnnotations);
47927 id = this.changeAnnotations.manage(annotation);
47928 edit = AnnotatedTextEdit.replace(range, newText, id);
47930 this.edits.push(edit);
47931 if (id !== undefined) {
47935 TextEditChangeImpl.prototype.delete = function (range, annotation) {
47938 if (annotation === undefined) {
47939 edit = TextEdit.del(range);
47941 else if (ChangeAnnotationIdentifier.is(annotation)) {
47943 edit = AnnotatedTextEdit.del(range, annotation);
47946 this.assertChangeAnnotations(this.changeAnnotations);
47947 id = this.changeAnnotations.manage(annotation);
47948 edit = AnnotatedTextEdit.del(range, id);
47950 this.edits.push(edit);
47951 if (id !== undefined) {
47955 TextEditChangeImpl.prototype.add = function (edit) {
47956 this.edits.push(edit);
47958 TextEditChangeImpl.prototype.all = function () {
47961 TextEditChangeImpl.prototype.clear = function () {
47962 this.edits.splice(0, this.edits.length);
47964 TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
47965 if (value === undefined) {
47966 throw new Error("Text edit change is not configured to manage change annotations.");
47969 return TextEditChangeImpl;
47974 var ChangeAnnotations = /** @class */ (function () {
47975 function ChangeAnnotations(annotations) {
47976 this._annotations = annotations === undefined ? Object.create(null) : annotations;
47980 ChangeAnnotations.prototype.all = function () {
47981 return this._annotations;
47983 Object.defineProperty(ChangeAnnotations.prototype, "size", {
47990 ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
47992 if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
47993 id = idOrAnnotation;
47996 id = this.nextId();
47997 annotation = idOrAnnotation;
47999 if (this._annotations[id] !== undefined) {
48000 throw new Error("Id " + id + " is already in use.");
48002 if (annotation === undefined) {
48003 throw new Error("No annotation provided for id " + id);
48005 this._annotations[id] = annotation;
48009 ChangeAnnotations.prototype.nextId = function () {
48011 return this._counter.toString();
48013 return ChangeAnnotations;
48016 * A workspace change helps constructing changes to a workspace.
48018 var WorkspaceChange = /** @class */ (function () {
48019 function WorkspaceChange(workspaceEdit) {
48021 this._textEditChanges = Object.create(null);
48022 if (workspaceEdit !== undefined) {
48023 this._workspaceEdit = workspaceEdit;
48024 if (workspaceEdit.documentChanges) {
48025 this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
48026 workspaceEdit.changeAnnotations = this._changeAnnotations.all();
48027 workspaceEdit.documentChanges.forEach(function (change) {
48028 if (TextDocumentEdit.is(change)) {
48029 var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
48030 _this._textEditChanges[change.textDocument.uri] = textEditChange;
48034 else if (workspaceEdit.changes) {
48035 Object.keys(workspaceEdit.changes).forEach(function (key) {
48036 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
48037 _this._textEditChanges[key] = textEditChange;
48042 this._workspaceEdit = {};
48045 Object.defineProperty(WorkspaceChange.prototype, "edit", {
48047 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
48048 * use to be returned from a workspace edit operation like rename.
48051 this.initDocumentChanges();
48052 if (this._changeAnnotations !== undefined) {
48053 if (this._changeAnnotations.size === 0) {
48054 this._workspaceEdit.changeAnnotations = undefined;
48057 this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
48060 return this._workspaceEdit;
48065 WorkspaceChange.prototype.getTextEditChange = function (key) {
48066 if (OptionalVersionedTextDocumentIdentifier.is(key)) {
48067 this.initDocumentChanges();
48068 if (this._workspaceEdit.documentChanges === undefined) {
48069 throw new Error('Workspace edit is not configured for document changes.');
48071 var textDocument = { uri: key.uri, version: key.version };
48072 var result = this._textEditChanges[textDocument.uri];
48075 var textDocumentEdit = {
48076 textDocument: textDocument,
48079 this._workspaceEdit.documentChanges.push(textDocumentEdit);
48080 result = new TextEditChangeImpl(edits, this._changeAnnotations);
48081 this._textEditChanges[textDocument.uri] = result;
48086 this.initChanges();
48087 if (this._workspaceEdit.changes === undefined) {
48088 throw new Error('Workspace edit is not configured for normal text edit changes.');
48090 var result = this._textEditChanges[key];
48093 this._workspaceEdit.changes[key] = edits;
48094 result = new TextEditChangeImpl(edits);
48095 this._textEditChanges[key] = result;
48100 WorkspaceChange.prototype.initDocumentChanges = function () {
48101 if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
48102 this._changeAnnotations = new ChangeAnnotations();
48103 this._workspaceEdit.documentChanges = [];
48104 this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
48107 WorkspaceChange.prototype.initChanges = function () {
48108 if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
48109 this._workspaceEdit.changes = Object.create(null);
48112 WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
48113 this.initDocumentChanges();
48114 if (this._workspaceEdit.documentChanges === undefined) {
48115 throw new Error('Workspace edit is not configured for document changes.');
48118 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
48119 annotation = optionsOrAnnotation;
48122 options = optionsOrAnnotation;
48126 if (annotation === undefined) {
48127 operation = CreateFile.create(uri, options);
48130 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
48131 operation = CreateFile.create(uri, options, id);
48133 this._workspaceEdit.documentChanges.push(operation);
48134 if (id !== undefined) {
48138 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
48139 this.initDocumentChanges();
48140 if (this._workspaceEdit.documentChanges === undefined) {
48141 throw new Error('Workspace edit is not configured for document changes.');
48144 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
48145 annotation = optionsOrAnnotation;
48148 options = optionsOrAnnotation;
48152 if (annotation === undefined) {
48153 operation = RenameFile.create(oldUri, newUri, options);
48156 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
48157 operation = RenameFile.create(oldUri, newUri, options, id);
48159 this._workspaceEdit.documentChanges.push(operation);
48160 if (id !== undefined) {
48164 WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
48165 this.initDocumentChanges();
48166 if (this._workspaceEdit.documentChanges === undefined) {
48167 throw new Error('Workspace edit is not configured for document changes.');
48170 if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
48171 annotation = optionsOrAnnotation;
48174 options = optionsOrAnnotation;
48178 if (annotation === undefined) {
48179 operation = DeleteFile.create(uri, options);
48182 id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
48183 operation = DeleteFile.create(uri, options, id);
48185 this._workspaceEdit.documentChanges.push(operation);
48186 if (id !== undefined) {
48190 return WorkspaceChange;
48194 * The TextDocumentIdentifier namespace provides helper functions to work with
48195 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
48197 var TextDocumentIdentifier;
48198 (function (TextDocumentIdentifier) {
48200 * Creates a new TextDocumentIdentifier literal.
48201 * @param uri The document's uri.
48203 function create(uri) {
48204 return { uri: uri };
48206 TextDocumentIdentifier.create = create;
48208 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
48210 function is(value) {
48211 var candidate = value;
48212 return Is.defined(candidate) && Is.string(candidate.uri);
48214 TextDocumentIdentifier.is = is;
48215 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
48217 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
48218 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
48220 var VersionedTextDocumentIdentifier;
48221 (function (VersionedTextDocumentIdentifier) {
48223 * Creates a new VersionedTextDocumentIdentifier literal.
48224 * @param uri The document's uri.
48225 * @param uri The document's text.
48227 function create(uri, version) {
48228 return { uri: uri, version: version };
48230 VersionedTextDocumentIdentifier.create = create;
48232 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
48234 function is(value) {
48235 var candidate = value;
48236 return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
48238 VersionedTextDocumentIdentifier.is = is;
48239 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
48241 * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
48242 * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.
48244 var OptionalVersionedTextDocumentIdentifier;
48245 (function (OptionalVersionedTextDocumentIdentifier) {
48247 * Creates a new OptionalVersionedTextDocumentIdentifier literal.
48248 * @param uri The document's uri.
48249 * @param uri The document's text.
48251 function create(uri, version) {
48252 return { uri: uri, version: version };
48254 OptionalVersionedTextDocumentIdentifier.create = create;
48256 * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.
48258 function is(value) {
48259 var candidate = value;
48260 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
48262 OptionalVersionedTextDocumentIdentifier.is = is;
48263 })(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
48265 * The TextDocumentItem namespace provides helper functions to work with
48266 * [TextDocumentItem](#TextDocumentItem) literals.
48268 var TextDocumentItem;
48269 (function (TextDocumentItem) {
48271 * Creates a new TextDocumentItem literal.
48272 * @param uri The document's uri.
48273 * @param languageId The document's language identifier.
48274 * @param version The document's version number.
48275 * @param text The document's text.
48277 function create(uri, languageId, version, text) {
48278 return { uri: uri, languageId: languageId, version: version, text: text };
48280 TextDocumentItem.create = create;
48282 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
48284 function is(value) {
48285 var candidate = value;
48286 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
48288 TextDocumentItem.is = is;
48289 })(TextDocumentItem || (TextDocumentItem = {}));
48291 * Describes the content type that a client supports in various
48292 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
48294 * Please note that `MarkupKinds` must not start with a `$`. This kinds
48295 * are reserved for internal usage.
48298 (function (MarkupKind) {
48300 * Plain text is supported as a content format
48302 MarkupKind.PlainText = 'plaintext';
48304 * Markdown is supported as a content format
48306 MarkupKind.Markdown = 'markdown';
48307 })(MarkupKind || (MarkupKind = {}));
48308 (function (MarkupKind) {
48310 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
48312 function is(value) {
48313 var candidate = value;
48314 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
48316 MarkupKind.is = is;
48317 })(MarkupKind || (MarkupKind = {}));
48319 (function (MarkupContent) {
48321 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
48323 function is(value) {
48324 var candidate = value;
48325 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
48327 MarkupContent.is = is;
48328 })(MarkupContent || (MarkupContent = {}));
48330 * The kind of a completion entry.
48332 var CompletionItemKind;
48333 (function (CompletionItemKind) {
48334 CompletionItemKind.Text = 1;
48335 CompletionItemKind.Method = 2;
48336 CompletionItemKind.Function = 3;
48337 CompletionItemKind.Constructor = 4;
48338 CompletionItemKind.Field = 5;
48339 CompletionItemKind.Variable = 6;
48340 CompletionItemKind.Class = 7;
48341 CompletionItemKind.Interface = 8;
48342 CompletionItemKind.Module = 9;
48343 CompletionItemKind.Property = 10;
48344 CompletionItemKind.Unit = 11;
48345 CompletionItemKind.Value = 12;
48346 CompletionItemKind.Enum = 13;
48347 CompletionItemKind.Keyword = 14;
48348 CompletionItemKind.Snippet = 15;
48349 CompletionItemKind.Color = 16;
48350 CompletionItemKind.File = 17;
48351 CompletionItemKind.Reference = 18;
48352 CompletionItemKind.Folder = 19;
48353 CompletionItemKind.EnumMember = 20;
48354 CompletionItemKind.Constant = 21;
48355 CompletionItemKind.Struct = 22;
48356 CompletionItemKind.Event = 23;
48357 CompletionItemKind.Operator = 24;
48358 CompletionItemKind.TypeParameter = 25;
48359 })(CompletionItemKind || (CompletionItemKind = {}));
48361 * Defines whether the insert text in a completion item should be interpreted as
48362 * plain text or a snippet.
48364 var InsertTextFormat;
48365 (function (InsertTextFormat) {
48367 * The primary text to be inserted is treated as a plain string.
48369 InsertTextFormat.PlainText = 1;
48371 * The primary text to be inserted is treated as a snippet.
48373 * A snippet can define tab stops and placeholders with `$1`, `$2`
48374 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
48375 * the end of the snippet. Placeholders with equal identifiers are linked,
48376 * that is typing in one will update others too.
48378 * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
48380 InsertTextFormat.Snippet = 2;
48381 })(InsertTextFormat || (InsertTextFormat = {}));
48383 * Completion item tags are extra annotations that tweak the rendering of a completion
48388 var CompletionItemTag;
48389 (function (CompletionItemTag) {
48391 * Render a completion as obsolete, usually using a strike-out.
48393 CompletionItemTag.Deprecated = 1;
48394 })(CompletionItemTag || (CompletionItemTag = {}));
48396 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
48400 var InsertReplaceEdit;
48401 (function (InsertReplaceEdit) {
48403 * Creates a new insert / replace edit
48405 function create(newText, insert, replace) {
48406 return { newText: newText, insert: insert, replace: replace };
48408 InsertReplaceEdit.create = create;
48410 * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
48412 function is(value) {
48413 var candidate = value;
48414 return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
48416 InsertReplaceEdit.is = is;
48417 })(InsertReplaceEdit || (InsertReplaceEdit = {}));
48419 * How whitespace and indentation is handled during completion
48424 var InsertTextMode;
48425 (function (InsertTextMode) {
48427 * The insertion or replace strings is taken as it is. If the
48428 * value is multi line the lines below the cursor will be
48429 * inserted using the indentation defined in the string value.
48430 * The client will not apply any kind of adjustments to the
48433 InsertTextMode.asIs = 1;
48435 * The editor adjusts leading whitespace of new lines so that
48436 * they match the indentation up to the cursor of the line for
48437 * which the item is accepted.
48439 * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
48440 * multi line completion item is indented using 2 tabs and all
48441 * following lines inserted will be indented using 2 tabs as well.
48443 InsertTextMode.adjustIndentation = 2;
48444 })(InsertTextMode || (InsertTextMode = {}));
48446 * The CompletionItem namespace provides functions to deal with
48447 * completion items.
48449 var CompletionItem;
48450 (function (CompletionItem) {
48452 * Create a completion item and seed it with a label.
48453 * @param label The completion item's label
48455 function create(label) {
48456 return { label: label };
48458 CompletionItem.create = create;
48459 })(CompletionItem || (CompletionItem = {}));
48461 * The CompletionList namespace provides functions to deal with
48462 * completion lists.
48464 var CompletionList;
48465 (function (CompletionList) {
48467 * Creates a new completion list.
48469 * @param items The completion items.
48470 * @param isIncomplete The list is not complete.
48472 function create(items, isIncomplete) {
48473 return { items: items ? items : [], isIncomplete: !!isIncomplete };
48475 CompletionList.create = create;
48476 })(CompletionList || (CompletionList = {}));
48478 (function (MarkedString) {
48480 * Creates a marked string from plain text.
48482 * @param plainText The plain text.
48484 function fromPlainText(plainText) {
48485 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
48487 MarkedString.fromPlainText = fromPlainText;
48489 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
48491 function is(value) {
48492 var candidate = value;
48493 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
48495 MarkedString.is = is;
48496 })(MarkedString || (MarkedString = {}));
48498 (function (Hover) {
48500 * Checks whether the given value conforms to the [Hover](#Hover) interface.
48502 function is(value) {
48503 var candidate = value;
48504 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
48505 MarkedString.is(candidate.contents) ||
48506 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
48509 })(Hover || (Hover = {}));
48511 * The ParameterInformation namespace provides helper functions to work with
48512 * [ParameterInformation](#ParameterInformation) literals.
48514 var ParameterInformation;
48515 (function (ParameterInformation) {
48517 * Creates a new parameter information literal.
48519 * @param label A label string.
48520 * @param documentation A doc string.
48522 function create(label, documentation) {
48523 return documentation ? { label: label, documentation: documentation } : { label: label };
48525 ParameterInformation.create = create;
48526 })(ParameterInformation || (ParameterInformation = {}));
48528 * The SignatureInformation namespace provides helper functions to work with
48529 * [SignatureInformation](#SignatureInformation) literals.
48531 var SignatureInformation;
48532 (function (SignatureInformation) {
48533 function create(label, documentation) {
48534 var parameters = [];
48535 for (var _i = 2; _i < arguments.length; _i++) {
48536 parameters[_i - 2] = arguments[_i];
48538 var result = { label: label };
48539 if (Is.defined(documentation)) {
48540 result.documentation = documentation;
48542 if (Is.defined(parameters)) {
48543 result.parameters = parameters;
48546 result.parameters = [];
48550 SignatureInformation.create = create;
48551 })(SignatureInformation || (SignatureInformation = {}));
48553 * A document highlight kind.
48555 var DocumentHighlightKind;
48556 (function (DocumentHighlightKind) {
48558 * A textual occurrence.
48560 DocumentHighlightKind.Text = 1;
48562 * Read-access of a symbol, like reading a variable.
48564 DocumentHighlightKind.Read = 2;
48566 * Write-access of a symbol, like writing to a variable.
48568 DocumentHighlightKind.Write = 3;
48569 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
48571 * DocumentHighlight namespace to provide helper functions to work with
48572 * [DocumentHighlight](#DocumentHighlight) literals.
48574 var DocumentHighlight;
48575 (function (DocumentHighlight) {
48577 * Create a DocumentHighlight object.
48578 * @param range The range the highlight applies to.
48580 function create(range, kind) {
48581 var result = { range: range };
48582 if (Is.number(kind)) {
48583 result.kind = kind;
48587 DocumentHighlight.create = create;
48588 })(DocumentHighlight || (DocumentHighlight = {}));
48593 (function (SymbolKind) {
48594 SymbolKind.File = 1;
48595 SymbolKind.Module = 2;
48596 SymbolKind.Namespace = 3;
48597 SymbolKind.Package = 4;
48598 SymbolKind.Class = 5;
48599 SymbolKind.Method = 6;
48600 SymbolKind.Property = 7;
48601 SymbolKind.Field = 8;
48602 SymbolKind.Constructor = 9;
48603 SymbolKind.Enum = 10;
48604 SymbolKind.Interface = 11;
48605 SymbolKind.Function = 12;
48606 SymbolKind.Variable = 13;
48607 SymbolKind.Constant = 14;
48608 SymbolKind.String = 15;
48609 SymbolKind.Number = 16;
48610 SymbolKind.Boolean = 17;
48611 SymbolKind.Array = 18;
48612 SymbolKind.Object = 19;
48613 SymbolKind.Key = 20;
48614 SymbolKind.Null = 21;
48615 SymbolKind.EnumMember = 22;
48616 SymbolKind.Struct = 23;
48617 SymbolKind.Event = 24;
48618 SymbolKind.Operator = 25;
48619 SymbolKind.TypeParameter = 26;
48620 })(SymbolKind || (SymbolKind = {}));
48622 * Symbol tags are extra annotations that tweak the rendering of a symbol.
48626 (function (SymbolTag) {
48628 * Render a symbol as obsolete, usually using a strike-out.
48630 SymbolTag.Deprecated = 1;
48631 })(SymbolTag || (SymbolTag = {}));
48632 var SymbolInformation;
48633 (function (SymbolInformation) {
48635 * Creates a new symbol information literal.
48637 * @param name The name of the symbol.
48638 * @param kind The kind of the symbol.
48639 * @param range The range of the location of the symbol.
48640 * @param uri The resource of the location of symbol, defaults to the current document.
48641 * @param containerName The name of the symbol containing the symbol.
48643 function create(name, kind, range, uri, containerName) {
48647 location: { uri: uri, range: range }
48649 if (containerName) {
48650 result.containerName = containerName;
48654 SymbolInformation.create = create;
48655 })(SymbolInformation || (SymbolInformation = {}));
48656 var DocumentSymbol;
48657 (function (DocumentSymbol) {
48659 * Creates a new symbol information literal.
48661 * @param name The name of the symbol.
48662 * @param detail The detail of the symbol.
48663 * @param kind The kind of the symbol.
48664 * @param range The range of the symbol.
48665 * @param selectionRange The selectionRange of the symbol.
48666 * @param children Children of the symbol.
48668 function create(name, detail, kind, range, selectionRange, children) {
48674 selectionRange: selectionRange
48676 if (children !== undefined) {
48677 result.children = children;
48681 DocumentSymbol.create = create;
48683 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
48685 function is(value) {
48686 var candidate = value;
48687 return candidate &&
48688 Is.string(candidate.name) && Is.number(candidate.kind) &&
48689 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
48690 (candidate.detail === undefined || Is.string(candidate.detail)) &&
48691 (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
48692 (candidate.children === undefined || Array.isArray(candidate.children)) &&
48693 (candidate.tags === undefined || Array.isArray(candidate.tags));
48695 DocumentSymbol.is = is;
48696 })(DocumentSymbol || (DocumentSymbol = {}));
48698 * A set of predefined code action kinds
48700 var CodeActionKind;
48701 (function (CodeActionKind) {
48705 CodeActionKind.Empty = '';
48707 * Base kind for quickfix actions: 'quickfix'
48709 CodeActionKind.QuickFix = 'quickfix';
48711 * Base kind for refactoring actions: 'refactor'
48713 CodeActionKind.Refactor = 'refactor';
48715 * Base kind for refactoring extraction actions: 'refactor.extract'
48717 * Example extract actions:
48720 * - Extract function
48721 * - Extract variable
48722 * - Extract interface from class
48725 CodeActionKind.RefactorExtract = 'refactor.extract';
48727 * Base kind for refactoring inline actions: 'refactor.inline'
48729 * Example inline actions:
48731 * - Inline function
48732 * - Inline variable
48733 * - Inline constant
48736 CodeActionKind.RefactorInline = 'refactor.inline';
48738 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
48740 * Example rewrite actions:
48742 * - Convert JavaScript function to class
48743 * - Add or remove parameter
48744 * - Encapsulate field
48745 * - Make method static
48746 * - Move method to base class
48749 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
48751 * Base kind for source actions: `source`
48753 * Source code actions apply to the entire file.
48755 CodeActionKind.Source = 'source';
48757 * Base kind for an organize imports source action: `source.organizeImports`
48759 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
48761 * Base kind for auto-fix source actions: `source.fixAll`.
48763 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
48764 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
48768 CodeActionKind.SourceFixAll = 'source.fixAll';
48769 })(CodeActionKind || (CodeActionKind = {}));
48771 * The CodeActionContext namespace provides helper functions to work with
48772 * [CodeActionContext](#CodeActionContext) literals.
48774 var CodeActionContext;
48775 (function (CodeActionContext) {
48777 * Creates a new CodeActionContext literal.
48779 function create(diagnostics, only) {
48780 var result = { diagnostics: diagnostics };
48781 if (only !== undefined && only !== null) {
48782 result.only = only;
48786 CodeActionContext.create = create;
48788 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
48790 function is(value) {
48791 var candidate = value;
48792 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string));
48794 CodeActionContext.is = is;
48795 })(CodeActionContext || (CodeActionContext = {}));
48797 (function (CodeAction) {
48798 function create(title, kindOrCommandOrEdit, kind) {
48799 var result = { title: title };
48800 var checkKind = true;
48801 if (typeof kindOrCommandOrEdit === 'string') {
48803 result.kind = kindOrCommandOrEdit;
48805 else if (Command.is(kindOrCommandOrEdit)) {
48806 result.command = kindOrCommandOrEdit;
48809 result.edit = kindOrCommandOrEdit;
48811 if (checkKind && kind !== undefined) {
48812 result.kind = kind;
48816 CodeAction.create = create;
48817 function is(value) {
48818 var candidate = value;
48819 return candidate && Is.string(candidate.title) &&
48820 (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
48821 (candidate.kind === undefined || Is.string(candidate.kind)) &&
48822 (candidate.edit !== undefined || candidate.command !== undefined) &&
48823 (candidate.command === undefined || Command.is(candidate.command)) &&
48824 (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
48825 (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
48827 CodeAction.is = is;
48828 })(CodeAction || (CodeAction = {}));
48830 * The CodeLens namespace provides helper functions to work with
48831 * [CodeLens](#CodeLens) literals.
48834 (function (CodeLens) {
48836 * Creates a new CodeLens literal.
48838 function create(range, data) {
48839 var result = { range: range };
48840 if (Is.defined(data)) {
48841 result.data = data;
48845 CodeLens.create = create;
48847 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
48849 function is(value) {
48850 var candidate = value;
48851 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
48854 })(CodeLens || (CodeLens = {}));
48856 * The FormattingOptions namespace provides helper functions to work with
48857 * [FormattingOptions](#FormattingOptions) literals.
48859 var FormattingOptions;
48860 (function (FormattingOptions) {
48862 * Creates a new FormattingOptions literal.
48864 function create(tabSize, insertSpaces) {
48865 return { tabSize: tabSize, insertSpaces: insertSpaces };
48867 FormattingOptions.create = create;
48869 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
48871 function is(value) {
48872 var candidate = value;
48873 return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
48875 FormattingOptions.is = is;
48876 })(FormattingOptions || (FormattingOptions = {}));
48878 * The DocumentLink namespace provides helper functions to work with
48879 * [DocumentLink](#DocumentLink) literals.
48882 (function (DocumentLink) {
48884 * Creates a new DocumentLink literal.
48886 function create(range, target, data) {
48887 return { range: range, target: target, data: data };
48889 DocumentLink.create = create;
48891 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
48893 function is(value) {
48894 var candidate = value;
48895 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
48897 DocumentLink.is = is;
48898 })(DocumentLink || (DocumentLink = {}));
48900 * The SelectionRange namespace provides helper function to work with
48901 * SelectionRange literals.
48903 var SelectionRange;
48904 (function (SelectionRange) {
48906 * Creates a new SelectionRange
48907 * @param range the range.
48908 * @param parent an optional parent.
48910 function create(range, parent) {
48911 return { range: range, parent: parent };
48913 SelectionRange.create = create;
48914 function is(value) {
48915 var candidate = value;
48916 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
48918 SelectionRange.is = is;
48919 })(SelectionRange || (SelectionRange = {}));
48920 var EOL = ['\n', '\r\n', '\r'];
48922 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
48925 (function (TextDocument) {
48927 * Creates a new ITextDocument literal from the given uri and content.
48928 * @param uri The document's uri.
48929 * @param languageId The document's language Id.
48930 * @param content The document's content.
48932 function create(uri, languageId, version, content) {
48933 return new FullTextDocument(uri, languageId, version, content);
48935 TextDocument.create = create;
48937 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
48939 function is(value) {
48940 var candidate = value;
48941 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
48942 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
48944 TextDocument.is = is;
48945 function applyEdits(document, edits) {
48946 var text = document.getText();
48947 var sortedEdits = mergeSort(edits, function (a, b) {
48948 var diff = a.range.start.line - b.range.start.line;
48950 return a.range.start.character - b.range.start.character;
48954 var lastModifiedOffset = text.length;
48955 for (var i = sortedEdits.length - 1; i >= 0; i--) {
48956 var e = sortedEdits[i];
48957 var startOffset = document.offsetAt(e.range.start);
48958 var endOffset = document.offsetAt(e.range.end);
48959 if (endOffset <= lastModifiedOffset) {
48960 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
48963 throw new Error('Overlapping edit');
48965 lastModifiedOffset = startOffset;
48969 TextDocument.applyEdits = applyEdits;
48970 function mergeSort(data, compare) {
48971 if (data.length <= 1) {
48975 var p = (data.length / 2) | 0;
48976 var left = data.slice(0, p);
48977 var right = data.slice(p);
48978 mergeSort(left, compare);
48979 mergeSort(right, compare);
48983 while (leftIdx < left.length && rightIdx < right.length) {
48984 var ret = compare(left[leftIdx], right[rightIdx]);
48986 // smaller_equal -> take left to preserve order
48987 data[i++] = left[leftIdx++];
48990 // greater -> take right
48991 data[i++] = right[rightIdx++];
48994 while (leftIdx < left.length) {
48995 data[i++] = left[leftIdx++];
48997 while (rightIdx < right.length) {
48998 data[i++] = right[rightIdx++];
49002 })(TextDocument || (TextDocument = {}));
49004 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
49006 var FullTextDocument = /** @class */ (function () {
49007 function FullTextDocument(uri, languageId, version, content) {
49009 this._languageId = languageId;
49010 this._version = version;
49011 this._content = content;
49012 this._lineOffsets = undefined;
49014 Object.defineProperty(FullTextDocument.prototype, "uri", {
49021 Object.defineProperty(FullTextDocument.prototype, "languageId", {
49023 return this._languageId;
49028 Object.defineProperty(FullTextDocument.prototype, "version", {
49030 return this._version;
49035 FullTextDocument.prototype.getText = function (range) {
49037 var start = this.offsetAt(range.start);
49038 var end = this.offsetAt(range.end);
49039 return this._content.substring(start, end);
49041 return this._content;
49043 FullTextDocument.prototype.update = function (event, version) {
49044 this._content = event.text;
49045 this._version = version;
49046 this._lineOffsets = undefined;
49048 FullTextDocument.prototype.getLineOffsets = function () {
49049 if (this._lineOffsets === undefined) {
49050 var lineOffsets = [];
49051 var text = this._content;
49052 var isLineStart = true;
49053 for (var i = 0; i < text.length; i++) {
49055 lineOffsets.push(i);
49056 isLineStart = false;
49058 var ch = text.charAt(i);
49059 isLineStart = (ch === '\r' || ch === '\n');
49060 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
49064 if (isLineStart && text.length > 0) {
49065 lineOffsets.push(text.length);
49067 this._lineOffsets = lineOffsets;
49069 return this._lineOffsets;
49071 FullTextDocument.prototype.positionAt = function (offset) {
49072 offset = Math.max(Math.min(offset, this._content.length), 0);
49073 var lineOffsets = this.getLineOffsets();
49074 var low = 0, high = lineOffsets.length;
49076 return Position.create(0, offset);
49078 while (low < high) {
49079 var mid = Math.floor((low + high) / 2);
49080 if (lineOffsets[mid] > offset) {
49087 // low is the least x for which the line offset is larger than the current offset
49088 // or array.length if no line offset is larger than the current offset
49089 var line = low - 1;
49090 return Position.create(line, offset - lineOffsets[line]);
49092 FullTextDocument.prototype.offsetAt = function (position) {
49093 var lineOffsets = this.getLineOffsets();
49094 if (position.line >= lineOffsets.length) {
49095 return this._content.length;
49097 else if (position.line < 0) {
49100 var lineOffset = lineOffsets[position.line];
49101 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
49102 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
49104 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
49106 return this.getLineOffsets().length;
49111 return FullTextDocument;
49115 var toString = Object.prototype.toString;
49116 function defined(value) {
49117 return typeof value !== 'undefined';
49119 Is.defined = defined;
49120 function undefined(value) {
49121 return typeof value === 'undefined';
49123 Is.undefined = undefined;
49124 function boolean(value) {
49125 return value === true || value === false;
49127 Is.boolean = boolean;
49128 function string(value) {
49129 return toString.call(value) === '[object String]';
49131 Is.string = string;
49132 function number(value) {
49133 return toString.call(value) === '[object Number]';
49135 Is.number = number;
49136 function numberRange(value, min, max) {
49137 return toString.call(value) === '[object Number]' && min <= value && value <= max;
49139 Is.numberRange = numberRange;
49140 function integer(value) {
49141 return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
49143 Is.integer = integer;
49144 function uinteger(value) {
49145 return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
49147 Is.uinteger = uinteger;
49148 function func(value) {
49149 return toString.call(value) === '[object Function]';
49152 function objectLiteral(value) {
49153 // Strictly speaking class instances pass this check as well. Since the LSP
49154 // doesn't use classes we ignore this for now. If we do we need to add something
49155 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
49156 return value !== null && typeof value === 'object';
49158 Is.objectLiteral = objectLiteral;
49159 function typedArray(value, check) {
49160 return Array.isArray(value) && value.every(check);
49162 Is.typedArray = typedArray;
49163 })(Is || (Is = {}));
49168 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
49170 __webpack_require__.r(__webpack_exports__);
49171 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
49172 /* harmony export */ "Node": () => /* binding */ Node,
49173 /* harmony export */ "parse": () => /* binding */ parse
49174 /* harmony export */ });
49175 /* harmony import */ var _htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(116);
49176 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(120);
49177 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(117);
49178 /* harmony import */ var _languageFacts_fact__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(121);
49179 /*---------------------------------------------------------------------------------------------
49180 * Copyright (c) Microsoft Corporation. All rights reserved.
49181 * Licensed under the MIT License. See License.txt in the project root for license information.
49182 *--------------------------------------------------------------------------------------------*/
49187 var Node = /** @class */ (function () {
49188 function Node(start, end, children, parent) {
49189 this.start = start;
49191 this.children = children;
49192 this.parent = parent;
49193 this.closed = false;
49195 Object.defineProperty(Node.prototype, "attributeNames", {
49196 get: function () { return this.attributes ? Object.keys(this.attributes) : []; },
49200 Node.prototype.isSameTag = function (tagInLowerCase) {
49201 if (this.tag === undefined) {
49202 return tagInLowerCase === undefined;
49205 return tagInLowerCase !== undefined && this.tag.length === tagInLowerCase.length && this.tag.toLowerCase() === tagInLowerCase;
49208 Object.defineProperty(Node.prototype, "firstChild", {
49209 get: function () { return this.children[0]; },
49213 Object.defineProperty(Node.prototype, "lastChild", {
49214 get: function () { return this.children.length ? this.children[this.children.length - 1] : void 0; },
49218 Node.prototype.findNodeBefore = function (offset) {
49219 var idx = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_1__.findFirst)(this.children, function (c) { return offset <= c.start; }) - 1;
49221 var child = this.children[idx];
49222 if (offset > child.start) {
49223 if (offset < child.end) {
49224 return child.findNodeBefore(offset);
49226 var lastChild = child.lastChild;
49227 if (lastChild && lastChild.end === child.end) {
49228 return child.findNodeBefore(offset);
49235 Node.prototype.findNodeAt = function (offset) {
49236 var idx = (0,_utils_arrays__WEBPACK_IMPORTED_MODULE_1__.findFirst)(this.children, function (c) { return offset <= c.start; }) - 1;
49238 var child = this.children[idx];
49239 if (offset > child.start && offset <= child.end) {
49240 return child.findNodeAt(offset);
49248 function parse(text) {
49249 var scanner = (0,_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(text, undefined, undefined, true);
49250 var htmlDocument = new Node(0, text.length, [], void 0);
49251 var curr = htmlDocument;
49252 var endTagStart = -1;
49253 var endTagName = undefined;
49254 var pendingAttribute = null;
49255 var token = scanner.scan();
49256 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.EOS) {
49258 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.StartTagOpen:
49259 var child = new Node(scanner.getTokenOffset(), text.length, [], curr);
49260 curr.children.push(child);
49263 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.StartTag:
49264 curr.tag = scanner.getTokenText();
49266 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.StartTagClose:
49268 curr.end = scanner.getTokenEnd(); // might be later set to end tag position
49269 if (scanner.getTokenLength()) {
49270 curr.startTagEnd = scanner.getTokenEnd();
49271 if (curr.tag && (0,_languageFacts_fact__WEBPACK_IMPORTED_MODULE_3__.isVoidElement)(curr.tag)) {
49272 curr.closed = true;
49273 curr = curr.parent;
49277 // pseudo close token from an incomplete start tag
49278 curr = curr.parent;
49282 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.StartTagSelfClose:
49284 curr.closed = true;
49285 curr.end = scanner.getTokenEnd();
49286 curr.startTagEnd = scanner.getTokenEnd();
49287 curr = curr.parent;
49290 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.EndTagOpen:
49291 endTagStart = scanner.getTokenOffset();
49292 endTagName = undefined;
49294 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.EndTag:
49295 endTagName = scanner.getTokenText().toLowerCase();
49297 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.EndTagClose:
49299 // see if we can find a matching tag
49300 while (!node.isSameTag(endTagName) && node.parent) {
49301 node = node.parent;
49304 while (curr !== node) {
49305 curr.end = endTagStart;
49306 curr.closed = false;
49307 curr = curr.parent;
49309 curr.closed = true;
49310 curr.endTagStart = endTagStart;
49311 curr.end = scanner.getTokenEnd();
49312 curr = curr.parent;
49315 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.AttributeName: {
49316 pendingAttribute = scanner.getTokenText();
49317 var attributes = curr.attributes;
49319 curr.attributes = attributes = {};
49321 attributes[pendingAttribute] = null; // Support valueless attributes such as 'checked'
49324 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.AttributeValue: {
49325 var value = scanner.getTokenText();
49326 var attributes = curr.attributes;
49327 if (attributes && pendingAttribute) {
49328 attributes[pendingAttribute] = value;
49329 pendingAttribute = null;
49334 token = scanner.scan();
49336 while (curr.parent) {
49337 curr.end = text.length;
49338 curr.closed = false;
49339 curr = curr.parent;
49342 roots: htmlDocument.children,
49343 findNodeBefore: htmlDocument.findNodeBefore.bind(htmlDocument),
49344 findNodeAt: htmlDocument.findNodeAt.bind(htmlDocument)
49351 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
49353 __webpack_require__.r(__webpack_exports__);
49354 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
49355 /* harmony export */ "findFirst": () => /* binding */ findFirst,
49356 /* harmony export */ "binarySearch": () => /* binding */ binarySearch
49357 /* harmony export */ });
49358 /*---------------------------------------------------------------------------------------------
49359 * Copyright (c) Microsoft Corporation. All rights reserved.
49360 * Licensed under the MIT License. See License.txt in the project root for license information.
49361 *--------------------------------------------------------------------------------------------*/
49363 * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false
49364 * are located before all elements where p(x) is true.
49365 * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.
49367 function findFirst(array, p) {
49368 var low = 0, high = array.length;
49370 return 0; // no children
49372 while (low < high) {
49373 var mid = Math.floor((low + high) / 2);
49374 if (p(array[mid])) {
49383 function binarySearch(array, key, comparator) {
49384 var low = 0, high = array.length - 1;
49385 while (low <= high) {
49386 var mid = ((low + high) / 2) | 0;
49387 var comp = comparator(array[mid], key);
49391 else if (comp > 0) {
49404 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
49406 __webpack_require__.r(__webpack_exports__);
49407 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
49408 /* harmony export */ "VOID_ELEMENTS": () => /* binding */ VOID_ELEMENTS,
49409 /* harmony export */ "isVoidElement": () => /* binding */ isVoidElement
49410 /* harmony export */ });
49411 /* harmony import */ var _utils_arrays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(120);
49412 /*---------------------------------------------------------------------------------------------
49413 * Copyright (c) Microsoft Corporation. All rights reserved.
49414 * Licensed under the MIT License. See License.txt in the project root for license information.
49415 *--------------------------------------------------------------------------------------------*/
49417 // As defined in https://www.w3.org/TR/html5/syntax.html#void-elements
49418 var VOID_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
49419 function isVoidElement(e) {
49420 return !!e && _utils_arrays__WEBPACK_IMPORTED_MODULE_0__.binarySearch(VOID_ELEMENTS, e.toLowerCase(), function (s1, s2) { return s1.localeCompare(s2); }) >= 0;
49426 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
49428 __webpack_require__.r(__webpack_exports__);
49429 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
49430 /* harmony export */ "HTMLCompletion": () => /* binding */ HTMLCompletion
49431 /* harmony export */ });
49432 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(116);
49433 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(117);
49434 /* harmony import */ var _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(123);
49435 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77);
49436 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(124);
49437 /* harmony import */ var _languageFacts_fact__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(121);
49438 /* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(125);
49439 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(126);
49440 /* harmony import */ var _pathCompletion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(128);
49441 /*---------------------------------------------------------------------------------------------
49442 * Copyright (c) Microsoft Corporation. All rights reserved.
49443 * Licensed under the MIT License. See License.txt in the project root for license information.
49444 *--------------------------------------------------------------------------------------------*/
49445 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
49446 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
49447 return new (P || (P = Promise))(function (resolve, reject) {
49448 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
49449 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
49450 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
49451 step((generator = generator.apply(thisArg, _arguments || [])).next());
49454 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
49455 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
49456 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
49457 function verb(n) { return function (v) { return step([n, v]); }; }
49458 function step(op) {
49459 if (f) throw new TypeError("Generator is already executing.");
49461 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
49462 if (y = 0, t) op = [op[0] & 2, t.value];
49464 case 0: case 1: t = op; break;
49465 case 4: _.label++; return { value: op[1], done: false };
49466 case 5: _.label++; y = op[1]; op = [0]; continue;
49467 case 7: op = _.ops.pop(); _.trys.pop(); continue;
49469 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
49470 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
49471 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
49472 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
49473 if (t[2]) _.ops.pop();
49474 _.trys.pop(); continue;
49476 op = body.call(thisArg, _);
49477 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49478 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
49490 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__.loadMessageBundle();
49491 var HTMLCompletion = /** @class */ (function () {
49492 function HTMLCompletion(lsOptions, dataManager) {
49493 this.lsOptions = lsOptions;
49494 this.dataManager = dataManager;
49495 this.completionParticipants = [];
49497 HTMLCompletion.prototype.setCompletionParticipants = function (registeredCompletionParticipants) {
49498 this.completionParticipants = registeredCompletionParticipants || [];
49500 HTMLCompletion.prototype.doComplete2 = function (document, position, htmlDocument, documentContext, settings) {
49501 return __awaiter(this, void 0, void 0, function () {
49502 var participant, contributedParticipants, result, pathCompletionResult;
49503 return __generator(this, function (_a) {
49504 switch (_a.label) {
49506 if (!this.lsOptions.fileSystemProvider || !this.lsOptions.fileSystemProvider.readDirectory) {
49507 return [2 /*return*/, this.doComplete(document, position, htmlDocument, settings)];
49509 participant = new _pathCompletion__WEBPACK_IMPORTED_MODULE_8__.PathCompletionParticipant(this.lsOptions.fileSystemProvider.readDirectory);
49510 contributedParticipants = this.completionParticipants;
49511 this.completionParticipants = [participant].concat(contributedParticipants);
49512 result = this.doComplete(document, position, htmlDocument, settings);
49515 _a.trys.push([1, , 3, 4]);
49516 return [4 /*yield*/, participant.computeCompletions(document, documentContext)];
49518 pathCompletionResult = _a.sent();
49519 return [2 /*return*/, {
49520 isIncomplete: result.isIncomplete || pathCompletionResult.isIncomplete,
49521 items: pathCompletionResult.items.concat(result.items)
49524 this.completionParticipants = contributedParticipants;
49525 return [7 /*endfinally*/];
49526 case 4: return [2 /*return*/];
49531 HTMLCompletion.prototype.doComplete = function (document, position, htmlDocument, settings) {
49532 var result = this._doComplete(document, position, htmlDocument, settings);
49533 return this.convertCompletionList(result);
49535 HTMLCompletion.prototype._doComplete = function (document, position, htmlDocument, settings) {
49537 isIncomplete: false,
49540 var completionParticipants = this.completionParticipants;
49541 var dataProviders = this.dataManager.getDataProviders().filter(function (p) { return p.isApplicable(document.languageId) && (!settings || settings[p.getId()] !== false); });
49542 var doesSupportMarkdown = this.doesSupportMarkdown();
49543 var text = document.getText();
49544 var offset = document.offsetAt(position);
49545 var node = htmlDocument.findNodeBefore(offset);
49549 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(text, node.start);
49550 var currentTag = '';
49551 var currentAttributeName;
49552 function getReplaceRange(replaceStart, replaceEnd) {
49553 if (replaceEnd === void 0) { replaceEnd = offset; }
49554 if (replaceStart > offset) {
49555 replaceStart = offset;
49557 return { start: document.positionAt(replaceStart), end: document.positionAt(replaceEnd) };
49559 function collectOpenTagSuggestions(afterOpenBracket, tagNameEnd) {
49560 var range = getReplaceRange(afterOpenBracket, tagNameEnd);
49561 dataProviders.forEach(function (provider) {
49562 provider.provideTags().forEach(function (tag) {
49563 result.items.push({
49565 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property,
49566 documentation: (0,_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_7__.generateDocumentation)(tag, undefined, doesSupportMarkdown),
49567 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(range, tag.name),
49568 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.PlainText
49574 function getLineIndent(offset) {
49575 var start = offset;
49576 while (start > 0) {
49577 var ch = text.charAt(start - 1);
49578 if ("\n\r".indexOf(ch) >= 0) {
49579 return text.substring(start, offset);
49581 if (!isWhiteSpace(ch)) {
49586 return text.substring(0, offset);
49588 function collectCloseTagSuggestions(afterOpenBracket, inOpenTag, tagNameEnd) {
49589 if (tagNameEnd === void 0) { tagNameEnd = offset; }
49590 var range = getReplaceRange(afterOpenBracket, tagNameEnd);
49591 var closeTag = isFollowedBy(text, tagNameEnd, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinEndTag, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTagClose) ? '' : '>';
49594 curr = curr.parent; // don't suggest the own tag, it's not yet open
49597 var tag = curr.tag;
49598 if (tag && (!curr.closed || curr.endTagStart && (curr.endTagStart > offset))) {
49601 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property,
49602 filterText: '/' + tag,
49603 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(range, '/' + tag + closeTag),
49604 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.PlainText
49606 var startIndent = getLineIndent(curr.start);
49607 var endIndent = getLineIndent(afterOpenBracket - 1);
49608 if (startIndent !== null && endIndent !== null && startIndent !== endIndent) {
49609 var insertText = startIndent + '</' + tag + closeTag;
49610 item.textEdit = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(getReplaceRange(afterOpenBracket - 1 - endIndent.length), insertText);
49611 item.filterText = endIndent + '</' + tag;
49613 result.items.push(item);
49616 curr = curr.parent;
49621 dataProviders.forEach(function (provider) {
49622 provider.provideTags().forEach(function (tag) {
49623 result.items.push({
49624 label: '/' + tag.name,
49625 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property,
49626 documentation: (0,_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_7__.generateDocumentation)(tag, undefined, doesSupportMarkdown),
49627 filterText: '/' + tag.name + closeTag,
49628 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(range, '/' + tag.name + closeTag),
49629 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.PlainText
49635 function collectAutoCloseTagSuggestion(tagCloseEnd, tag) {
49636 if (settings && settings.hideAutoCompleteProposals) {
49639 if (!(0,_languageFacts_fact__WEBPACK_IMPORTED_MODULE_5__.isVoidElement)(tag)) {
49640 var pos = document.positionAt(tagCloseEnd);
49641 result.items.push({
49642 label: '</' + tag + '>',
49643 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property,
49644 filterText: '</' + tag + '>',
49645 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.insert(pos, '$0</' + tag + '>'),
49646 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.Snippet
49651 function collectTagSuggestions(tagStart, tagEnd) {
49652 collectOpenTagSuggestions(tagStart, tagEnd);
49653 collectCloseTagSuggestions(tagStart, true, tagEnd);
49656 function collectAttributeNameSuggestions(nameStart, nameEnd) {
49657 if (nameEnd === void 0) { nameEnd = offset; }
49658 var replaceEnd = offset;
49659 while (replaceEnd < nameEnd && text[replaceEnd] !== '<') { // < is a valid attribute name character, but we rather assume the attribute name ends. See #23236.
49662 var range = getReplaceRange(nameStart, replaceEnd);
49663 var value = isFollowedBy(text, nameEnd, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterAttributeName, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.DelimiterAssign) ? '' : '="$1"';
49664 var seenAttributes = Object.create(null);
49665 dataProviders.forEach(function (provider) {
49666 provider.provideAttributes(currentTag).forEach(function (attr) {
49667 if (seenAttributes[attr.name]) {
49670 seenAttributes[attr.name] = true;
49671 var codeSnippet = attr.name;
49673 if (attr.valueSet !== 'v' && value.length) {
49674 codeSnippet = codeSnippet + value;
49675 if (attr.valueSet || attr.name === 'style') {
49678 command: 'editor.action.triggerSuggest'
49682 result.items.push({
49684 kind: attr.valueSet === 'handler' ? _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Function : _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Value,
49685 documentation: (0,_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_7__.generateDocumentation)(attr, undefined, doesSupportMarkdown),
49686 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(range, codeSnippet),
49687 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.Snippet,
49692 collectDataAttributesSuggestions(range, seenAttributes);
49695 function collectDataAttributesSuggestions(range, seenAttributes) {
49696 var dataAttr = 'data-';
49697 var dataAttributes = {};
49698 dataAttributes[dataAttr] = dataAttr + "$1=\"$2\"";
49699 function addNodeDataAttributes(node) {
49700 node.attributeNames.forEach(function (attr) {
49701 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.startsWith)(attr, dataAttr) && !dataAttributes[attr] && !seenAttributes[attr]) {
49702 dataAttributes[attr] = attr + '="$1"';
49705 node.children.forEach(function (child) { return addNodeDataAttributes(child); });
49707 if (htmlDocument) {
49708 htmlDocument.roots.forEach(function (root) { return addNodeDataAttributes(root); });
49710 Object.keys(dataAttributes).forEach(function (attr) { return result.items.push({
49712 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Value,
49713 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(range, dataAttributes[attr]),
49714 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.Snippet
49717 function collectAttributeValueSuggestions(valueStart, valueEnd) {
49718 if (valueEnd === void 0) { valueEnd = offset; }
49722 if (offset > valueStart && offset <= valueEnd && isQuote(text[valueStart])) {
49723 // inside quoted attribute
49724 var valueContentStart = valueStart + 1;
49725 var valueContentEnd = valueEnd;
49726 // valueEnd points to the char after quote, which encloses the replace range
49727 if (valueEnd > valueStart && text[valueEnd - 1] === text[valueStart]) {
49730 var wsBefore = getWordStart(text, offset, valueContentStart);
49731 var wsAfter = getWordEnd(text, offset, valueContentEnd);
49732 range = getReplaceRange(wsBefore, wsAfter);
49733 valuePrefix = offset >= valueContentStart && offset <= valueContentEnd ? text.substring(valueContentStart, offset) : '';
49737 range = getReplaceRange(valueStart, valueEnd);
49738 valuePrefix = text.substring(valueStart, offset);
49741 if (completionParticipants.length > 0) {
49742 var tag = currentTag.toLowerCase();
49743 var attribute = currentAttributeName.toLowerCase();
49744 var fullRange = getReplaceRange(valueStart, valueEnd);
49745 for (var _i = 0, completionParticipants_1 = completionParticipants; _i < completionParticipants_1.length; _i++) {
49746 var participant = completionParticipants_1[_i];
49747 if (participant.onHtmlAttributeValue) {
49748 participant.onHtmlAttributeValue({ document: document, position: position, tag: tag, attribute: attribute, value: valuePrefix, range: fullRange });
49752 dataProviders.forEach(function (provider) {
49753 provider.provideValues(currentTag, currentAttributeName).forEach(function (value) {
49754 var insertText = addQuotes ? '"' + value.name + '"' : value.name;
49755 result.items.push({
49757 filterText: insertText,
49758 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Unit,
49759 documentation: (0,_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_7__.generateDocumentation)(value, undefined, doesSupportMarkdown),
49760 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(range, insertText),
49761 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.PlainText
49765 collectCharacterEntityProposals();
49768 function scanNextForEndPos(nextToken) {
49769 if (offset === scanner.getTokenEnd()) {
49770 token = scanner.scan();
49771 if (token === nextToken && scanner.getTokenOffset() === offset) {
49772 return scanner.getTokenEnd();
49777 function collectInsideContent() {
49778 for (var _i = 0, completionParticipants_2 = completionParticipants; _i < completionParticipants_2.length; _i++) {
49779 var participant = completionParticipants_2[_i];
49780 if (participant.onHtmlContent) {
49781 participant.onHtmlContent({ document: document, position: position });
49784 return collectCharacterEntityProposals();
49786 function collectCharacterEntityProposals() {
49787 // character entities
49788 var k = offset - 1;
49789 var characterStart = position.character;
49790 while (k >= 0 && (0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.isLetterOrDigit)(text, k)) {
49794 if (k >= 0 && text[k] === '&') {
49795 var range = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.Range.create(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.Position.create(position.line, characterStart - 1), position);
49796 for (var entity in _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_2__.entities) {
49797 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.endsWith)(entity, ';')) {
49798 var label = '&' + entity;
49799 result.items.push({
49801 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Keyword,
49802 documentation: localize('entity.propose', "Character entity representing '" + _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_2__.entities[entity] + "'"),
49803 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(range, label),
49804 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.PlainText
49811 function suggestDoctype(replaceStart, replaceEnd) {
49812 var range = getReplaceRange(replaceStart, replaceEnd);
49813 result.items.push({
49815 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property,
49816 documentation: 'A preamble for an HTML document.',
49817 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TextEdit.replace(range, '!DOCTYPE html>'),
49818 insertTextFormat: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.PlainText
49821 var token = scanner.scan();
49822 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS && scanner.getTokenOffset() <= offset) {
49824 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTagOpen:
49825 if (scanner.getTokenEnd() === offset) {
49826 var endPos = scanNextForEndPos(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTag);
49827 if (position.line === 0) {
49828 suggestDoctype(offset, endPos);
49830 return collectTagSuggestions(offset, endPos);
49833 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTag:
49834 if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
49835 return collectOpenTagSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
49837 currentTag = scanner.getTokenText();
49839 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeName:
49840 if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
49841 return collectAttributeNameSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
49843 currentAttributeName = scanner.getTokenText();
49845 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.DelimiterAssign:
49846 if (scanner.getTokenEnd() === offset) {
49847 var endPos = scanNextForEndPos(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeValue);
49848 return collectAttributeValueSuggestions(offset, endPos);
49851 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeValue:
49852 if (scanner.getTokenOffset() <= offset && offset <= scanner.getTokenEnd()) {
49853 return collectAttributeValueSuggestions(scanner.getTokenOffset(), scanner.getTokenEnd());
49856 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Whitespace:
49857 if (offset <= scanner.getTokenEnd()) {
49858 switch (scanner.getScannerState()) {
49859 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterOpeningStartTag:
49860 var startPos = scanner.getTokenOffset();
49861 var endTagPos = scanNextForEndPos(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTag);
49862 return collectTagSuggestions(startPos, endTagPos);
49863 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinTag:
49864 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterAttributeName:
49865 return collectAttributeNameSuggestions(scanner.getTokenEnd());
49866 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.BeforeAttributeValue:
49867 return collectAttributeValueSuggestions(scanner.getTokenEnd());
49868 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.AfterOpeningEndTag:
49869 return collectCloseTagSuggestions(scanner.getTokenOffset() - 1, false);
49870 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.ScannerState.WithinContent:
49871 return collectInsideContent();
49875 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTagOpen:
49876 if (offset <= scanner.getTokenEnd()) {
49877 var afterOpenBracket = scanner.getTokenOffset() + 1;
49878 var endOffset = scanNextForEndPos(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTag);
49879 return collectCloseTagSuggestions(afterOpenBracket, false, endOffset);
49882 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTag:
49883 if (offset <= scanner.getTokenEnd()) {
49884 var start = scanner.getTokenOffset() - 1;
49885 while (start >= 0) {
49886 var ch = text.charAt(start);
49888 return collectCloseTagSuggestions(start, false, scanner.getTokenEnd());
49890 else if (!isWhiteSpace(ch)) {
49897 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTagClose:
49898 if (offset <= scanner.getTokenEnd()) {
49900 return collectAutoCloseTagSuggestion(scanner.getTokenEnd(), currentTag);
49904 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Content:
49905 if (offset <= scanner.getTokenEnd()) {
49906 return collectInsideContent();
49910 if (offset <= scanner.getTokenEnd()) {
49915 token = scanner.scan();
49919 HTMLCompletion.prototype.doTagComplete = function (document, position, htmlDocument) {
49920 var offset = document.offsetAt(position);
49924 var char = document.getText().charAt(offset - 1);
49925 if (char === '>') {
49926 var node = htmlDocument.findNodeBefore(offset);
49927 if (node && node.tag && !(0,_languageFacts_fact__WEBPACK_IMPORTED_MODULE_5__.isVoidElement)(node.tag) && node.start < offset && (!node.endTagStart || node.endTagStart > offset)) {
49928 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(document.getText(), node.start);
49929 var token = scanner.scan();
49930 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS && scanner.getTokenEnd() <= offset) {
49931 if (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTagClose && scanner.getTokenEnd() === offset) {
49932 return "$0</" + node.tag + ">";
49934 token = scanner.scan();
49938 else if (char === '/') {
49939 var node = htmlDocument.findNodeBefore(offset);
49940 while (node && node.closed) {
49941 node = node.parent;
49943 if (node && node.tag) {
49944 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(document.getText(), node.start);
49945 var token = scanner.scan();
49946 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS && scanner.getTokenEnd() <= offset) {
49947 if (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTagOpen && scanner.getTokenEnd() === offset) {
49948 return node.tag + ">";
49950 token = scanner.scan();
49956 HTMLCompletion.prototype.convertCompletionList = function (list) {
49957 if (!this.doesSupportMarkdown()) {
49958 list.items.forEach(function (item) {
49959 if (item.documentation && typeof item.documentation !== 'string') {
49960 item.documentation = {
49962 value: item.documentation.value
49969 HTMLCompletion.prototype.doesSupportMarkdown = function () {
49971 if (!(0,_utils_object__WEBPACK_IMPORTED_MODULE_6__.isDefined)(this.supportsMarkdown)) {
49972 if (!(0,_utils_object__WEBPACK_IMPORTED_MODULE_6__.isDefined)(this.lsOptions.clientCapabilities)) {
49973 this.supportsMarkdown = true;
49974 return this.supportsMarkdown;
49976 var documentationFormat = (_c = (_b = (_a = this.lsOptions.clientCapabilities.textDocument) === null || _a === void 0 ? void 0 : _a.completion) === null || _b === void 0 ? void 0 : _b.completionItem) === null || _c === void 0 ? void 0 : _c.documentationFormat;
49977 this.supportsMarkdown = Array.isArray(documentationFormat) && documentationFormat.indexOf(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.MarkupKind.Markdown) !== -1;
49979 return this.supportsMarkdown;
49981 return HTMLCompletion;
49984 function isQuote(s) {
49985 return /^["']*$/.test(s);
49987 function isWhiteSpace(s) {
49988 return /^\s*$/.test(s);
49990 function isFollowedBy(s, offset, intialState, expectedToken) {
49991 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(s, offset, intialState);
49992 var token = scanner.scan();
49993 while (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.Whitespace) {
49994 token = scanner.scan();
49996 return token === expectedToken;
49998 function getWordStart(s, offset, limit) {
49999 while (offset > limit && !isWhiteSpace(s[offset - 1])) {
50004 function getWordEnd(s, offset, limit) {
50005 while (offset < limit && !isWhiteSpace(s[offset])) {
50014 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
50016 __webpack_require__.r(__webpack_exports__);
50017 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
50018 /* harmony export */ "entities": () => /* binding */ entities
50019 /* harmony export */ });
50020 /*---------------------------------------------------------------------------------------------
50021 * Copyright (c) Microsoft Corporation. All rights reserved.
50022 * Licensed under the MIT License. See License.txt in the project root for license information.
50023 *--------------------------------------------------------------------------------------------*/
50025 * HTML 5 character entities
50026 * https://www.w3.org/TR/html5/syntax.html#named-character-references
50029 "Aacute;": "\u00C1",
50030 "Aacute": "\u00C1",
50031 "aacute;": "\u00E1",
50032 "aacute": "\u00E1",
50033 "Abreve;": "\u0102",
50034 "abreve;": "\u0103",
50037 "acE;": "\u223E\u0333",
50038 "Acirc;": "\u00C2",
50040 "acirc;": "\u00E2",
50042 "acute;": "\u00B4",
50046 "AElig;": "\u00C6",
50048 "aelig;": "\u00E6",
50051 "Afr;": "\uD835\uDD04",
50052 "afr;": "\uD835\uDD1E",
50053 "Agrave;": "\u00C0",
50054 "Agrave": "\u00C0",
50055 "agrave;": "\u00E0",
50056 "agrave": "\u00E0",
50057 "alefsym;": "\u2135",
50058 "aleph;": "\u2135",
50059 "Alpha;": "\u0391",
50060 "alpha;": "\u03B1",
50061 "Amacr;": "\u0100",
50062 "amacr;": "\u0101",
50063 "amalg;": "\u2A3F",
50070 "andand;": "\u2A55",
50072 "andslope;": "\u2A58",
50076 "angle;": "\u2220",
50077 "angmsd;": "\u2221",
50078 "angmsdaa;": "\u29A8",
50079 "angmsdab;": "\u29A9",
50080 "angmsdac;": "\u29AA",
50081 "angmsdad;": "\u29AB",
50082 "angmsdae;": "\u29AC",
50083 "angmsdaf;": "\u29AD",
50084 "angmsdag;": "\u29AE",
50085 "angmsdah;": "\u29AF",
50086 "angrt;": "\u221F",
50087 "angrtvb;": "\u22BE",
50088 "angrtvbd;": "\u299D",
50089 "angsph;": "\u2222",
50090 "angst;": "\u00C5",
50091 "angzarr;": "\u237C",
50092 "Aogon;": "\u0104",
50093 "aogon;": "\u0105",
50094 "Aopf;": "\uD835\uDD38",
50095 "aopf;": "\uD835\uDD52",
50097 "apacir;": "\u2A6F",
50102 "ApplyFunction;": "\u2061",
50103 "approx;": "\u2248",
50104 "approxeq;": "\u224A",
50105 "Aring;": "\u00C5",
50107 "aring;": "\u00E5",
50109 "Ascr;": "\uD835\uDC9C",
50110 "ascr;": "\uD835\uDCB6",
50111 "Assign;": "\u2254",
50113 "asymp;": "\u2248",
50114 "asympeq;": "\u224D",
50115 "Atilde;": "\u00C3",
50116 "Atilde": "\u00C3",
50117 "atilde;": "\u00E3",
50118 "atilde": "\u00E3",
50123 "awconint;": "\u2233",
50124 "awint;": "\u2A11",
50125 "backcong;": "\u224C",
50126 "backepsilon;": "\u03F6",
50127 "backprime;": "\u2035",
50128 "backsim;": "\u223D",
50129 "backsimeq;": "\u22CD",
50130 "Backslash;": "\u2216",
50132 "barvee;": "\u22BD",
50133 "Barwed;": "\u2306",
50134 "barwed;": "\u2305",
50135 "barwedge;": "\u2305",
50137 "bbrktbrk;": "\u23B6",
50138 "bcong;": "\u224C",
50141 "bdquo;": "\u201E",
50142 "becaus;": "\u2235",
50143 "Because;": "\u2235",
50144 "because;": "\u2235",
50145 "bemptyv;": "\u29B0",
50146 "bepsi;": "\u03F6",
50147 "bernou;": "\u212C",
50148 "Bernoullis;": "\u212C",
50152 "between;": "\u226C",
50153 "Bfr;": "\uD835\uDD05",
50154 "bfr;": "\uD835\uDD1F",
50155 "bigcap;": "\u22C2",
50156 "bigcirc;": "\u25EF",
50157 "bigcup;": "\u22C3",
50158 "bigodot;": "\u2A00",
50159 "bigoplus;": "\u2A01",
50160 "bigotimes;": "\u2A02",
50161 "bigsqcup;": "\u2A06",
50162 "bigstar;": "\u2605",
50163 "bigtriangledown;": "\u25BD",
50164 "bigtriangleup;": "\u25B3",
50165 "biguplus;": "\u2A04",
50166 "bigvee;": "\u22C1",
50167 "bigwedge;": "\u22C0",
50168 "bkarow;": "\u290D",
50169 "blacklozenge;": "\u29EB",
50170 "blacksquare;": "\u25AA",
50171 "blacktriangle;": "\u25B4",
50172 "blacktriangledown;": "\u25BE",
50173 "blacktriangleleft;": "\u25C2",
50174 "blacktriangleright;": "\u25B8",
50175 "blank;": "\u2423",
50176 "blk12;": "\u2592",
50177 "blk14;": "\u2591",
50178 "blk34;": "\u2593",
50179 "block;": "\u2588",
50180 "bne;": "\u003D\u20E5",
50181 "bnequiv;": "\u2261\u20E5",
50184 "Bopf;": "\uD835\uDD39",
50185 "bopf;": "\uD835\uDD53",
50187 "bottom;": "\u22A5",
50188 "bowtie;": "\u22C8",
50189 "boxbox;": "\u29C9",
50190 "boxDL;": "\u2557",
50191 "boxDl;": "\u2556",
50192 "boxdL;": "\u2555",
50193 "boxdl;": "\u2510",
50194 "boxDR;": "\u2554",
50195 "boxDr;": "\u2553",
50196 "boxdR;": "\u2552",
50197 "boxdr;": "\u250C",
50200 "boxHD;": "\u2566",
50201 "boxHd;": "\u2564",
50202 "boxhD;": "\u2565",
50203 "boxhd;": "\u252C",
50204 "boxHU;": "\u2569",
50205 "boxHu;": "\u2567",
50206 "boxhU;": "\u2568",
50207 "boxhu;": "\u2534",
50208 "boxminus;": "\u229F",
50209 "boxplus;": "\u229E",
50210 "boxtimes;": "\u22A0",
50211 "boxUL;": "\u255D",
50212 "boxUl;": "\u255C",
50213 "boxuL;": "\u255B",
50214 "boxul;": "\u2518",
50215 "boxUR;": "\u255A",
50216 "boxUr;": "\u2559",
50217 "boxuR;": "\u2558",
50218 "boxur;": "\u2514",
50221 "boxVH;": "\u256C",
50222 "boxVh;": "\u256B",
50223 "boxvH;": "\u256A",
50224 "boxvh;": "\u253C",
50225 "boxVL;": "\u2563",
50226 "boxVl;": "\u2562",
50227 "boxvL;": "\u2561",
50228 "boxvl;": "\u2524",
50229 "boxVR;": "\u2560",
50230 "boxVr;": "\u255F",
50231 "boxvR;": "\u255E",
50232 "boxvr;": "\u251C",
50233 "bprime;": "\u2035",
50234 "Breve;": "\u02D8",
50235 "breve;": "\u02D8",
50236 "brvbar;": "\u00A6",
50237 "brvbar": "\u00A6",
50239 "bscr;": "\uD835\uDCB7",
50240 "bsemi;": "\u204F",
50242 "bsime;": "\u22CD",
50244 "bsolb;": "\u29C5",
50245 "bsolhsub;": "\u27C8",
50247 "bullet;": "\u2022",
50249 "bumpE;": "\u2AAE",
50250 "bumpe;": "\u224F",
50251 "Bumpeq;": "\u224E",
50252 "bumpeq;": "\u224F",
50253 "Cacute;": "\u0106",
50254 "cacute;": "\u0107",
50257 "capand;": "\u2A44",
50258 "capbrcup;": "\u2A49",
50259 "capcap;": "\u2A4B",
50260 "capcup;": "\u2A47",
50261 "capdot;": "\u2A40",
50262 "CapitalDifferentialD;": "\u2145",
50263 "caps;": "\u2229\uFE00",
50264 "caret;": "\u2041",
50265 "caron;": "\u02C7",
50266 "Cayleys;": "\u212D",
50267 "ccaps;": "\u2A4D",
50268 "Ccaron;": "\u010C",
50269 "ccaron;": "\u010D",
50270 "Ccedil;": "\u00C7",
50271 "Ccedil": "\u00C7",
50272 "ccedil;": "\u00E7",
50273 "ccedil": "\u00E7",
50274 "Ccirc;": "\u0108",
50275 "ccirc;": "\u0109",
50276 "Cconint;": "\u2230",
50277 "ccups;": "\u2A4C",
50278 "ccupssm;": "\u2A50",
50281 "cedil;": "\u00B8",
50283 "Cedilla;": "\u00B8",
50284 "cemptyv;": "\u29B2",
50287 "CenterDot;": "\u00B7",
50288 "centerdot;": "\u00B7",
50290 "cfr;": "\uD835\uDD20",
50293 "check;": "\u2713",
50294 "checkmark;": "\u2713",
50299 "circeq;": "\u2257",
50300 "circlearrowleft;": "\u21BA",
50301 "circlearrowright;": "\u21BB",
50302 "circledast;": "\u229B",
50303 "circledcirc;": "\u229A",
50304 "circleddash;": "\u229D",
50305 "CircleDot;": "\u2299",
50306 "circledR;": "\u00AE",
50307 "circledS;": "\u24C8",
50308 "CircleMinus;": "\u2296",
50309 "CirclePlus;": "\u2295",
50310 "CircleTimes;": "\u2297",
50313 "cirfnint;": "\u2A10",
50314 "cirmid;": "\u2AEF",
50315 "cirscir;": "\u29C2",
50316 "ClockwiseContourIntegral;": "\u2232",
50317 "CloseCurlyDoubleQuote;": "\u201D",
50318 "CloseCurlyQuote;": "\u2019",
50319 "clubs;": "\u2663",
50320 "clubsuit;": "\u2663",
50321 "Colon;": "\u2237",
50322 "colon;": "\u003A",
50323 "Colone;": "\u2A74",
50324 "colone;": "\u2254",
50325 "coloneq;": "\u2254",
50326 "comma;": "\u002C",
50327 "commat;": "\u0040",
50329 "compfn;": "\u2218",
50330 "complement;": "\u2201",
50331 "complexes;": "\u2102",
50333 "congdot;": "\u2A6D",
50334 "Congruent;": "\u2261",
50335 "Conint;": "\u222F",
50336 "conint;": "\u222E",
50337 "ContourIntegral;": "\u222E",
50339 "copf;": "\uD835\uDD54",
50340 "coprod;": "\u2210",
50341 "Coproduct;": "\u2210",
50346 "copysr;": "\u2117",
50347 "CounterClockwiseContourIntegral;": "\u2233",
50348 "crarr;": "\u21B5",
50349 "Cross;": "\u2A2F",
50350 "cross;": "\u2717",
50351 "Cscr;": "\uD835\uDC9E",
50352 "cscr;": "\uD835\uDCB8",
50354 "csube;": "\u2AD1",
50356 "csupe;": "\u2AD2",
50357 "ctdot;": "\u22EF",
50358 "cudarrl;": "\u2938",
50359 "cudarrr;": "\u2935",
50360 "cuepr;": "\u22DE",
50361 "cuesc;": "\u22DF",
50362 "cularr;": "\u21B6",
50363 "cularrp;": "\u293D",
50366 "cupbrcap;": "\u2A48",
50367 "CupCap;": "\u224D",
50368 "cupcap;": "\u2A46",
50369 "cupcup;": "\u2A4A",
50370 "cupdot;": "\u228D",
50371 "cupor;": "\u2A45",
50372 "cups;": "\u222A\uFE00",
50373 "curarr;": "\u21B7",
50374 "curarrm;": "\u293C",
50375 "curlyeqprec;": "\u22DE",
50376 "curlyeqsucc;": "\u22DF",
50377 "curlyvee;": "\u22CE",
50378 "curlywedge;": "\u22CF",
50379 "curren;": "\u00A4",
50380 "curren": "\u00A4",
50381 "curvearrowleft;": "\u21B6",
50382 "curvearrowright;": "\u21B7",
50383 "cuvee;": "\u22CE",
50384 "cuwed;": "\u22CF",
50385 "cwconint;": "\u2232",
50386 "cwint;": "\u2231",
50387 "cylcty;": "\u232D",
50388 "Dagger;": "\u2021",
50389 "dagger;": "\u2020",
50390 "daleth;": "\u2138",
50395 "Dashv;": "\u2AE4",
50396 "dashv;": "\u22A3",
50397 "dbkarow;": "\u290F",
50398 "dblac;": "\u02DD",
50399 "Dcaron;": "\u010E",
50400 "dcaron;": "\u010F",
50405 "ddagger;": "\u2021",
50406 "ddarr;": "\u21CA",
50407 "DDotrahd;": "\u2911",
50408 "ddotseq;": "\u2A77",
50412 "Delta;": "\u0394",
50413 "delta;": "\u03B4",
50414 "demptyv;": "\u29B1",
50415 "dfisht;": "\u297F",
50416 "Dfr;": "\uD835\uDD07",
50417 "dfr;": "\uD835\uDD21",
50419 "dharl;": "\u21C3",
50420 "dharr;": "\u21C2",
50421 "DiacriticalAcute;": "\u00B4",
50422 "DiacriticalDot;": "\u02D9",
50423 "DiacriticalDoubleAcute;": "\u02DD",
50424 "DiacriticalGrave;": "\u0060",
50425 "DiacriticalTilde;": "\u02DC",
50427 "Diamond;": "\u22C4",
50428 "diamond;": "\u22C4",
50429 "diamondsuit;": "\u2666",
50430 "diams;": "\u2666",
50432 "DifferentialD;": "\u2146",
50433 "digamma;": "\u03DD",
50434 "disin;": "\u22F2",
50436 "divide;": "\u00F7",
50437 "divide": "\u00F7",
50438 "divideontimes;": "\u22C7",
50439 "divonx;": "\u22C7",
50442 "dlcorn;": "\u231E",
50443 "dlcrop;": "\u230D",
50444 "dollar;": "\u0024",
50445 "Dopf;": "\uD835\uDD3B",
50446 "dopf;": "\uD835\uDD55",
50449 "DotDot;": "\u20DC",
50450 "doteq;": "\u2250",
50451 "doteqdot;": "\u2251",
50452 "DotEqual;": "\u2250",
50453 "dotminus;": "\u2238",
50454 "dotplus;": "\u2214",
50455 "dotsquare;": "\u22A1",
50456 "doublebarwedge;": "\u2306",
50457 "DoubleContourIntegral;": "\u222F",
50458 "DoubleDot;": "\u00A8",
50459 "DoubleDownArrow;": "\u21D3",
50460 "DoubleLeftArrow;": "\u21D0",
50461 "DoubleLeftRightArrow;": "\u21D4",
50462 "DoubleLeftTee;": "\u2AE4",
50463 "DoubleLongLeftArrow;": "\u27F8",
50464 "DoubleLongLeftRightArrow;": "\u27FA",
50465 "DoubleLongRightArrow;": "\u27F9",
50466 "DoubleRightArrow;": "\u21D2",
50467 "DoubleRightTee;": "\u22A8",
50468 "DoubleUpArrow;": "\u21D1",
50469 "DoubleUpDownArrow;": "\u21D5",
50470 "DoubleVerticalBar;": "\u2225",
50471 "DownArrow;": "\u2193",
50472 "Downarrow;": "\u21D3",
50473 "downarrow;": "\u2193",
50474 "DownArrowBar;": "\u2913",
50475 "DownArrowUpArrow;": "\u21F5",
50476 "DownBreve;": "\u0311",
50477 "downdownarrows;": "\u21CA",
50478 "downharpoonleft;": "\u21C3",
50479 "downharpoonright;": "\u21C2",
50480 "DownLeftRightVector;": "\u2950",
50481 "DownLeftTeeVector;": "\u295E",
50482 "DownLeftVector;": "\u21BD",
50483 "DownLeftVectorBar;": "\u2956",
50484 "DownRightTeeVector;": "\u295F",
50485 "DownRightVector;": "\u21C1",
50486 "DownRightVectorBar;": "\u2957",
50487 "DownTee;": "\u22A4",
50488 "DownTeeArrow;": "\u21A7",
50489 "drbkarow;": "\u2910",
50490 "drcorn;": "\u231F",
50491 "drcrop;": "\u230C",
50492 "Dscr;": "\uD835\uDC9F",
50493 "dscr;": "\uD835\uDCB9",
50497 "Dstrok;": "\u0110",
50498 "dstrok;": "\u0111",
50499 "dtdot;": "\u22F1",
50501 "dtrif;": "\u25BE",
50502 "duarr;": "\u21F5",
50503 "duhar;": "\u296F",
50504 "dwangle;": "\u29A6",
50507 "dzigrarr;": "\u27FF",
50508 "Eacute;": "\u00C9",
50509 "Eacute": "\u00C9",
50510 "eacute;": "\u00E9",
50511 "eacute": "\u00E9",
50512 "easter;": "\u2A6E",
50513 "Ecaron;": "\u011A",
50514 "ecaron;": "\u011B",
50516 "Ecirc;": "\u00CA",
50518 "ecirc;": "\u00EA",
50520 "ecolon;": "\u2255",
50523 "eDDot;": "\u2A77",
50528 "efDot;": "\u2252",
50529 "Efr;": "\uD835\uDD08",
50530 "efr;": "\uD835\uDD22",
50532 "Egrave;": "\u00C8",
50533 "Egrave": "\u00C8",
50534 "egrave;": "\u00E8",
50535 "egrave": "\u00E8",
50537 "egsdot;": "\u2A98",
50539 "Element;": "\u2208",
50540 "elinters;": "\u23E7",
50543 "elsdot;": "\u2A97",
50544 "Emacr;": "\u0112",
50545 "emacr;": "\u0113",
50546 "empty;": "\u2205",
50547 "emptyset;": "\u2205",
50548 "EmptySmallSquare;": "\u25FB",
50549 "emptyv;": "\u2205",
50550 "EmptyVerySmallSquare;": "\u25AB",
50552 "emsp13;": "\u2004",
50553 "emsp14;": "\u2005",
50557 "Eogon;": "\u0118",
50558 "eogon;": "\u0119",
50559 "Eopf;": "\uD835\uDD3C",
50560 "eopf;": "\uD835\uDD56",
50562 "eparsl;": "\u29E3",
50563 "eplus;": "\u2A71",
50565 "Epsilon;": "\u0395",
50566 "epsilon;": "\u03B5",
50567 "epsiv;": "\u03F5",
50568 "eqcirc;": "\u2256",
50569 "eqcolon;": "\u2255",
50570 "eqsim;": "\u2242",
50571 "eqslantgtr;": "\u2A96",
50572 "eqslantless;": "\u2A95",
50573 "Equal;": "\u2A75",
50574 "equals;": "\u003D",
50575 "EqualTilde;": "\u2242",
50576 "equest;": "\u225F",
50577 "Equilibrium;": "\u21CC",
50578 "equiv;": "\u2261",
50579 "equivDD;": "\u2A78",
50580 "eqvparsl;": "\u29E5",
50581 "erarr;": "\u2971",
50582 "erDot;": "\u2253",
50585 "esdot;": "\u2250",
50600 "exist;": "\u2203",
50601 "Exists;": "\u2203",
50602 "expectation;": "\u2130",
50603 "ExponentialE;": "\u2147",
50604 "exponentiale;": "\u2147",
50605 "fallingdotseq;": "\u2252",
50608 "female;": "\u2640",
50609 "ffilig;": "\uFB03",
50610 "fflig;": "\uFB00",
50611 "ffllig;": "\uFB04",
50612 "Ffr;": "\uD835\uDD09",
50613 "ffr;": "\uD835\uDD23",
50614 "filig;": "\uFB01",
50615 "FilledSmallSquare;": "\u25FC",
50616 "FilledVerySmallSquare;": "\u25AA",
50617 "fjlig;": "\u0066\u006A",
50619 "fllig;": "\uFB02",
50620 "fltns;": "\u25B1",
50622 "Fopf;": "\uD835\uDD3D",
50623 "fopf;": "\uD835\uDD57",
50624 "ForAll;": "\u2200",
50625 "forall;": "\u2200",
50627 "forkv;": "\u2AD9",
50628 "Fouriertrf;": "\u2131",
50629 "fpartint;": "\u2A0D",
50630 "frac12;": "\u00BD",
50631 "frac12": "\u00BD",
50632 "frac13;": "\u2153",
50633 "frac14;": "\u00BC",
50634 "frac14": "\u00BC",
50635 "frac15;": "\u2155",
50636 "frac16;": "\u2159",
50637 "frac18;": "\u215B",
50638 "frac23;": "\u2154",
50639 "frac25;": "\u2156",
50640 "frac34;": "\u00BE",
50641 "frac34": "\u00BE",
50642 "frac35;": "\u2157",
50643 "frac38;": "\u215C",
50644 "frac45;": "\u2158",
50645 "frac56;": "\u215A",
50646 "frac58;": "\u215D",
50647 "frac78;": "\u215E",
50648 "frasl;": "\u2044",
50649 "frown;": "\u2322",
50651 "fscr;": "\uD835\uDCBB",
50652 "gacute;": "\u01F5",
50653 "Gamma;": "\u0393",
50654 "gamma;": "\u03B3",
50655 "Gammad;": "\u03DC",
50656 "gammad;": "\u03DD",
50658 "Gbreve;": "\u011E",
50659 "gbreve;": "\u011F",
50660 "Gcedil;": "\u0122",
50661 "Gcirc;": "\u011C",
50662 "gcirc;": "\u011D",
50673 "geqslant;": "\u2A7E",
50675 "gescc;": "\u2AA9",
50676 "gesdot;": "\u2A80",
50677 "gesdoto;": "\u2A82",
50678 "gesdotol;": "\u2A84",
50679 "gesl;": "\u22DB\uFE00",
50680 "gesles;": "\u2A94",
50681 "Gfr;": "\uD835\uDD0A",
50682 "gfr;": "\uD835\uDD24",
50686 "gimel;": "\u2137",
50694 "gnapprox;": "\u2A8A",
50698 "gneqq;": "\u2269",
50699 "gnsim;": "\u22E7",
50700 "Gopf;": "\uD835\uDD3E",
50701 "gopf;": "\uD835\uDD58",
50702 "grave;": "\u0060",
50703 "GreaterEqual;": "\u2265",
50704 "GreaterEqualLess;": "\u22DB",
50705 "GreaterFullEqual;": "\u2267",
50706 "GreaterGreater;": "\u2AA2",
50707 "GreaterLess;": "\u2277",
50708 "GreaterSlantEqual;": "\u2A7E",
50709 "GreaterTilde;": "\u2273",
50710 "Gscr;": "\uD835\uDCA2",
50713 "gsime;": "\u2A8E",
50714 "gsiml;": "\u2A90",
50721 "gtcir;": "\u2A7A",
50722 "gtdot;": "\u22D7",
50723 "gtlPar;": "\u2995",
50724 "gtquest;": "\u2A7C",
50725 "gtrapprox;": "\u2A86",
50726 "gtrarr;": "\u2978",
50727 "gtrdot;": "\u22D7",
50728 "gtreqless;": "\u22DB",
50729 "gtreqqless;": "\u2A8C",
50730 "gtrless;": "\u2277",
50731 "gtrsim;": "\u2273",
50732 "gvertneqq;": "\u2269\uFE00",
50733 "gvnE;": "\u2269\uFE00",
50734 "Hacek;": "\u02C7",
50735 "hairsp;": "\u200A",
50737 "hamilt;": "\u210B",
50738 "HARDcy;": "\u042A",
50739 "hardcy;": "\u044A",
50742 "harrcir;": "\u2948",
50743 "harrw;": "\u21AD",
50746 "Hcirc;": "\u0124",
50747 "hcirc;": "\u0125",
50748 "hearts;": "\u2665",
50749 "heartsuit;": "\u2665",
50750 "hellip;": "\u2026",
50751 "hercon;": "\u22B9",
50753 "hfr;": "\uD835\uDD25",
50754 "HilbertSpace;": "\u210B",
50755 "hksearow;": "\u2925",
50756 "hkswarow;": "\u2926",
50757 "hoarr;": "\u21FF",
50758 "homtht;": "\u223B",
50759 "hookleftarrow;": "\u21A9",
50760 "hookrightarrow;": "\u21AA",
50762 "hopf;": "\uD835\uDD59",
50763 "horbar;": "\u2015",
50764 "HorizontalLine;": "\u2500",
50766 "hscr;": "\uD835\uDCBD",
50767 "hslash;": "\u210F",
50768 "Hstrok;": "\u0126",
50769 "hstrok;": "\u0127",
50770 "HumpDownHump;": "\u224E",
50771 "HumpEqual;": "\u224F",
50772 "hybull;": "\u2043",
50773 "hyphen;": "\u2010",
50774 "Iacute;": "\u00CD",
50775 "Iacute": "\u00CD",
50776 "iacute;": "\u00ED",
50777 "iacute": "\u00ED",
50779 "Icirc;": "\u00CE",
50781 "icirc;": "\u00EE",
50788 "iexcl;": "\u00A1",
50792 "ifr;": "\uD835\uDD26",
50793 "Igrave;": "\u00CC",
50794 "Igrave": "\u00CC",
50795 "igrave;": "\u00EC",
50796 "igrave": "\u00EC",
50798 "iiiint;": "\u2A0C",
50799 "iiint;": "\u222D",
50800 "iinfin;": "\u29DC",
50801 "iiota;": "\u2129",
50802 "IJlig;": "\u0132",
50803 "ijlig;": "\u0133",
50805 "Imacr;": "\u012A",
50806 "imacr;": "\u012B",
50807 "image;": "\u2111",
50808 "ImaginaryI;": "\u2148",
50809 "imagline;": "\u2110",
50810 "imagpart;": "\u2111",
50811 "imath;": "\u0131",
50813 "imped;": "\u01B5",
50814 "Implies;": "\u21D2",
50816 "incare;": "\u2105",
50817 "infin;": "\u221E",
50818 "infintie;": "\u29DD",
50819 "inodot;": "\u0131",
50822 "intcal;": "\u22BA",
50823 "integers;": "\u2124",
50824 "Integral;": "\u222B",
50825 "intercal;": "\u22BA",
50826 "Intersection;": "\u22C2",
50827 "intlarhk;": "\u2A17",
50828 "intprod;": "\u2A3C",
50829 "InvisibleComma;": "\u2063",
50830 "InvisibleTimes;": "\u2062",
50833 "Iogon;": "\u012E",
50834 "iogon;": "\u012F",
50835 "Iopf;": "\uD835\uDD40",
50836 "iopf;": "\uD835\uDD5A",
50839 "iprod;": "\u2A3C",
50840 "iquest;": "\u00BF",
50841 "iquest": "\u00BF",
50843 "iscr;": "\uD835\uDCBE",
50845 "isindot;": "\u22F5",
50846 "isinE;": "\u22F9",
50847 "isins;": "\u22F4",
50848 "isinsv;": "\u22F3",
50849 "isinv;": "\u2208",
50851 "Itilde;": "\u0128",
50852 "itilde;": "\u0129",
50853 "Iukcy;": "\u0406",
50854 "iukcy;": "\u0456",
50859 "Jcirc;": "\u0134",
50860 "jcirc;": "\u0135",
50863 "Jfr;": "\uD835\uDD0D",
50864 "jfr;": "\uD835\uDD27",
50865 "jmath;": "\u0237",
50866 "Jopf;": "\uD835\uDD41",
50867 "jopf;": "\uD835\uDD5B",
50868 "Jscr;": "\uD835\uDCA5",
50869 "jscr;": "\uD835\uDCBF",
50870 "Jsercy;": "\u0408",
50871 "jsercy;": "\u0458",
50872 "Jukcy;": "\u0404",
50873 "jukcy;": "\u0454",
50874 "Kappa;": "\u039A",
50875 "kappa;": "\u03BA",
50876 "kappav;": "\u03F0",
50877 "Kcedil;": "\u0136",
50878 "kcedil;": "\u0137",
50881 "Kfr;": "\uD835\uDD0E",
50882 "kfr;": "\uD835\uDD28",
50883 "kgreen;": "\u0138",
50888 "Kopf;": "\uD835\uDD42",
50889 "kopf;": "\uD835\uDD5C",
50890 "Kscr;": "\uD835\uDCA6",
50891 "kscr;": "\uD835\uDCC0",
50892 "lAarr;": "\u21DA",
50893 "Lacute;": "\u0139",
50894 "lacute;": "\u013A",
50895 "laemptyv;": "\u29B4",
50896 "lagran;": "\u2112",
50897 "Lambda;": "\u039B",
50898 "lambda;": "\u03BB",
50901 "langd;": "\u2991",
50902 "langle;": "\u27E8",
50904 "Laplacetrf;": "\u2112",
50905 "laquo;": "\u00AB",
50910 "larrb;": "\u21E4",
50911 "larrbfs;": "\u291F",
50912 "larrfs;": "\u291D",
50913 "larrhk;": "\u21A9",
50914 "larrlp;": "\u21AB",
50915 "larrpl;": "\u2939",
50916 "larrsim;": "\u2973",
50917 "larrtl;": "\u21A2",
50919 "lAtail;": "\u291B",
50920 "latail;": "\u2919",
50922 "lates;": "\u2AAD\uFE00",
50923 "lBarr;": "\u290E",
50924 "lbarr;": "\u290C",
50925 "lbbrk;": "\u2772",
50926 "lbrace;": "\u007B",
50927 "lbrack;": "\u005B",
50928 "lbrke;": "\u298B",
50929 "lbrksld;": "\u298F",
50930 "lbrkslu;": "\u298D",
50931 "Lcaron;": "\u013D",
50932 "lcaron;": "\u013E",
50933 "Lcedil;": "\u013B",
50934 "lcedil;": "\u013C",
50935 "lceil;": "\u2308",
50940 "ldquo;": "\u201C",
50941 "ldquor;": "\u201E",
50942 "ldrdhar;": "\u2967",
50943 "ldrushar;": "\u294B",
50947 "LeftAngleBracket;": "\u27E8",
50948 "LeftArrow;": "\u2190",
50949 "Leftarrow;": "\u21D0",
50950 "leftarrow;": "\u2190",
50951 "LeftArrowBar;": "\u21E4",
50952 "LeftArrowRightArrow;": "\u21C6",
50953 "leftarrowtail;": "\u21A2",
50954 "LeftCeiling;": "\u2308",
50955 "LeftDoubleBracket;": "\u27E6",
50956 "LeftDownTeeVector;": "\u2961",
50957 "LeftDownVector;": "\u21C3",
50958 "LeftDownVectorBar;": "\u2959",
50959 "LeftFloor;": "\u230A",
50960 "leftharpoondown;": "\u21BD",
50961 "leftharpoonup;": "\u21BC",
50962 "leftleftarrows;": "\u21C7",
50963 "LeftRightArrow;": "\u2194",
50964 "Leftrightarrow;": "\u21D4",
50965 "leftrightarrow;": "\u2194",
50966 "leftrightarrows;": "\u21C6",
50967 "leftrightharpoons;": "\u21CB",
50968 "leftrightsquigarrow;": "\u21AD",
50969 "LeftRightVector;": "\u294E",
50970 "LeftTee;": "\u22A3",
50971 "LeftTeeArrow;": "\u21A4",
50972 "LeftTeeVector;": "\u295A",
50973 "leftthreetimes;": "\u22CB",
50974 "LeftTriangle;": "\u22B2",
50975 "LeftTriangleBar;": "\u29CF",
50976 "LeftTriangleEqual;": "\u22B4",
50977 "LeftUpDownVector;": "\u2951",
50978 "LeftUpTeeVector;": "\u2960",
50979 "LeftUpVector;": "\u21BF",
50980 "LeftUpVectorBar;": "\u2958",
50981 "LeftVector;": "\u21BC",
50982 "LeftVectorBar;": "\u2952",
50987 "leqslant;": "\u2A7D",
50989 "lescc;": "\u2AA8",
50990 "lesdot;": "\u2A7F",
50991 "lesdoto;": "\u2A81",
50992 "lesdotor;": "\u2A83",
50993 "lesg;": "\u22DA\uFE00",
50994 "lesges;": "\u2A93",
50995 "lessapprox;": "\u2A85",
50996 "lessdot;": "\u22D6",
50997 "lesseqgtr;": "\u22DA",
50998 "lesseqqgtr;": "\u2A8B",
50999 "LessEqualGreater;": "\u22DA",
51000 "LessFullEqual;": "\u2266",
51001 "LessGreater;": "\u2276",
51002 "lessgtr;": "\u2276",
51003 "LessLess;": "\u2AA1",
51004 "lesssim;": "\u2272",
51005 "LessSlantEqual;": "\u2A7D",
51006 "LessTilde;": "\u2272",
51007 "lfisht;": "\u297C",
51008 "lfloor;": "\u230A",
51009 "Lfr;": "\uD835\uDD0F",
51010 "lfr;": "\uD835\uDD29",
51014 "lhard;": "\u21BD",
51015 "lharu;": "\u21BC",
51016 "lharul;": "\u296A",
51017 "lhblk;": "\u2584",
51022 "llarr;": "\u21C7",
51023 "llcorner;": "\u231E",
51024 "Lleftarrow;": "\u21DA",
51025 "llhard;": "\u296B",
51026 "lltri;": "\u25FA",
51027 "Lmidot;": "\u013F",
51028 "lmidot;": "\u0140",
51029 "lmoust;": "\u23B0",
51030 "lmoustache;": "\u23B0",
51032 "lnapprox;": "\u2A89",
51036 "lneqq;": "\u2268",
51037 "lnsim;": "\u22E6",
51038 "loang;": "\u27EC",
51039 "loarr;": "\u21FD",
51040 "lobrk;": "\u27E6",
51041 "LongLeftArrow;": "\u27F5",
51042 "Longleftarrow;": "\u27F8",
51043 "longleftarrow;": "\u27F5",
51044 "LongLeftRightArrow;": "\u27F7",
51045 "Longleftrightarrow;": "\u27FA",
51046 "longleftrightarrow;": "\u27F7",
51047 "longmapsto;": "\u27FC",
51048 "LongRightArrow;": "\u27F6",
51049 "Longrightarrow;": "\u27F9",
51050 "longrightarrow;": "\u27F6",
51051 "looparrowleft;": "\u21AB",
51052 "looparrowright;": "\u21AC",
51053 "lopar;": "\u2985",
51054 "Lopf;": "\uD835\uDD43",
51055 "lopf;": "\uD835\uDD5D",
51056 "loplus;": "\u2A2D",
51057 "lotimes;": "\u2A34",
51058 "lowast;": "\u2217",
51059 "lowbar;": "\u005F",
51060 "LowerLeftArrow;": "\u2199",
51061 "LowerRightArrow;": "\u2198",
51063 "lozenge;": "\u25CA",
51066 "lparlt;": "\u2993",
51067 "lrarr;": "\u21C6",
51068 "lrcorner;": "\u231F",
51069 "lrhar;": "\u21CB",
51070 "lrhard;": "\u296D",
51072 "lrtri;": "\u22BF",
51073 "lsaquo;": "\u2039",
51075 "lscr;": "\uD835\uDCC1",
51079 "lsime;": "\u2A8D",
51080 "lsimg;": "\u2A8F",
51082 "lsquo;": "\u2018",
51083 "lsquor;": "\u201A",
51084 "Lstrok;": "\u0141",
51085 "lstrok;": "\u0142",
51092 "ltcir;": "\u2A79",
51093 "ltdot;": "\u22D6",
51094 "lthree;": "\u22CB",
51095 "ltimes;": "\u22C9",
51096 "ltlarr;": "\u2976",
51097 "ltquest;": "\u2A7B",
51099 "ltrie;": "\u22B4",
51100 "ltrif;": "\u25C2",
51101 "ltrPar;": "\u2996",
51102 "lurdshar;": "\u294A",
51103 "luruhar;": "\u2966",
51104 "lvertneqq;": "\u2268\uFE00",
51105 "lvnE;": "\u2268\uFE00",
51110 "maltese;": "\u2720",
51113 "mapsto;": "\u21A6",
51114 "mapstodown;": "\u21A7",
51115 "mapstoleft;": "\u21A4",
51116 "mapstoup;": "\u21A5",
51117 "marker;": "\u25AE",
51118 "mcomma;": "\u2A29",
51121 "mdash;": "\u2014",
51122 "mDDot;": "\u223A",
51123 "measuredangle;": "\u2221",
51124 "MediumSpace;": "\u205F",
51125 "Mellintrf;": "\u2133",
51126 "Mfr;": "\uD835\uDD10",
51127 "mfr;": "\uD835\uDD2A",
51129 "micro;": "\u00B5",
51132 "midast;": "\u002A",
51133 "midcir;": "\u2AF0",
51134 "middot;": "\u00B7",
51135 "middot": "\u00B7",
51136 "minus;": "\u2212",
51137 "minusb;": "\u229F",
51138 "minusd;": "\u2238",
51139 "minusdu;": "\u2A2A",
51140 "MinusPlus;": "\u2213",
51143 "mnplus;": "\u2213",
51144 "models;": "\u22A7",
51145 "Mopf;": "\uD835\uDD44",
51146 "mopf;": "\uD835\uDD5E",
51149 "mscr;": "\uD835\uDCC2",
51150 "mstpos;": "\u223E",
51153 "multimap;": "\u22B8",
51154 "mumap;": "\u22B8",
51155 "nabla;": "\u2207",
51156 "Nacute;": "\u0143",
51157 "nacute;": "\u0144",
51158 "nang;": "\u2220\u20D2",
51160 "napE;": "\u2A70\u0338",
51161 "napid;": "\u224B\u0338",
51162 "napos;": "\u0149",
51163 "napprox;": "\u2249",
51164 "natur;": "\u266E",
51165 "natural;": "\u266E",
51166 "naturals;": "\u2115",
51169 "nbump;": "\u224E\u0338",
51170 "nbumpe;": "\u224F\u0338",
51172 "Ncaron;": "\u0147",
51173 "ncaron;": "\u0148",
51174 "Ncedil;": "\u0145",
51175 "ncedil;": "\u0146",
51176 "ncong;": "\u2247",
51177 "ncongdot;": "\u2A6D\u0338",
51181 "ndash;": "\u2013",
51183 "nearhk;": "\u2924",
51184 "neArr;": "\u21D7",
51185 "nearr;": "\u2197",
51186 "nearrow;": "\u2197",
51187 "nedot;": "\u2250\u0338",
51188 "NegativeMediumSpace;": "\u200B",
51189 "NegativeThickSpace;": "\u200B",
51190 "NegativeThinSpace;": "\u200B",
51191 "NegativeVeryThinSpace;": "\u200B",
51192 "nequiv;": "\u2262",
51193 "nesear;": "\u2928",
51194 "nesim;": "\u2242\u0338",
51195 "NestedGreaterGreater;": "\u226B",
51196 "NestedLessLess;": "\u226A",
51197 "NewLine;": "\u000A",
51198 "nexist;": "\u2204",
51199 "nexists;": "\u2204",
51200 "Nfr;": "\uD835\uDD11",
51201 "nfr;": "\uD835\uDD2B",
51202 "ngE;": "\u2267\u0338",
51205 "ngeqq;": "\u2267\u0338",
51206 "ngeqslant;": "\u2A7E\u0338",
51207 "nges;": "\u2A7E\u0338",
51208 "nGg;": "\u22D9\u0338",
51209 "ngsim;": "\u2275",
51210 "nGt;": "\u226B\u20D2",
51213 "nGtv;": "\u226B\u0338",
51214 "nhArr;": "\u21CE",
51215 "nharr;": "\u21AE",
51216 "nhpar;": "\u2AF2",
51223 "nlArr;": "\u21CD",
51224 "nlarr;": "\u219A",
51226 "nlE;": "\u2266\u0338",
51228 "nLeftarrow;": "\u21CD",
51229 "nleftarrow;": "\u219A",
51230 "nLeftrightarrow;": "\u21CE",
51231 "nleftrightarrow;": "\u21AE",
51233 "nleqq;": "\u2266\u0338",
51234 "nleqslant;": "\u2A7D\u0338",
51235 "nles;": "\u2A7D\u0338",
51236 "nless;": "\u226E",
51237 "nLl;": "\u22D8\u0338",
51238 "nlsim;": "\u2274",
51239 "nLt;": "\u226A\u20D2",
51241 "nltri;": "\u22EA",
51242 "nltrie;": "\u22EC",
51243 "nLtv;": "\u226A\u0338",
51245 "NoBreak;": "\u2060",
51246 "NonBreakingSpace;": "\u00A0",
51248 "nopf;": "\uD835\uDD5F",
51252 "NotCongruent;": "\u2262",
51253 "NotCupCap;": "\u226D",
51254 "NotDoubleVerticalBar;": "\u2226",
51255 "NotElement;": "\u2209",
51256 "NotEqual;": "\u2260",
51257 "NotEqualTilde;": "\u2242\u0338",
51258 "NotExists;": "\u2204",
51259 "NotGreater;": "\u226F",
51260 "NotGreaterEqual;": "\u2271",
51261 "NotGreaterFullEqual;": "\u2267\u0338",
51262 "NotGreaterGreater;": "\u226B\u0338",
51263 "NotGreaterLess;": "\u2279",
51264 "NotGreaterSlantEqual;": "\u2A7E\u0338",
51265 "NotGreaterTilde;": "\u2275",
51266 "NotHumpDownHump;": "\u224E\u0338",
51267 "NotHumpEqual;": "\u224F\u0338",
51268 "notin;": "\u2209",
51269 "notindot;": "\u22F5\u0338",
51270 "notinE;": "\u22F9\u0338",
51271 "notinva;": "\u2209",
51272 "notinvb;": "\u22F7",
51273 "notinvc;": "\u22F6",
51274 "NotLeftTriangle;": "\u22EA",
51275 "NotLeftTriangleBar;": "\u29CF\u0338",
51276 "NotLeftTriangleEqual;": "\u22EC",
51277 "NotLess;": "\u226E",
51278 "NotLessEqual;": "\u2270",
51279 "NotLessGreater;": "\u2278",
51280 "NotLessLess;": "\u226A\u0338",
51281 "NotLessSlantEqual;": "\u2A7D\u0338",
51282 "NotLessTilde;": "\u2274",
51283 "NotNestedGreaterGreater;": "\u2AA2\u0338",
51284 "NotNestedLessLess;": "\u2AA1\u0338",
51285 "notni;": "\u220C",
51286 "notniva;": "\u220C",
51287 "notnivb;": "\u22FE",
51288 "notnivc;": "\u22FD",
51289 "NotPrecedes;": "\u2280",
51290 "NotPrecedesEqual;": "\u2AAF\u0338",
51291 "NotPrecedesSlantEqual;": "\u22E0",
51292 "NotReverseElement;": "\u220C",
51293 "NotRightTriangle;": "\u22EB",
51294 "NotRightTriangleBar;": "\u29D0\u0338",
51295 "NotRightTriangleEqual;": "\u22ED",
51296 "NotSquareSubset;": "\u228F\u0338",
51297 "NotSquareSubsetEqual;": "\u22E2",
51298 "NotSquareSuperset;": "\u2290\u0338",
51299 "NotSquareSupersetEqual;": "\u22E3",
51300 "NotSubset;": "\u2282\u20D2",
51301 "NotSubsetEqual;": "\u2288",
51302 "NotSucceeds;": "\u2281",
51303 "NotSucceedsEqual;": "\u2AB0\u0338",
51304 "NotSucceedsSlantEqual;": "\u22E1",
51305 "NotSucceedsTilde;": "\u227F\u0338",
51306 "NotSuperset;": "\u2283\u20D2",
51307 "NotSupersetEqual;": "\u2289",
51308 "NotTilde;": "\u2241",
51309 "NotTildeEqual;": "\u2244",
51310 "NotTildeFullEqual;": "\u2247",
51311 "NotTildeTilde;": "\u2249",
51312 "NotVerticalBar;": "\u2224",
51314 "nparallel;": "\u2226",
51315 "nparsl;": "\u2AFD\u20E5",
51316 "npart;": "\u2202\u0338",
51317 "npolint;": "\u2A14",
51319 "nprcue;": "\u22E0",
51320 "npre;": "\u2AAF\u0338",
51321 "nprec;": "\u2280",
51322 "npreceq;": "\u2AAF\u0338",
51323 "nrArr;": "\u21CF",
51324 "nrarr;": "\u219B",
51325 "nrarrc;": "\u2933\u0338",
51326 "nrarrw;": "\u219D\u0338",
51327 "nRightarrow;": "\u21CF",
51328 "nrightarrow;": "\u219B",
51329 "nrtri;": "\u22EB",
51330 "nrtrie;": "\u22ED",
51332 "nsccue;": "\u22E1",
51333 "nsce;": "\u2AB0\u0338",
51334 "Nscr;": "\uD835\uDCA9",
51335 "nscr;": "\uD835\uDCC3",
51336 "nshortmid;": "\u2224",
51337 "nshortparallel;": "\u2226",
51339 "nsime;": "\u2244",
51340 "nsimeq;": "\u2244",
51341 "nsmid;": "\u2224",
51342 "nspar;": "\u2226",
51343 "nsqsube;": "\u22E2",
51344 "nsqsupe;": "\u22E3",
51346 "nsubE;": "\u2AC5\u0338",
51347 "nsube;": "\u2288",
51348 "nsubset;": "\u2282\u20D2",
51349 "nsubseteq;": "\u2288",
51350 "nsubseteqq;": "\u2AC5\u0338",
51351 "nsucc;": "\u2281",
51352 "nsucceq;": "\u2AB0\u0338",
51354 "nsupE;": "\u2AC6\u0338",
51355 "nsupe;": "\u2289",
51356 "nsupset;": "\u2283\u20D2",
51357 "nsupseteq;": "\u2289",
51358 "nsupseteqq;": "\u2AC6\u0338",
51360 "Ntilde;": "\u00D1",
51361 "Ntilde": "\u00D1",
51362 "ntilde;": "\u00F1",
51363 "ntilde": "\u00F1",
51365 "ntriangleleft;": "\u22EA",
51366 "ntrianglelefteq;": "\u22EC",
51367 "ntriangleright;": "\u22EB",
51368 "ntrianglerighteq;": "\u22ED",
51372 "numero;": "\u2116",
51373 "numsp;": "\u2007",
51374 "nvap;": "\u224D\u20D2",
51375 "nVDash;": "\u22AF",
51376 "nVdash;": "\u22AE",
51377 "nvDash;": "\u22AD",
51378 "nvdash;": "\u22AC",
51379 "nvge;": "\u2265\u20D2",
51380 "nvgt;": "\u003E\u20D2",
51381 "nvHarr;": "\u2904",
51382 "nvinfin;": "\u29DE",
51383 "nvlArr;": "\u2902",
51384 "nvle;": "\u2264\u20D2",
51385 "nvlt;": "\u003C\u20D2",
51386 "nvltrie;": "\u22B4\u20D2",
51387 "nvrArr;": "\u2903",
51388 "nvrtrie;": "\u22B5\u20D2",
51389 "nvsim;": "\u223C\u20D2",
51390 "nwarhk;": "\u2923",
51391 "nwArr;": "\u21D6",
51392 "nwarr;": "\u2196",
51393 "nwarrow;": "\u2196",
51394 "nwnear;": "\u2927",
51395 "Oacute;": "\u00D3",
51396 "Oacute": "\u00D3",
51397 "oacute;": "\u00F3",
51398 "oacute": "\u00F3",
51401 "Ocirc;": "\u00D4",
51403 "ocirc;": "\u00F4",
51407 "odash;": "\u229D",
51408 "Odblac;": "\u0150",
51409 "odblac;": "\u0151",
51412 "odsold;": "\u29BC",
51413 "OElig;": "\u0152",
51414 "oelig;": "\u0153",
51415 "ofcir;": "\u29BF",
51416 "Ofr;": "\uD835\uDD12",
51417 "ofr;": "\uD835\uDD2C",
51419 "Ograve;": "\u00D2",
51420 "Ograve": "\u00D2",
51421 "ograve;": "\u00F2",
51422 "ograve": "\u00F2",
51424 "ohbar;": "\u29B5",
51427 "olarr;": "\u21BA",
51428 "olcir;": "\u29BE",
51429 "olcross;": "\u29BB",
51430 "oline;": "\u203E",
51432 "Omacr;": "\u014C",
51433 "omacr;": "\u014D",
51434 "Omega;": "\u03A9",
51435 "omega;": "\u03C9",
51436 "Omicron;": "\u039F",
51437 "omicron;": "\u03BF",
51439 "ominus;": "\u2296",
51440 "Oopf;": "\uD835\uDD46",
51441 "oopf;": "\uD835\uDD60",
51443 "OpenCurlyDoubleQuote;": "\u201C",
51444 "OpenCurlyQuote;": "\u2018",
51445 "operp;": "\u29B9",
51446 "oplus;": "\u2295",
51449 "orarr;": "\u21BB",
51451 "order;": "\u2134",
51452 "orderof;": "\u2134",
51457 "origof;": "\u22B6",
51459 "orslope;": "\u2A57",
51462 "Oscr;": "\uD835\uDCAA",
51464 "Oslash;": "\u00D8",
51465 "Oslash": "\u00D8",
51466 "oslash;": "\u00F8",
51467 "oslash": "\u00F8",
51469 "Otilde;": "\u00D5",
51470 "Otilde": "\u00D5",
51471 "otilde;": "\u00F5",
51472 "otilde": "\u00F5",
51473 "Otimes;": "\u2A37",
51474 "otimes;": "\u2297",
51475 "otimesas;": "\u2A36",
51480 "ovbar;": "\u233D",
51481 "OverBar;": "\u203E",
51482 "OverBrace;": "\u23DE",
51483 "OverBracket;": "\u23B4",
51484 "OverParenthesis;": "\u23DC",
51488 "parallel;": "\u2225",
51489 "parsim;": "\u2AF3",
51490 "parsl;": "\u2AFD",
51492 "PartialD;": "\u2202",
51495 "percnt;": "\u0025",
51496 "period;": "\u002E",
51497 "permil;": "\u2030",
51499 "pertenk;": "\u2031",
51500 "Pfr;": "\uD835\uDD13",
51501 "pfr;": "\uD835\uDD2D",
51505 "phmmat;": "\u2133",
51506 "phone;": "\u260E",
51509 "pitchfork;": "\u22D4",
51511 "planck;": "\u210F",
51512 "planckh;": "\u210E",
51513 "plankv;": "\u210F",
51515 "plusacir;": "\u2A23",
51516 "plusb;": "\u229E",
51517 "pluscir;": "\u2A22",
51518 "plusdo;": "\u2214",
51519 "plusdu;": "\u2A25",
51520 "pluse;": "\u2A72",
51521 "PlusMinus;": "\u00B1",
51522 "plusmn;": "\u00B1",
51523 "plusmn": "\u00B1",
51524 "plussim;": "\u2A26",
51525 "plustwo;": "\u2A27",
51527 "Poincareplane;": "\u210C",
51528 "pointint;": "\u2A15",
51530 "popf;": "\uD835\uDD61",
51531 "pound;": "\u00A3",
51536 "prcue;": "\u227C",
51540 "precapprox;": "\u2AB7",
51541 "preccurlyeq;": "\u227C",
51542 "Precedes;": "\u227A",
51543 "PrecedesEqual;": "\u2AAF",
51544 "PrecedesSlantEqual;": "\u227C",
51545 "PrecedesTilde;": "\u227E",
51546 "preceq;": "\u2AAF",
51547 "precnapprox;": "\u2AB9",
51548 "precneqq;": "\u2AB5",
51549 "precnsim;": "\u22E8",
51550 "precsim;": "\u227E",
51551 "Prime;": "\u2033",
51552 "prime;": "\u2032",
51553 "primes;": "\u2119",
51554 "prnap;": "\u2AB9",
51556 "prnsim;": "\u22E8",
51558 "Product;": "\u220F",
51559 "profalar;": "\u232E",
51560 "profline;": "\u2312",
51561 "profsurf;": "\u2313",
51563 "Proportion;": "\u2237",
51564 "Proportional;": "\u221D",
51565 "propto;": "\u221D",
51566 "prsim;": "\u227E",
51567 "prurel;": "\u22B0",
51568 "Pscr;": "\uD835\uDCAB",
51569 "pscr;": "\uD835\uDCC5",
51572 "puncsp;": "\u2008",
51573 "Qfr;": "\uD835\uDD14",
51574 "qfr;": "\uD835\uDD2E",
51577 "qopf;": "\uD835\uDD62",
51578 "qprime;": "\u2057",
51579 "Qscr;": "\uD835\uDCAC",
51580 "qscr;": "\uD835\uDCC6",
51581 "quaternions;": "\u210D",
51582 "quatint;": "\u2A16",
51583 "quest;": "\u003F",
51584 "questeq;": "\u225F",
51589 "rAarr;": "\u21DB",
51590 "race;": "\u223D\u0331",
51591 "Racute;": "\u0154",
51592 "racute;": "\u0155",
51593 "radic;": "\u221A",
51594 "raemptyv;": "\u29B3",
51597 "rangd;": "\u2992",
51598 "range;": "\u29A5",
51599 "rangle;": "\u27E9",
51600 "raquo;": "\u00BB",
51605 "rarrap;": "\u2975",
51606 "rarrb;": "\u21E5",
51607 "rarrbfs;": "\u2920",
51608 "rarrc;": "\u2933",
51609 "rarrfs;": "\u291E",
51610 "rarrhk;": "\u21AA",
51611 "rarrlp;": "\u21AC",
51612 "rarrpl;": "\u2945",
51613 "rarrsim;": "\u2974",
51614 "Rarrtl;": "\u2916",
51615 "rarrtl;": "\u21A3",
51616 "rarrw;": "\u219D",
51617 "rAtail;": "\u291C",
51618 "ratail;": "\u291A",
51619 "ratio;": "\u2236",
51620 "rationals;": "\u211A",
51621 "RBarr;": "\u2910",
51622 "rBarr;": "\u290F",
51623 "rbarr;": "\u290D",
51624 "rbbrk;": "\u2773",
51625 "rbrace;": "\u007D",
51626 "rbrack;": "\u005D",
51627 "rbrke;": "\u298C",
51628 "rbrksld;": "\u298E",
51629 "rbrkslu;": "\u2990",
51630 "Rcaron;": "\u0158",
51631 "rcaron;": "\u0159",
51632 "Rcedil;": "\u0156",
51633 "rcedil;": "\u0157",
51634 "rceil;": "\u2309",
51639 "rdldhar;": "\u2969",
51640 "rdquo;": "\u201D",
51641 "rdquor;": "\u201D",
51645 "realine;": "\u211B",
51646 "realpart;": "\u211C",
51647 "reals;": "\u211D",
51653 "ReverseElement;": "\u220B",
51654 "ReverseEquilibrium;": "\u21CB",
51655 "ReverseUpEquilibrium;": "\u296F",
51656 "rfisht;": "\u297D",
51657 "rfloor;": "\u230B",
51659 "rfr;": "\uD835\uDD2F",
51661 "rhard;": "\u21C1",
51662 "rharu;": "\u21C0",
51663 "rharul;": "\u296C",
51667 "RightAngleBracket;": "\u27E9",
51668 "RightArrow;": "\u2192",
51669 "Rightarrow;": "\u21D2",
51670 "rightarrow;": "\u2192",
51671 "RightArrowBar;": "\u21E5",
51672 "RightArrowLeftArrow;": "\u21C4",
51673 "rightarrowtail;": "\u21A3",
51674 "RightCeiling;": "\u2309",
51675 "RightDoubleBracket;": "\u27E7",
51676 "RightDownTeeVector;": "\u295D",
51677 "RightDownVector;": "\u21C2",
51678 "RightDownVectorBar;": "\u2955",
51679 "RightFloor;": "\u230B",
51680 "rightharpoondown;": "\u21C1",
51681 "rightharpoonup;": "\u21C0",
51682 "rightleftarrows;": "\u21C4",
51683 "rightleftharpoons;": "\u21CC",
51684 "rightrightarrows;": "\u21C9",
51685 "rightsquigarrow;": "\u219D",
51686 "RightTee;": "\u22A2",
51687 "RightTeeArrow;": "\u21A6",
51688 "RightTeeVector;": "\u295B",
51689 "rightthreetimes;": "\u22CC",
51690 "RightTriangle;": "\u22B3",
51691 "RightTriangleBar;": "\u29D0",
51692 "RightTriangleEqual;": "\u22B5",
51693 "RightUpDownVector;": "\u294F",
51694 "RightUpTeeVector;": "\u295C",
51695 "RightUpVector;": "\u21BE",
51696 "RightUpVectorBar;": "\u2954",
51697 "RightVector;": "\u21C0",
51698 "RightVectorBar;": "\u2953",
51700 "risingdotseq;": "\u2253",
51701 "rlarr;": "\u21C4",
51702 "rlhar;": "\u21CC",
51704 "rmoust;": "\u23B1",
51705 "rmoustache;": "\u23B1",
51706 "rnmid;": "\u2AEE",
51707 "roang;": "\u27ED",
51708 "roarr;": "\u21FE",
51709 "robrk;": "\u27E7",
51710 "ropar;": "\u2986",
51712 "ropf;": "\uD835\uDD63",
51713 "roplus;": "\u2A2E",
51714 "rotimes;": "\u2A35",
51715 "RoundImplies;": "\u2970",
51717 "rpargt;": "\u2994",
51718 "rppolint;": "\u2A12",
51719 "rrarr;": "\u21C9",
51720 "Rrightarrow;": "\u21DB",
51721 "rsaquo;": "\u203A",
51723 "rscr;": "\uD835\uDCC7",
51727 "rsquo;": "\u2019",
51728 "rsquor;": "\u2019",
51729 "rthree;": "\u22CC",
51730 "rtimes;": "\u22CA",
51732 "rtrie;": "\u22B5",
51733 "rtrif;": "\u25B8",
51734 "rtriltri;": "\u29CE",
51735 "RuleDelayed;": "\u29F4",
51736 "ruluhar;": "\u2968",
51738 "Sacute;": "\u015A",
51739 "sacute;": "\u015B",
51740 "sbquo;": "\u201A",
51744 "Scaron;": "\u0160",
51745 "scaron;": "\u0161",
51746 "sccue;": "\u227D",
51749 "Scedil;": "\u015E",
51750 "scedil;": "\u015F",
51751 "Scirc;": "\u015C",
51752 "scirc;": "\u015D",
51753 "scnap;": "\u2ABA",
51755 "scnsim;": "\u22E9",
51756 "scpolint;": "\u2A13",
51757 "scsim;": "\u227F",
51761 "sdotb;": "\u22A1",
51762 "sdote;": "\u2A66",
51763 "searhk;": "\u2925",
51764 "seArr;": "\u21D8",
51765 "searr;": "\u2198",
51766 "searrow;": "\u2198",
51770 "seswar;": "\u2929",
51771 "setminus;": "\u2216",
51772 "setmn;": "\u2216",
51774 "Sfr;": "\uD835\uDD16",
51775 "sfr;": "\uD835\uDD30",
51776 "sfrown;": "\u2322",
51777 "sharp;": "\u266F",
51778 "SHCHcy;": "\u0429",
51779 "shchcy;": "\u0449",
51782 "ShortDownArrow;": "\u2193",
51783 "ShortLeftArrow;": "\u2190",
51784 "shortmid;": "\u2223",
51785 "shortparallel;": "\u2225",
51786 "ShortRightArrow;": "\u2192",
51787 "ShortUpArrow;": "\u2191",
51790 "Sigma;": "\u03A3",
51791 "sigma;": "\u03C3",
51792 "sigmaf;": "\u03C2",
51793 "sigmav;": "\u03C2",
51795 "simdot;": "\u2A6A",
51797 "simeq;": "\u2243",
51799 "simgE;": "\u2AA0",
51801 "simlE;": "\u2A9F",
51802 "simne;": "\u2246",
51803 "simplus;": "\u2A24",
51804 "simrarr;": "\u2972",
51805 "slarr;": "\u2190",
51806 "SmallCircle;": "\u2218",
51807 "smallsetminus;": "\u2216",
51808 "smashp;": "\u2A33",
51809 "smeparsl;": "\u29E4",
51811 "smile;": "\u2323",
51814 "smtes;": "\u2AAC\uFE00",
51815 "SOFTcy;": "\u042C",
51816 "softcy;": "\u044C",
51819 "solbar;": "\u233F",
51820 "Sopf;": "\uD835\uDD4A",
51821 "sopf;": "\uD835\uDD64",
51822 "spades;": "\u2660",
51823 "spadesuit;": "\u2660",
51825 "sqcap;": "\u2293",
51826 "sqcaps;": "\u2293\uFE00",
51827 "sqcup;": "\u2294",
51828 "sqcups;": "\u2294\uFE00",
51830 "sqsub;": "\u228F",
51831 "sqsube;": "\u2291",
51832 "sqsubset;": "\u228F",
51833 "sqsubseteq;": "\u2291",
51834 "sqsup;": "\u2290",
51835 "sqsupe;": "\u2292",
51836 "sqsupset;": "\u2290",
51837 "sqsupseteq;": "\u2292",
51839 "Square;": "\u25A1",
51840 "square;": "\u25A1",
51841 "SquareIntersection;": "\u2293",
51842 "SquareSubset;": "\u228F",
51843 "SquareSubsetEqual;": "\u2291",
51844 "SquareSuperset;": "\u2290",
51845 "SquareSupersetEqual;": "\u2292",
51846 "SquareUnion;": "\u2294",
51847 "squarf;": "\u25AA",
51849 "srarr;": "\u2192",
51850 "Sscr;": "\uD835\uDCAE",
51851 "sscr;": "\uD835\uDCC8",
51852 "ssetmn;": "\u2216",
51853 "ssmile;": "\u2323",
51854 "sstarf;": "\u22C6",
51857 "starf;": "\u2605",
51858 "straightepsilon;": "\u03F5",
51859 "straightphi;": "\u03D5",
51860 "strns;": "\u00AF",
51863 "subdot;": "\u2ABD",
51866 "subedot;": "\u2AC3",
51867 "submult;": "\u2AC1",
51868 "subnE;": "\u2ACB",
51869 "subne;": "\u228A",
51870 "subplus;": "\u2ABF",
51871 "subrarr;": "\u2979",
51872 "Subset;": "\u22D0",
51873 "subset;": "\u2282",
51874 "subseteq;": "\u2286",
51875 "subseteqq;": "\u2AC5",
51876 "SubsetEqual;": "\u2286",
51877 "subsetneq;": "\u228A",
51878 "subsetneqq;": "\u2ACB",
51879 "subsim;": "\u2AC7",
51880 "subsub;": "\u2AD5",
51881 "subsup;": "\u2AD3",
51883 "succapprox;": "\u2AB8",
51884 "succcurlyeq;": "\u227D",
51885 "Succeeds;": "\u227B",
51886 "SucceedsEqual;": "\u2AB0",
51887 "SucceedsSlantEqual;": "\u227D",
51888 "SucceedsTilde;": "\u227F",
51889 "succeq;": "\u2AB0",
51890 "succnapprox;": "\u2ABA",
51891 "succneqq;": "\u2AB6",
51892 "succnsim;": "\u22E9",
51893 "succsim;": "\u227F",
51894 "SuchThat;": "\u220B",
51906 "supdot;": "\u2ABE",
51907 "supdsub;": "\u2AD8",
51910 "supedot;": "\u2AC4",
51911 "Superset;": "\u2283",
51912 "SupersetEqual;": "\u2287",
51913 "suphsol;": "\u27C9",
51914 "suphsub;": "\u2AD7",
51915 "suplarr;": "\u297B",
51916 "supmult;": "\u2AC2",
51917 "supnE;": "\u2ACC",
51918 "supne;": "\u228B",
51919 "supplus;": "\u2AC0",
51920 "Supset;": "\u22D1",
51921 "supset;": "\u2283",
51922 "supseteq;": "\u2287",
51923 "supseteqq;": "\u2AC6",
51924 "supsetneq;": "\u228B",
51925 "supsetneqq;": "\u2ACC",
51926 "supsim;": "\u2AC8",
51927 "supsub;": "\u2AD4",
51928 "supsup;": "\u2AD6",
51929 "swarhk;": "\u2926",
51930 "swArr;": "\u21D9",
51931 "swarr;": "\u2199",
51932 "swarrow;": "\u2199",
51933 "swnwar;": "\u292A",
51934 "szlig;": "\u00DF",
51937 "target;": "\u2316",
51941 "Tcaron;": "\u0164",
51942 "tcaron;": "\u0165",
51943 "Tcedil;": "\u0162",
51944 "tcedil;": "\u0163",
51948 "telrec;": "\u2315",
51949 "Tfr;": "\uD835\uDD17",
51950 "tfr;": "\uD835\uDD31",
51951 "there4;": "\u2234",
51952 "Therefore;": "\u2234",
51953 "therefore;": "\u2234",
51954 "Theta;": "\u0398",
51955 "theta;": "\u03B8",
51956 "thetasym;": "\u03D1",
51957 "thetav;": "\u03D1",
51958 "thickapprox;": "\u2248",
51959 "thicksim;": "\u223C",
51960 "ThickSpace;": "\u205F\u200A",
51961 "thinsp;": "\u2009",
51962 "ThinSpace;": "\u2009",
51963 "thkap;": "\u2248",
51964 "thksim;": "\u223C",
51965 "THORN;": "\u00DE",
51967 "thorn;": "\u00FE",
51969 "Tilde;": "\u223C",
51970 "tilde;": "\u02DC",
51971 "TildeEqual;": "\u2243",
51972 "TildeFullEqual;": "\u2245",
51973 "TildeTilde;": "\u2248",
51974 "times;": "\u00D7",
51976 "timesb;": "\u22A0",
51977 "timesbar;": "\u2A31",
51978 "timesd;": "\u2A30",
51982 "topbot;": "\u2336",
51983 "topcir;": "\u2AF1",
51984 "Topf;": "\uD835\uDD4B",
51985 "topf;": "\uD835\uDD65",
51986 "topfork;": "\u2ADA",
51988 "tprime;": "\u2034",
51989 "TRADE;": "\u2122",
51990 "trade;": "\u2122",
51991 "triangle;": "\u25B5",
51992 "triangledown;": "\u25BF",
51993 "triangleleft;": "\u25C3",
51994 "trianglelefteq;": "\u22B4",
51995 "triangleq;": "\u225C",
51996 "triangleright;": "\u25B9",
51997 "trianglerighteq;": "\u22B5",
51998 "tridot;": "\u25EC",
52000 "triminus;": "\u2A3A",
52001 "TripleDot;": "\u20DB",
52002 "triplus;": "\u2A39",
52003 "trisb;": "\u29CD",
52004 "tritime;": "\u2A3B",
52005 "trpezium;": "\u23E2",
52006 "Tscr;": "\uD835\uDCAF",
52007 "tscr;": "\uD835\uDCC9",
52010 "TSHcy;": "\u040B",
52011 "tshcy;": "\u045B",
52012 "Tstrok;": "\u0166",
52013 "tstrok;": "\u0167",
52014 "twixt;": "\u226C",
52015 "twoheadleftarrow;": "\u219E",
52016 "twoheadrightarrow;": "\u21A0",
52017 "Uacute;": "\u00DA",
52018 "Uacute": "\u00DA",
52019 "uacute;": "\u00FA",
52020 "uacute": "\u00FA",
52024 "Uarrocir;": "\u2949",
52025 "Ubrcy;": "\u040E",
52026 "ubrcy;": "\u045E",
52027 "Ubreve;": "\u016C",
52028 "ubreve;": "\u016D",
52029 "Ucirc;": "\u00DB",
52031 "ucirc;": "\u00FB",
52035 "udarr;": "\u21C5",
52036 "Udblac;": "\u0170",
52037 "udblac;": "\u0171",
52038 "udhar;": "\u296E",
52039 "ufisht;": "\u297E",
52040 "Ufr;": "\uD835\uDD18",
52041 "ufr;": "\uD835\uDD32",
52042 "Ugrave;": "\u00D9",
52043 "Ugrave": "\u00D9",
52044 "ugrave;": "\u00F9",
52045 "ugrave": "\u00F9",
52047 "uharl;": "\u21BF",
52048 "uharr;": "\u21BE",
52049 "uhblk;": "\u2580",
52050 "ulcorn;": "\u231C",
52051 "ulcorner;": "\u231C",
52052 "ulcrop;": "\u230F",
52053 "ultri;": "\u25F8",
52054 "Umacr;": "\u016A",
52055 "umacr;": "\u016B",
52058 "UnderBar;": "\u005F",
52059 "UnderBrace;": "\u23DF",
52060 "UnderBracket;": "\u23B5",
52061 "UnderParenthesis;": "\u23DD",
52062 "Union;": "\u22C3",
52063 "UnionPlus;": "\u228E",
52064 "Uogon;": "\u0172",
52065 "uogon;": "\u0173",
52066 "Uopf;": "\uD835\uDD4C",
52067 "uopf;": "\uD835\uDD66",
52068 "UpArrow;": "\u2191",
52069 "Uparrow;": "\u21D1",
52070 "uparrow;": "\u2191",
52071 "UpArrowBar;": "\u2912",
52072 "UpArrowDownArrow;": "\u21C5",
52073 "UpDownArrow;": "\u2195",
52074 "Updownarrow;": "\u21D5",
52075 "updownarrow;": "\u2195",
52076 "UpEquilibrium;": "\u296E",
52077 "upharpoonleft;": "\u21BF",
52078 "upharpoonright;": "\u21BE",
52079 "uplus;": "\u228E",
52080 "UpperLeftArrow;": "\u2196",
52081 "UpperRightArrow;": "\u2197",
52084 "upsih;": "\u03D2",
52085 "Upsilon;": "\u03A5",
52086 "upsilon;": "\u03C5",
52087 "UpTee;": "\u22A5",
52088 "UpTeeArrow;": "\u21A5",
52089 "upuparrows;": "\u21C8",
52090 "urcorn;": "\u231D",
52091 "urcorner;": "\u231D",
52092 "urcrop;": "\u230E",
52093 "Uring;": "\u016E",
52094 "uring;": "\u016F",
52095 "urtri;": "\u25F9",
52096 "Uscr;": "\uD835\uDCB0",
52097 "uscr;": "\uD835\uDCCA",
52098 "utdot;": "\u22F0",
52099 "Utilde;": "\u0168",
52100 "utilde;": "\u0169",
52102 "utrif;": "\u25B4",
52103 "uuarr;": "\u21C8",
52108 "uwangle;": "\u29A7",
52109 "vangrt;": "\u299C",
52110 "varepsilon;": "\u03F5",
52111 "varkappa;": "\u03F0",
52112 "varnothing;": "\u2205",
52113 "varphi;": "\u03D5",
52114 "varpi;": "\u03D6",
52115 "varpropto;": "\u221D",
52118 "varrho;": "\u03F1",
52119 "varsigma;": "\u03C2",
52120 "varsubsetneq;": "\u228A\uFE00",
52121 "varsubsetneqq;": "\u2ACB\uFE00",
52122 "varsupsetneq;": "\u228B\uFE00",
52123 "varsupsetneqq;": "\u2ACC\uFE00",
52124 "vartheta;": "\u03D1",
52125 "vartriangleleft;": "\u22B2",
52126 "vartriangleright;": "\u22B3",
52129 "vBarv;": "\u2AE9",
52132 "VDash;": "\u22AB",
52133 "Vdash;": "\u22A9",
52134 "vDash;": "\u22A8",
52135 "vdash;": "\u22A2",
52136 "Vdashl;": "\u2AE6",
52139 "veebar;": "\u22BB",
52140 "veeeq;": "\u225A",
52141 "vellip;": "\u22EE",
52142 "Verbar;": "\u2016",
52143 "verbar;": "\u007C",
52146 "VerticalBar;": "\u2223",
52147 "VerticalLine;": "\u007C",
52148 "VerticalSeparator;": "\u2758",
52149 "VerticalTilde;": "\u2240",
52150 "VeryThinSpace;": "\u200A",
52151 "Vfr;": "\uD835\uDD19",
52152 "vfr;": "\uD835\uDD33",
52153 "vltri;": "\u22B2",
52154 "vnsub;": "\u2282\u20D2",
52155 "vnsup;": "\u2283\u20D2",
52156 "Vopf;": "\uD835\uDD4D",
52157 "vopf;": "\uD835\uDD67",
52158 "vprop;": "\u221D",
52159 "vrtri;": "\u22B3",
52160 "Vscr;": "\uD835\uDCB1",
52161 "vscr;": "\uD835\uDCCB",
52162 "vsubnE;": "\u2ACB\uFE00",
52163 "vsubne;": "\u228A\uFE00",
52164 "vsupnE;": "\u2ACC\uFE00",
52165 "vsupne;": "\u228B\uFE00",
52166 "Vvdash;": "\u22AA",
52167 "vzigzag;": "\u299A",
52168 "Wcirc;": "\u0174",
52169 "wcirc;": "\u0175",
52170 "wedbar;": "\u2A5F",
52171 "Wedge;": "\u22C0",
52172 "wedge;": "\u2227",
52173 "wedgeq;": "\u2259",
52174 "weierp;": "\u2118",
52175 "Wfr;": "\uD835\uDD1A",
52176 "wfr;": "\uD835\uDD34",
52177 "Wopf;": "\uD835\uDD4E",
52178 "wopf;": "\uD835\uDD68",
52181 "wreath;": "\u2240",
52182 "Wscr;": "\uD835\uDCB2",
52183 "wscr;": "\uD835\uDCCC",
52185 "xcirc;": "\u25EF",
52187 "xdtri;": "\u25BD",
52188 "Xfr;": "\uD835\uDD1B",
52189 "xfr;": "\uD835\uDD35",
52190 "xhArr;": "\u27FA",
52191 "xharr;": "\u27F7",
52194 "xlArr;": "\u27F8",
52195 "xlarr;": "\u27F5",
52198 "xodot;": "\u2A00",
52199 "Xopf;": "\uD835\uDD4F",
52200 "xopf;": "\uD835\uDD69",
52201 "xoplus;": "\u2A01",
52202 "xotime;": "\u2A02",
52203 "xrArr;": "\u27F9",
52204 "xrarr;": "\u27F6",
52205 "Xscr;": "\uD835\uDCB3",
52206 "xscr;": "\uD835\uDCCD",
52207 "xsqcup;": "\u2A06",
52208 "xuplus;": "\u2A04",
52209 "xutri;": "\u25B3",
52211 "xwedge;": "\u22C0",
52212 "Yacute;": "\u00DD",
52213 "Yacute": "\u00DD",
52214 "yacute;": "\u00FD",
52215 "yacute": "\u00FD",
52218 "Ycirc;": "\u0176",
52219 "ycirc;": "\u0177",
52224 "Yfr;": "\uD835\uDD1C",
52225 "yfr;": "\uD835\uDD36",
52228 "Yopf;": "\uD835\uDD50",
52229 "yopf;": "\uD835\uDD6A",
52230 "Yscr;": "\uD835\uDCB4",
52231 "yscr;": "\uD835\uDCCE",
52237 "Zacute;": "\u0179",
52238 "zacute;": "\u017A",
52239 "Zcaron;": "\u017D",
52240 "zcaron;": "\u017E",
52245 "zeetrf;": "\u2128",
52246 "ZeroWidthSpace;": "\u200B",
52250 "zfr;": "\uD835\uDD37",
52253 "zigrarr;": "\u21DD",
52255 "zopf;": "\uD835\uDD6B",
52256 "Zscr;": "\uD835\uDCB5",
52257 "zscr;": "\uD835\uDCCF",
52265 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
52267 __webpack_require__.r(__webpack_exports__);
52268 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52269 /* harmony export */ "startsWith": () => /* binding */ startsWith,
52270 /* harmony export */ "endsWith": () => /* binding */ endsWith,
52271 /* harmony export */ "commonPrefixLength": () => /* binding */ commonPrefixLength,
52272 /* harmony export */ "repeat": () => /* binding */ repeat,
52273 /* harmony export */ "isLetterOrDigit": () => /* binding */ isLetterOrDigit
52274 /* harmony export */ });
52275 /*---------------------------------------------------------------------------------------------
52276 * Copyright (c) Microsoft Corporation. All rights reserved.
52277 * Licensed under the MIT License. See License.txt in the project root for license information.
52278 *--------------------------------------------------------------------------------------------*/
52279 function startsWith(haystack, needle) {
52280 if (haystack.length < needle.length) {
52283 for (var i = 0; i < needle.length; i++) {
52284 if (haystack[i] !== needle[i]) {
52291 * Determines if haystack ends with needle.
52293 function endsWith(haystack, needle) {
52294 var diff = haystack.length - needle.length;
52296 return haystack.lastIndexOf(needle) === diff;
52298 else if (diff === 0) {
52299 return haystack === needle;
52306 * @returns the length of the common prefix of the two strings.
52308 function commonPrefixLength(a, b) {
52310 var len = Math.min(a.length, b.length);
52311 for (i = 0; i < len; i++) {
52312 if (a.charCodeAt(i) !== b.charCodeAt(i)) {
52318 function repeat(value, count) {
52320 while (count > 0) {
52321 if ((count & 1) === 1) {
52325 count = count >>> 1;
52329 var _a = 'a'.charCodeAt(0);
52330 var _z = 'z'.charCodeAt(0);
52331 var _A = 'A'.charCodeAt(0);
52332 var _Z = 'Z'.charCodeAt(0);
52333 var _0 = '0'.charCodeAt(0);
52334 var _9 = '9'.charCodeAt(0);
52335 function isLetterOrDigit(text, index) {
52336 var c = text.charCodeAt(index);
52337 return (_a <= c && c <= _z) || (_A <= c && c <= _Z) || (_0 <= c && c <= _9);
52343 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
52345 __webpack_require__.r(__webpack_exports__);
52346 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52347 /* harmony export */ "isDefined": () => /* binding */ isDefined
52348 /* harmony export */ });
52349 /*---------------------------------------------------------------------------------------------
52350 * Copyright (c) Microsoft Corporation. All rights reserved.
52351 * Licensed under the MIT License. See License.txt in the project root for license information.
52352 *--------------------------------------------------------------------------------------------*/
52353 function isDefined(obj) {
52354 return typeof obj !== 'undefined';
52360 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
52362 __webpack_require__.r(__webpack_exports__);
52363 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52364 /* harmony export */ "HTMLDataProvider": () => /* binding */ HTMLDataProvider,
52365 /* harmony export */ "generateDocumentation": () => /* binding */ generateDocumentation
52366 /* harmony export */ });
52367 /* harmony import */ var _utils_markup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(127);
52368 /*---------------------------------------------------------------------------------------------
52369 * Copyright (c) Microsoft Corporation. All rights reserved.
52370 * Licensed under the MIT License. See License.txt in the project root for license information.
52371 *--------------------------------------------------------------------------------------------*/
52373 var HTMLDataProvider = /** @class */ (function () {
52375 * Currently, unversioned data uses the V1 implementation
52376 * In the future when the provider handles multiple versions of HTML custom data,
52377 * use the latest implementation for unversioned data
52379 function HTMLDataProvider(id, customData) {
52384 this._valueSetMap = {};
52385 this._tags = customData.tags || [];
52386 this._globalAttributes = customData.globalAttributes || [];
52387 this._tags.forEach(function (t) {
52388 _this._tagMap[t.name.toLowerCase()] = t;
52390 if (customData.valueSets) {
52391 customData.valueSets.forEach(function (vs) {
52392 _this._valueSetMap[vs.name] = vs.values;
52396 HTMLDataProvider.prototype.isApplicable = function () {
52399 HTMLDataProvider.prototype.getId = function () {
52402 HTMLDataProvider.prototype.provideTags = function () {
52405 HTMLDataProvider.prototype.provideAttributes = function (tag) {
52406 var attributes = [];
52407 var processAttribute = function (a) {
52408 attributes.push(a);
52410 var tagEntry = this._tagMap[tag.toLowerCase()];
52412 tagEntry.attributes.forEach(processAttribute);
52414 this._globalAttributes.forEach(processAttribute);
52417 HTMLDataProvider.prototype.provideValues = function (tag, attribute) {
52420 attribute = attribute.toLowerCase();
52421 var processAttributes = function (attributes) {
52422 attributes.forEach(function (a) {
52423 if (a.name.toLowerCase() === attribute) {
52425 a.values.forEach(function (v) {
52430 if (_this._valueSetMap[a.valueSet]) {
52431 _this._valueSetMap[a.valueSet].forEach(function (v) {
52439 var tagEntry = this._tagMap[tag.toLowerCase()];
52443 processAttributes(tagEntry.attributes);
52444 processAttributes(this._globalAttributes);
52447 return HTMLDataProvider;
52451 * Generate Documentation used in hover/complete
52452 * From `documentation` and `references`
52454 function generateDocumentation(item, settings, doesSupportMarkdown) {
52455 if (settings === void 0) { settings = {}; }
52457 kind: doesSupportMarkdown ? 'markdown' : 'plaintext',
52460 if (item.description && settings.documentation !== false) {
52461 var normalizedDescription = (0,_utils_markup__WEBPACK_IMPORTED_MODULE_0__.normalizeMarkupContent)(item.description);
52462 if (normalizedDescription) {
52463 result.value += normalizedDescription.value;
52466 if (item.references && item.references.length > 0 && settings.references !== false) {
52467 if (result.value.length) {
52468 result.value += "\n\n";
52470 if (doesSupportMarkdown) {
52471 result.value += item.references.map(function (r) {
52472 return "[" + r.name + "](" + r.url + ")";
52476 result.value += item.references.map(function (r) {
52477 return r.name + ": " + r.url;
52481 if (result.value === '') {
52490 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
52492 __webpack_require__.r(__webpack_exports__);
52493 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52494 /* harmony export */ "normalizeMarkupContent": () => /* binding */ normalizeMarkupContent
52495 /* harmony export */ });
52496 /*---------------------------------------------------------------------------------------------
52497 * Copyright (c) Microsoft Corporation. All rights reserved.
52498 * Licensed under the MIT License. See License.txt in the project root for license information.
52499 *--------------------------------------------------------------------------------------------*/
52500 function normalizeMarkupContent(input) {
52504 if (typeof input === 'string') {
52519 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
52521 __webpack_require__.r(__webpack_exports__);
52522 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52523 /* harmony export */ "PathCompletionParticipant": () => /* binding */ PathCompletionParticipant
52524 /* harmony export */ });
52525 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(117);
52526 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(124);
52527 /*---------------------------------------------------------------------------------------------
52528 * Copyright (c) Microsoft Corporation. All rights reserved.
52529 * Licensed under the MIT License. See License.txt in the project root for license information.
52530 *--------------------------------------------------------------------------------------------*/
52531 var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
52532 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52533 return new (P || (P = Promise))(function (resolve, reject) {
52534 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
52535 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
52536 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
52537 step((generator = generator.apply(thisArg, _arguments || [])).next());
52540 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
52541 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52542 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
52543 function verb(n) { return function (v) { return step([n, v]); }; }
52544 function step(op) {
52545 if (f) throw new TypeError("Generator is already executing.");
52547 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
52548 if (y = 0, t) op = [op[0] & 2, t.value];
52550 case 0: case 1: t = op; break;
52551 case 4: _.label++; return { value: op[1], done: false };
52552 case 5: _.label++; y = op[1]; op = [0]; continue;
52553 case 7: op = _.ops.pop(); _.trys.pop(); continue;
52555 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
52556 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
52557 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52558 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
52559 if (t[2]) _.ops.pop();
52560 _.trys.pop(); continue;
52562 op = body.call(thisArg, _);
52563 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
52564 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
52569 var PathCompletionParticipant = /** @class */ (function () {
52570 function PathCompletionParticipant(readDirectory) {
52571 this.readDirectory = readDirectory;
52572 this.atributeCompletions = [];
52574 PathCompletionParticipant.prototype.onHtmlAttributeValue = function (context) {
52575 if (isPathAttribute(context.tag, context.attribute)) {
52576 this.atributeCompletions.push(context);
52579 PathCompletionParticipant.prototype.computeCompletions = function (document, documentContext) {
52580 return __awaiter(this, void 0, void 0, function () {
52581 var result, _i, _a, attributeCompletion, fullValue, replaceRange, suggestions, _b, suggestions_1, item;
52582 return __generator(this, function (_c) {
52583 switch (_c.label) {
52585 result = { items: [], isIncomplete: false };
52586 _i = 0, _a = this.atributeCompletions;
52589 if (!(_i < _a.length)) return [3 /*break*/, 5];
52590 attributeCompletion = _a[_i];
52591 fullValue = stripQuotes(document.getText(attributeCompletion.range));
52592 if (!isCompletablePath(fullValue)) return [3 /*break*/, 4];
52593 if (!(fullValue === '.' || fullValue === '..')) return [3 /*break*/, 2];
52594 result.isIncomplete = true;
52595 return [3 /*break*/, 4];
52597 replaceRange = pathToReplaceRange(attributeCompletion.value, fullValue, attributeCompletion.range);
52598 return [4 /*yield*/, this.providePathSuggestions(attributeCompletion.value, replaceRange, document, documentContext)];
52600 suggestions = _c.sent();
52601 for (_b = 0, suggestions_1 = suggestions; _b < suggestions_1.length; _b++) {
52602 item = suggestions_1[_b];
52603 result.items.push(item);
52608 return [3 /*break*/, 1];
52609 case 5: return [2 /*return*/, result];
52614 PathCompletionParticipant.prototype.providePathSuggestions = function (valueBeforeCursor, replaceRange, document, documentContext) {
52615 return __awaiter(this, void 0, void 0, function () {
52616 var valueBeforeLastSlash, parentDir, result, infos, _i, infos_1, _a, name, type, e_1;
52617 return __generator(this, function (_b) {
52618 switch (_b.label) {
52620 valueBeforeLastSlash = valueBeforeCursor.substring(0, valueBeforeCursor.lastIndexOf('/') + 1);
52621 parentDir = documentContext.resolveReference(valueBeforeLastSlash || '.', document.uri);
52622 if (!parentDir) return [3 /*break*/, 4];
52625 _b.trys.push([1, 3, , 4]);
52627 return [4 /*yield*/, this.readDirectory(parentDir)];
52630 for (_i = 0, infos_1 = infos; _i < infos_1.length; _i++) {
52631 _a = infos_1[_i], name = _a[0], type = _a[1];
52632 // Exclude paths that start with `.`
52633 if (name.charCodeAt(0) !== CharCode_dot) {
52634 result.push(createCompletionItem(name, type === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FileType.Directory, replaceRange));
52637 return [2 /*return*/, result];
52640 return [3 /*break*/, 4];
52641 case 4: return [2 /*return*/, []];
52646 return PathCompletionParticipant;
52649 var CharCode_dot = '.'.charCodeAt(0);
52650 function stripQuotes(fullValue) {
52651 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(fullValue, "'") || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(fullValue, "\"")) {
52652 return fullValue.slice(1, -1);
52658 function isCompletablePath(value) {
52659 if ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(value, 'http') || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(value, 'https') || (0,_utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith)(value, '//')) {
52664 function isPathAttribute(tag, attr) {
52665 var a = PATH_TAG_AND_ATTR[tag];
52667 if (typeof a === 'string') {
52671 return a.indexOf(attr) !== -1;
52676 function pathToReplaceRange(valueBeforeCursor, fullValue, range) {
52678 var lastIndexOfSlash = valueBeforeCursor.lastIndexOf('/');
52679 if (lastIndexOfSlash === -1) {
52680 replaceRange = shiftRange(range, 1, -1);
52683 // For cases where cursor is in the middle of attribute value, like <script src="./s|rc/test.js">
52684 // Find the last slash before cursor, and calculate the start of replace range from there
52685 var valueAfterLastSlash = fullValue.slice(lastIndexOfSlash + 1);
52686 var startPos = shiftPosition(range.end, -1 - valueAfterLastSlash.length);
52687 // If whitespace exists, replace until there is no more
52688 var whitespaceIndex = valueAfterLastSlash.indexOf(' ');
52689 var endPos = void 0;
52690 if (whitespaceIndex !== -1) {
52691 endPos = shiftPosition(startPos, whitespaceIndex);
52694 endPos = shiftPosition(range.end, -1);
52696 replaceRange = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(startPos, endPos);
52698 return replaceRange;
52700 function createCompletionItem(p, isDir, replaceRange) {
52705 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind.Folder,
52706 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(replaceRange, p),
52709 command: 'editor.action.triggerSuggest'
52716 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind.File,
52717 textEdit: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TextEdit.replace(replaceRange, p)
52721 function shiftPosition(pos, offset) {
52722 return _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Position.create(pos.line, pos.character + offset);
52724 function shiftRange(range, startOffset, endOffset) {
52725 var start = shiftPosition(range.start, startOffset);
52726 var end = shiftPosition(range.end, endOffset);
52727 return _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(start, end);
52729 // Selected from https://stackoverflow.com/a/2725168/1780148
52730 var PATH_TAG_AND_ATTR = {
52734 body: 'background',
52737 frame: ['src', 'longdesc'],
52738 img: ['src', 'longdesc'],
52746 button: 'formaction',
52750 input: ['src', 'formaction'],
52753 video: ['src', 'poster']
52759 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
52761 __webpack_require__.r(__webpack_exports__);
52762 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52763 /* harmony export */ "HTMLHover": () => /* binding */ HTMLHover
52764 /* harmony export */ });
52765 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(116);
52766 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(117);
52767 /* harmony import */ var _utils_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(125);
52768 /* harmony import */ var _languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(126);
52769 /* harmony import */ var _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(123);
52770 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(124);
52771 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77);
52772 /*---------------------------------------------------------------------------------------------
52773 * Copyright (c) Microsoft Corporation. All rights reserved.
52774 * Licensed under the MIT License. See License.txt in the project root for license information.
52775 *--------------------------------------------------------------------------------------------*/
52783 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_6__.loadMessageBundle();
52784 var HTMLHover = /** @class */ (function () {
52785 function HTMLHover(lsOptions, dataManager) {
52786 this.lsOptions = lsOptions;
52787 this.dataManager = dataManager;
52789 HTMLHover.prototype.doHover = function (document, position, htmlDocument, options) {
52790 var convertContents = this.convertContents.bind(this);
52791 var doesSupportMarkdown = this.doesSupportMarkdown();
52792 var offset = document.offsetAt(position);
52793 var node = htmlDocument.findNodeAt(offset);
52794 var text = document.getText();
52795 if (!node || !node.tag) {
52798 var dataProviders = this.dataManager.getDataProviders().filter(function (p) { return p.isApplicable(document.languageId); });
52799 function getTagHover(currTag, range, open) {
52800 var _loop_1 = function (provider) {
52802 provider.provideTags().forEach(function (tag) {
52803 if (tag.name.toLowerCase() === currTag.toLowerCase()) {
52804 var markupContent = (0,_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_3__.generateDocumentation)(tag, options, doesSupportMarkdown);
52805 if (!markupContent) {
52807 kind: doesSupportMarkdown ? 'markdown' : 'plaintext',
52811 hover = { contents: markupContent, range: range };
52815 hover.contents = convertContents(hover.contents);
52816 return { value: hover };
52819 for (var _i = 0, dataProviders_1 = dataProviders; _i < dataProviders_1.length; _i++) {
52820 var provider = dataProviders_1[_i];
52821 var state_1 = _loop_1(provider);
52822 if (typeof state_1 === "object")
52823 return state_1.value;
52827 function getAttrHover(currTag, currAttr, range) {
52828 var _loop_2 = function (provider) {
52830 provider.provideAttributes(currTag).forEach(function (attr) {
52831 if (currAttr === attr.name && attr.description) {
52832 var contentsDoc = (0,_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_3__.generateDocumentation)(attr, options, doesSupportMarkdown);
52834 hover = { contents: contentsDoc, range: range };
52842 hover.contents = convertContents(hover.contents);
52843 return { value: hover };
52846 for (var _i = 0, dataProviders_2 = dataProviders; _i < dataProviders_2.length; _i++) {
52847 var provider = dataProviders_2[_i];
52848 var state_2 = _loop_2(provider);
52849 if (typeof state_2 === "object")
52850 return state_2.value;
52854 function getAttrValueHover(currTag, currAttr, currAttrValue, range) {
52855 var _loop_3 = function (provider) {
52857 provider.provideValues(currTag, currAttr).forEach(function (attrValue) {
52858 if (currAttrValue === attrValue.name && attrValue.description) {
52859 var contentsDoc = (0,_languageFacts_dataProvider__WEBPACK_IMPORTED_MODULE_3__.generateDocumentation)(attrValue, options, doesSupportMarkdown);
52861 hover = { contents: contentsDoc, range: range };
52869 hover.contents = convertContents(hover.contents);
52870 return { value: hover };
52873 for (var _i = 0, dataProviders_3 = dataProviders; _i < dataProviders_3.length; _i++) {
52874 var provider = dataProviders_3[_i];
52875 var state_3 = _loop_3(provider);
52876 if (typeof state_3 === "object")
52877 return state_3.value;
52881 function getEntityHover(text, range) {
52882 var currEntity = filterEntity(text);
52883 for (var entity in _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_4__.entities) {
52885 var label = '&' + entity;
52886 if (currEntity === label) {
52887 var code = _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_4__.entities[entity].charCodeAt(0).toString(16).toUpperCase();
52889 if (code.length < 4) {
52890 var zeroes = 4 - code.length;
52892 while (k < zeroes) {
52898 var contentsDoc = localize('entity.propose', "Character entity representing '" + _parser_htmlEntities__WEBPACK_IMPORTED_MODULE_4__.entities[entity] + "', unicode equivalent '" + hex + "'");
52900 hover = { contents: contentsDoc, range: range };
52907 hover.contents = convertContents(hover.contents);
52913 function getTagNameRange(tokenType, startOffset) {
52914 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(document.getText(), startOffset);
52915 var token = scanner.scan();
52916 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS && (scanner.getTokenEnd() < offset || scanner.getTokenEnd() === offset && token !== tokenType)) {
52917 token = scanner.scan();
52919 if (token === tokenType && offset <= scanner.getTokenEnd()) {
52920 return { start: document.positionAt(scanner.getTokenOffset()), end: document.positionAt(scanner.getTokenEnd()) };
52924 function getEntityRange() {
52925 var k = offset - 1;
52926 var characterStart = position.character;
52927 while (k >= 0 && (0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.isLetterOrDigit)(text, k)) {
52932 var characterEnd = characterStart;
52933 while ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.isLetterOrDigit)(text, n)) {
52937 if (k >= 0 && text[k] === '&') {
52939 if (text[n] === ';') {
52940 range = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.Range.create(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.Position.create(position.line, characterStart), _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.Position.create(position.line, characterEnd + 1));
52943 range = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.Range.create(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.Position.create(position.line, characterStart), _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.Position.create(position.line, characterEnd));
52949 function filterEntity(text) {
52950 var k = offset - 1;
52952 while (k >= 0 && (0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.isLetterOrDigit)(text, k)) {
52956 while ((0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.isLetterOrDigit)(text, k)) {
52957 newText += text[k];
52963 if (node.endTagStart && offset >= node.endTagStart) {
52964 var tagRange_1 = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTag, node.endTagStart);
52966 return getTagHover(node.tag, tagRange_1, false);
52970 var tagRange = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTag, node.start);
52972 return getTagHover(node.tag, tagRange, true);
52974 var attrRange = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeName, node.start);
52976 var tag = node.tag;
52977 var attr = document.getText(attrRange);
52978 return getAttrHover(tag, attr, attrRange);
52980 var entityRange = getEntityRange();
52982 return getEntityHover(text, entityRange);
52984 function scanAttrAndAttrValue(nodeStart, attrValueStart) {
52985 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(document.getText(), nodeStart);
52986 var token = scanner.scan();
52987 var prevAttr = undefined;
52988 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS && (scanner.getTokenEnd() <= attrValueStart)) {
52989 token = scanner.scan();
52990 if (token === _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeName) {
52991 prevAttr = scanner.getTokenText();
52996 var attrValueRange = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.AttributeValue, node.start);
52997 if (attrValueRange) {
52998 var tag = node.tag;
52999 var attrValue = trimQuotes(document.getText(attrValueRange));
53000 var matchAttr = scanAttrAndAttrValue(node.start, document.offsetAt(attrValueRange.start));
53002 return getAttrValueHover(tag, matchAttr, attrValue, attrValueRange);
53007 HTMLHover.prototype.convertContents = function (contents) {
53008 if (!this.doesSupportMarkdown()) {
53009 if (typeof contents === 'string') {
53013 else if ('kind' in contents) {
53016 value: contents.value
53020 else if (Array.isArray(contents)) {
53021 contents.map(function (c) {
53022 return typeof c === 'string' ? c : c.value;
53027 return contents.value;
53032 HTMLHover.prototype.doesSupportMarkdown = function () {
53034 if (!(0,_utils_object__WEBPACK_IMPORTED_MODULE_2__.isDefined)(this.supportsMarkdown)) {
53035 if (!(0,_utils_object__WEBPACK_IMPORTED_MODULE_2__.isDefined)(this.lsOptions.clientCapabilities)) {
53036 this.supportsMarkdown = true;
53037 return this.supportsMarkdown;
53039 var contentFormat = (_c = (_b = (_a = this.lsOptions.clientCapabilities) === null || _a === void 0 ? void 0 : _a.textDocument) === null || _b === void 0 ? void 0 : _b.hover) === null || _c === void 0 ? void 0 : _c.contentFormat;
53040 this.supportsMarkdown = Array.isArray(contentFormat) && contentFormat.indexOf(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.MarkupKind.Markdown) !== -1;
53042 return this.supportsMarkdown;
53047 function trimQuotes(s) {
53048 if (s.length <= 1) {
53049 return s.replace(/['"]/, '');
53051 if (s[0] === "'" || s[0] === "\"") {
53054 if (s[s.length - 1] === "'" || s[s.length - 1] === "\"") {
53055 s = s.slice(0, -1);
53063 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
53065 __webpack_require__.r(__webpack_exports__);
53066 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
53067 /* harmony export */ "format": () => /* binding */ format
53068 /* harmony export */ });
53069 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(117);
53070 /* harmony import */ var _beautify_beautify_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(131);
53071 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(124);
53072 /*---------------------------------------------------------------------------------------------
53073 * Copyright (c) Microsoft Corporation. All rights reserved.
53074 * Licensed under the MIT License. See License.txt in the project root for license information.
53075 *--------------------------------------------------------------------------------------------*/
53079 function format(document, range, options) {
53080 var value = document.getText();
53081 var includesEnd = true;
53082 var initialIndentLevel = 0;
53083 var tabSize = options.tabSize || 4;
53085 var startOffset = document.offsetAt(range.start);
53086 // include all leading whitespace iff at the beginning of the line
53087 var extendedStart = startOffset;
53088 while (extendedStart > 0 && isWhitespace(value, extendedStart - 1)) {
53091 if (extendedStart === 0 || isEOL(value, extendedStart - 1)) {
53092 startOffset = extendedStart;
53095 // else keep at least one whitespace
53096 if (extendedStart < startOffset) {
53097 startOffset = extendedStart + 1;
53100 // include all following whitespace until the end of the line
53101 var endOffset = document.offsetAt(range.end);
53102 var extendedEnd = endOffset;
53103 while (extendedEnd < value.length && isWhitespace(value, extendedEnd)) {
53106 if (extendedEnd === value.length || isEOL(value, extendedEnd)) {
53107 endOffset = extendedEnd;
53109 range = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(document.positionAt(startOffset), document.positionAt(endOffset));
53110 // Do not modify if substring starts in inside an element
53111 // Ending inside an element is fine as it doesn't cause formatting errors
53112 var firstHalf = value.substring(0, startOffset);
53113 if (new RegExp(/.*[<][^>]*$/).test(firstHalf)) {
53114 //return without modification
53115 value = value.substring(startOffset, endOffset);
53121 includesEnd = endOffset === value.length;
53122 value = value.substring(startOffset, endOffset);
53123 if (startOffset !== 0) {
53124 var startOfLineOffset = document.offsetAt(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Position.create(range.start.line, 0));
53125 initialIndentLevel = computeIndentLevel(document.getText(), startOfLineOffset, options);
53129 range = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Position.create(0, 0), document.positionAt(value.length));
53131 var htmlOptions = {
53132 indent_size: tabSize,
53133 indent_char: options.insertSpaces ? ' ' : '\t',
53134 indent_empty_lines: getFormatOption(options, 'indentEmptyLines', false),
53135 wrap_line_length: getFormatOption(options, 'wrapLineLength', 120),
53136 unformatted: getTagsFormatOption(options, 'unformatted', void 0),
53137 content_unformatted: getTagsFormatOption(options, 'contentUnformatted', void 0),
53138 indent_inner_html: getFormatOption(options, 'indentInnerHtml', false),
53139 preserve_newlines: getFormatOption(options, 'preserveNewLines', true),
53140 max_preserve_newlines: getFormatOption(options, 'maxPreserveNewLines', 32786),
53141 indent_handlebars: getFormatOption(options, 'indentHandlebars', false),
53142 end_with_newline: includesEnd && getFormatOption(options, 'endWithNewline', false),
53143 extra_liners: getTagsFormatOption(options, 'extraLiners', void 0),
53144 wrap_attributes: getFormatOption(options, 'wrapAttributes', 'auto'),
53145 wrap_attributes_indent_size: getFormatOption(options, 'wrapAttributesIndentSize', void 0),
53147 indent_scripts: getFormatOption(options, 'indentScripts', 'normal'),
53148 templating: getTemplatingFormatOption(options, 'all'),
53149 unformatted_content_delimiter: getFormatOption(options, 'unformattedContentDelimiter', ''),
53151 var result = (0,_beautify_beautify_html__WEBPACK_IMPORTED_MODULE_1__.html_beautify)(trimLeft(value), htmlOptions);
53152 if (initialIndentLevel > 0) {
53153 var indent = options.insertSpaces ? (0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.repeat)(' ', tabSize * initialIndentLevel) : (0,_utils_strings__WEBPACK_IMPORTED_MODULE_2__.repeat)('\t', initialIndentLevel);
53154 result = result.split('\n').join('\n' + indent);
53155 if (range.start.character === 0) {
53156 result = indent + result; // keep the indent
53164 function trimLeft(str) {
53165 return str.replace(/^\s+/, '');
53167 function getFormatOption(options, key, dflt) {
53168 if (options && options.hasOwnProperty(key)) {
53169 var value = options[key];
53170 if (value !== null) {
53176 function getTagsFormatOption(options, key, dflt) {
53177 var list = getFormatOption(options, key, null);
53178 if (typeof list === 'string') {
53179 if (list.length > 0) {
53180 return list.split(',').map(function (t) { return t.trim().toLowerCase(); });
53186 function getTemplatingFormatOption(options, dflt) {
53187 var value = getFormatOption(options, 'templating', dflt);
53188 if (value === true) {
53193 function computeIndentLevel(content, offset, options) {
53196 var tabSize = options.tabSize || 4;
53197 while (i < content.length) {
53198 var ch = content.charAt(i);
53202 else if (ch === '\t') {
53210 return Math.floor(nChars / tabSize);
53212 function getEOL(document) {
53213 var text = document.getText();
53214 if (document.lineCount > 1) {
53215 var to = document.offsetAt(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Position.create(1, 0));
53217 while (from > 0 && isEOL(text, from - 1)) {
53220 return text.substr(from, to - from);
53224 function isEOL(text, offset) {
53225 return '\r\n'.indexOf(text.charAt(offset)) !== -1;
53227 function isWhitespace(text, offset) {
53228 return ' \t'.indexOf(text.charAt(offset)) !== -1;
53234 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
53236 __webpack_require__.r(__webpack_exports__);
53237 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
53238 /* harmony export */ "html_beautify": () => /* binding */ html_beautify
53239 /* harmony export */ });
53240 /* harmony import */ var _beautify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(132);
53241 /* harmony import */ var _beautify_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(133);
53242 // copied from js-beautify/js/lib/beautify-html.js
53244 /* AUTO-GENERATED. DO NOT MODIFY. */
53247 The MIT License (MIT)
53249 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53251 Permission is hereby granted, free of charge, to any person
53252 obtaining a copy of this software and associated documentation files
53253 (the "Software"), to deal in the Software without restriction,
53254 including without limitation the rights to use, copy, modify, merge,
53255 publish, distribute, sublicense, and/or sell copies of the Software,
53256 and to permit persons to whom the Software is furnished to do so,
53257 subject to the following conditions:
53259 The above copyright notice and this permission notice shall be
53260 included in all copies or substantial portions of the Software.
53262 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53263 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53264 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53265 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53266 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53267 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53268 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53275 Written by Nochum Sossonko, (nsossonko@hotmail.com)
53277 Based on code initially developed by: Einar Lielmanis, <einar@beautifier.io>
53278 https://beautifier.io/
53281 style_html(html_source);
53283 style_html(html_source, options);
53286 indent_inner_html (default false) — indent <head> and <body> sections,
53287 indent_size (default 4) — indentation size,
53288 indent_char (default space) — character to indent with,
53289 wrap_line_length (default 250) - maximum amount of characters per line (0 = disable)
53290 brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none"
53291 put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.
53292 inline (defaults to inline tags) - list of tags to be considered inline tags
53293 unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted
53294 content_unformatted (defaults to ["pre", "textarea"] tags) - list of tags, whose content shouldn't be reformatted
53295 indent_scripts (default normal) - "keep"|"separate"|"normal"
53296 preserve_newlines (default true) - whether existing line breaks before elements should be preserved
53297 Only works before elements, not inside tags or for text.
53298 max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk
53299 indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}}
53300 end_with_newline (false) - end with a newline
53301 extra_liners (default [head,body,/html]) -List of tags that should have an extra newline before them.
53305 style_html(html_source, {
53306 'indent_inner_html': false,
53308 'indent_char': ' ',
53309 'wrap_line_length': 78,
53310 'brace_style': 'expand',
53311 'preserve_newlines': true,
53312 'max_preserve_newlines': 5,
53313 'indent_handlebars': false,
53314 'extra_liners': ['/html']
53321 var legacy_beautify_html =
53322 /******/ (function(modules) { // webpackBootstrap
53323 /******/ // The module cache
53324 /******/ var installedModules = {};
53326 /******/ // The require function
53327 /******/ function __nested_webpack_require_3664__(moduleId) {
53329 /******/ // Check if module is in cache
53330 /******/ if(installedModules[moduleId]) {
53331 /******/ return installedModules[moduleId].exports;
53333 /******/ // Create a new module (and put it into the cache)
53334 /******/ var module = installedModules[moduleId] = {
53335 /******/ i: moduleId,
53337 /******/ exports: {}
53340 /******/ // Execute the module function
53341 /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_3664__);
53343 /******/ // Flag the module as loaded
53344 /******/ module.l = true;
53346 /******/ // Return the exports of the module
53347 /******/ return module.exports;
53351 /******/ // expose the modules object (__webpack_modules__)
53352 /******/ __nested_webpack_require_3664__.m = modules;
53354 /******/ // expose the module cache
53355 /******/ __nested_webpack_require_3664__.c = installedModules;
53357 /******/ // define getter function for harmony exports
53358 /******/ __nested_webpack_require_3664__.d = function(exports, name, getter) {
53359 /******/ if(!__nested_webpack_require_3664__.o(exports, name)) {
53360 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
53364 /******/ // define __esModule on exports
53365 /******/ __nested_webpack_require_3664__.r = function(exports) {
53366 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
53367 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
53369 /******/ Object.defineProperty(exports, '__esModule', { value: true });
53372 /******/ // create a fake namespace object
53373 /******/ // mode & 1: value is a module id, require it
53374 /******/ // mode & 2: merge all properties of value into the ns
53375 /******/ // mode & 4: return value when already ns object
53376 /******/ // mode & 8|1: behave like require
53377 /******/ __nested_webpack_require_3664__.t = function(value, mode) {
53378 /******/ if(mode & 1) value = __nested_webpack_require_3664__(value);
53379 /******/ if(mode & 8) return value;
53380 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
53381 /******/ var ns = Object.create(null);
53382 /******/ __nested_webpack_require_3664__.r(ns);
53383 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
53384 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_3664__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
53385 /******/ return ns;
53388 /******/ // getDefaultExport function for compatibility with non-harmony modules
53389 /******/ __nested_webpack_require_3664__.n = function(module) {
53390 /******/ var getter = module && module.__esModule ?
53391 /******/ function getDefault() { return module['default']; } :
53392 /******/ function getModuleExports() { return module; };
53393 /******/ __nested_webpack_require_3664__.d(getter, 'a', getter);
53394 /******/ return getter;
53397 /******/ // Object.prototype.hasOwnProperty.call
53398 /******/ __nested_webpack_require_3664__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
53400 /******/ // __webpack_public_path__
53401 /******/ __nested_webpack_require_3664__.p = "";
53404 /******/ // Load entry module and return exports
53405 /******/ return __nested_webpack_require_3664__(__nested_webpack_require_3664__.s = 18);
53407 /************************************************************************/
53412 /***/ (function(module, exports, __nested_webpack_require_7147__) {
53415 /*jshint node:true */
53417 The MIT License (MIT)
53419 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53421 Permission is hereby granted, free of charge, to any person
53422 obtaining a copy of this software and associated documentation files
53423 (the "Software"), to deal in the Software without restriction,
53424 including without limitation the rights to use, copy, modify, merge,
53425 publish, distribute, sublicense, and/or sell copies of the Software,
53426 and to permit persons to whom the Software is furnished to do so,
53427 subject to the following conditions:
53429 The above copyright notice and this permission notice shall be
53430 included in all copies or substantial portions of the Software.
53432 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53433 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53434 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53435 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53436 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53437 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53438 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53444 function OutputLine(parent) {
53445 this.__parent = parent;
53446 this.__character_count = 0;
53447 // use indent_count as a marker for this.__lines that have preserved indentation
53448 this.__indent_count = -1;
53449 this.__alignment_count = 0;
53450 this.__wrap_point_index = 0;
53451 this.__wrap_point_character_count = 0;
53452 this.__wrap_point_indent_count = -1;
53453 this.__wrap_point_alignment_count = 0;
53458 OutputLine.prototype.clone_empty = function() {
53459 var line = new OutputLine(this.__parent);
53460 line.set_indent(this.__indent_count, this.__alignment_count);
53464 OutputLine.prototype.item = function(index) {
53466 return this.__items[this.__items.length + index];
53468 return this.__items[index];
53472 OutputLine.prototype.has_match = function(pattern) {
53473 for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
53474 if (this.__items[lastCheckedOutput].match(pattern)) {
53481 OutputLine.prototype.set_indent = function(indent, alignment) {
53482 if (this.is_empty()) {
53483 this.__indent_count = indent || 0;
53484 this.__alignment_count = alignment || 0;
53485 this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
53489 OutputLine.prototype._set_wrap_point = function() {
53490 if (this.__parent.wrap_line_length) {
53491 this.__wrap_point_index = this.__items.length;
53492 this.__wrap_point_character_count = this.__character_count;
53493 this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;
53494 this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;
53498 OutputLine.prototype._should_wrap = function() {
53499 return this.__wrap_point_index &&
53500 this.__character_count > this.__parent.wrap_line_length &&
53501 this.__wrap_point_character_count > this.__parent.next_line.__character_count;
53504 OutputLine.prototype._allow_wrap = function() {
53505 if (this._should_wrap()) {
53506 this.__parent.add_new_line();
53507 var next = this.__parent.current_line;
53508 next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
53509 next.__items = this.__items.slice(this.__wrap_point_index);
53510 this.__items = this.__items.slice(0, this.__wrap_point_index);
53512 next.__character_count += this.__character_count - this.__wrap_point_character_count;
53513 this.__character_count = this.__wrap_point_character_count;
53515 if (next.__items[0] === " ") {
53516 next.__items.splice(0, 1);
53517 next.__character_count -= 1;
53524 OutputLine.prototype.is_empty = function() {
53525 return this.__items.length === 0;
53528 OutputLine.prototype.last = function() {
53529 if (!this.is_empty()) {
53530 return this.__items[this.__items.length - 1];
53536 OutputLine.prototype.push = function(item) {
53537 this.__items.push(item);
53538 var last_newline_index = item.lastIndexOf('\n');
53539 if (last_newline_index !== -1) {
53540 this.__character_count = item.length - last_newline_index;
53542 this.__character_count += item.length;
53546 OutputLine.prototype.pop = function() {
53548 if (!this.is_empty()) {
53549 item = this.__items.pop();
53550 this.__character_count -= item.length;
53556 OutputLine.prototype._remove_indent = function() {
53557 if (this.__indent_count > 0) {
53558 this.__indent_count -= 1;
53559 this.__character_count -= this.__parent.indent_size;
53563 OutputLine.prototype._remove_wrap_indent = function() {
53564 if (this.__wrap_point_indent_count > 0) {
53565 this.__wrap_point_indent_count -= 1;
53568 OutputLine.prototype.trim = function() {
53569 while (this.last() === ' ') {
53570 this.__items.pop();
53571 this.__character_count -= 1;
53575 OutputLine.prototype.toString = function() {
53577 if (this.is_empty()) {
53578 if (this.__parent.indent_empty_lines) {
53579 result = this.__parent.get_indent_string(this.__indent_count);
53582 result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
53583 result += this.__items.join('');
53588 function IndentStringCache(options, baseIndentString) {
53589 this.__cache = [''];
53590 this.__indent_size = options.indent_size;
53591 this.__indent_string = options.indent_char;
53592 if (!options.indent_with_tabs) {
53593 this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
53596 // Set to null to continue support for auto detection of base indent
53597 baseIndentString = baseIndentString || '';
53598 if (options.indent_level > 0) {
53599 baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
53602 this.__base_string = baseIndentString;
53603 this.__base_string_length = baseIndentString.length;
53606 IndentStringCache.prototype.get_indent_size = function(indent, column) {
53607 var result = this.__base_string_length;
53608 column = column || 0;
53612 result += indent * this.__indent_size;
53617 IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
53618 var result = this.__base_string;
53619 column = column || 0;
53620 if (indent_level < 0) {
53624 column += indent_level * this.__indent_size;
53625 this.__ensure_cache(column);
53626 result += this.__cache[column];
53630 IndentStringCache.prototype.__ensure_cache = function(column) {
53631 while (column >= this.__cache.length) {
53632 this.__add_column();
53636 IndentStringCache.prototype.__add_column = function() {
53637 var column = this.__cache.length;
53640 if (this.__indent_size && column >= this.__indent_size) {
53641 indent = Math.floor(column / this.__indent_size);
53642 column -= indent * this.__indent_size;
53643 result = new Array(indent + 1).join(this.__indent_string);
53646 result += new Array(column + 1).join(' ');
53649 this.__cache.push(result);
53652 function Output(options, baseIndentString) {
53653 this.__indent_cache = new IndentStringCache(options, baseIndentString);
53655 this._end_with_newline = options.end_with_newline;
53656 this.indent_size = options.indent_size;
53657 this.wrap_line_length = options.wrap_line_length;
53658 this.indent_empty_lines = options.indent_empty_lines;
53660 this.previous_line = null;
53661 this.current_line = null;
53662 this.next_line = new OutputLine(this);
53663 this.space_before_token = false;
53664 this.non_breaking_space = false;
53665 this.previous_token_wrapped = false;
53667 this.__add_outputline();
53670 Output.prototype.__add_outputline = function() {
53671 this.previous_line = this.current_line;
53672 this.current_line = this.next_line.clone_empty();
53673 this.__lines.push(this.current_line);
53676 Output.prototype.get_line_number = function() {
53677 return this.__lines.length;
53680 Output.prototype.get_indent_string = function(indent, column) {
53681 return this.__indent_cache.get_indent_string(indent, column);
53684 Output.prototype.get_indent_size = function(indent, column) {
53685 return this.__indent_cache.get_indent_size(indent, column);
53688 Output.prototype.is_empty = function() {
53689 return !this.previous_line && this.current_line.is_empty();
53692 Output.prototype.add_new_line = function(force_newline) {
53693 // never newline at the start of file
53694 // otherwise, newline only if we didn't just add one or we're forced
53695 if (this.is_empty() ||
53696 (!force_newline && this.just_added_newline())) {
53700 // if raw output is enabled, don't print additional newlines,
53701 // but still return True as though you had
53703 this.__add_outputline();
53708 Output.prototype.get_code = function(eol) {
53711 // handle some edge cases where the last tokens
53712 // has text that ends with newline(s)
53713 var last_item = this.current_line.pop();
53715 if (last_item[last_item.length - 1] === '\n') {
53716 last_item = last_item.replace(/\n+$/g, '');
53718 this.current_line.push(last_item);
53721 if (this._end_with_newline) {
53722 this.__add_outputline();
53725 var sweet_code = this.__lines.join('\n');
53727 if (eol !== '\n') {
53728 sweet_code = sweet_code.replace(/[\n]/g, eol);
53733 Output.prototype.set_wrap_point = function() {
53734 this.current_line._set_wrap_point();
53737 Output.prototype.set_indent = function(indent, alignment) {
53738 indent = indent || 0;
53739 alignment = alignment || 0;
53741 // Next line stores alignment values
53742 this.next_line.set_indent(indent, alignment);
53744 // Never indent your first output indent at the start of the file
53745 if (this.__lines.length > 1) {
53746 this.current_line.set_indent(indent, alignment);
53750 this.current_line.set_indent();
53754 Output.prototype.add_raw_token = function(token) {
53755 for (var x = 0; x < token.newlines; x++) {
53756 this.__add_outputline();
53758 this.current_line.set_indent(-1);
53759 this.current_line.push(token.whitespace_before);
53760 this.current_line.push(token.text);
53761 this.space_before_token = false;
53762 this.non_breaking_space = false;
53763 this.previous_token_wrapped = false;
53766 Output.prototype.add_token = function(printable_token) {
53767 this.__add_space_before_token();
53768 this.current_line.push(printable_token);
53769 this.space_before_token = false;
53770 this.non_breaking_space = false;
53771 this.previous_token_wrapped = this.current_line._allow_wrap();
53774 Output.prototype.__add_space_before_token = function() {
53775 if (this.space_before_token && !this.just_added_newline()) {
53776 if (!this.non_breaking_space) {
53777 this.set_wrap_point();
53779 this.current_line.push(' ');
53783 Output.prototype.remove_indent = function(index) {
53784 var output_length = this.__lines.length;
53785 while (index < output_length) {
53786 this.__lines[index]._remove_indent();
53789 this.current_line._remove_wrap_indent();
53792 Output.prototype.trim = function(eat_newlines) {
53793 eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
53795 this.current_line.trim();
53797 while (eat_newlines && this.__lines.length > 1 &&
53798 this.current_line.is_empty()) {
53799 this.__lines.pop();
53800 this.current_line = this.__lines[this.__lines.length - 1];
53801 this.current_line.trim();
53804 this.previous_line = this.__lines.length > 1 ?
53805 this.__lines[this.__lines.length - 2] : null;
53808 Output.prototype.just_added_newline = function() {
53809 return this.current_line.is_empty();
53812 Output.prototype.just_added_blankline = function() {
53813 return this.is_empty() ||
53814 (this.current_line.is_empty() && this.previous_line.is_empty());
53817 Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
53818 var index = this.__lines.length - 2;
53819 while (index >= 0) {
53820 var potentialEmptyLine = this.__lines[index];
53821 if (potentialEmptyLine.is_empty()) {
53823 } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
53824 potentialEmptyLine.item(-1) !== ends_with) {
53825 this.__lines.splice(index + 1, 0, new OutputLine(this));
53826 this.previous_line = this.__lines[this.__lines.length - 2];
53833 module.exports.Output = Output;
53838 /***/ (function(module, exports, __nested_webpack_require_19580__) {
53841 /*jshint node:true */
53844 The MIT License (MIT)
53846 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53848 Permission is hereby granted, free of charge, to any person
53849 obtaining a copy of this software and associated documentation files
53850 (the "Software"), to deal in the Software without restriction,
53851 including without limitation the rights to use, copy, modify, merge,
53852 publish, distribute, sublicense, and/or sell copies of the Software,
53853 and to permit persons to whom the Software is furnished to do so,
53854 subject to the following conditions:
53856 The above copyright notice and this permission notice shall be
53857 included in all copies or substantial portions of the Software.
53859 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53860 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53861 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53862 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53863 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53864 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53865 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53871 function Token(type, text, newlines, whitespace_before) {
53875 // comments_before are
53876 // comments that have a new line before them
53877 // and may or may not have a newline after
53878 // this is a set of comments before
53879 this.comments_before = null; /* inline comment*/
53882 // this.comments_after = new TokenStream(); // no new line before and newline after
53883 this.newlines = newlines || 0;
53884 this.whitespace_before = whitespace_before || '';
53885 this.parent = null;
53887 this.previous = null;
53888 this.opened = null;
53889 this.closed = null;
53890 this.directives = null;
53894 module.exports.Token = Token;
53901 /***/ (function(module, exports, __nested_webpack_require_21527__) {
53904 /*jshint node:true */
53907 The MIT License (MIT)
53909 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
53911 Permission is hereby granted, free of charge, to any person
53912 obtaining a copy of this software and associated documentation files
53913 (the "Software"), to deal in the Software without restriction,
53914 including without limitation the rights to use, copy, modify, merge,
53915 publish, distribute, sublicense, and/or sell copies of the Software,
53916 and to permit persons to whom the Software is furnished to do so,
53917 subject to the following conditions:
53919 The above copyright notice and this permission notice shall be
53920 included in all copies or substantial portions of the Software.
53922 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53923 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53924 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53925 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
53926 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
53927 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
53928 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53934 function Options(options, merge_child_field) {
53935 this.raw_options = _mergeOpts(options, merge_child_field);
53937 // Support passing the source text back with no change
53938 this.disabled = this._get_boolean('disabled');
53940 this.eol = this._get_characters('eol', 'auto');
53941 this.end_with_newline = this._get_boolean('end_with_newline');
53942 this.indent_size = this._get_number('indent_size', 4);
53943 this.indent_char = this._get_characters('indent_char', ' ');
53944 this.indent_level = this._get_number('indent_level');
53946 this.preserve_newlines = this._get_boolean('preserve_newlines', true);
53947 this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
53948 if (!this.preserve_newlines) {
53949 this.max_preserve_newlines = 0;
53952 this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
53953 if (this.indent_with_tabs) {
53954 this.indent_char = '\t';
53956 // indent_size behavior changed after 1.8.6
53957 // It used to be that indent_size would be
53958 // set to 1 for indent_with_tabs. That is no longer needed and
53959 // actually doesn't make sense - why not use spaces? Further,
53960 // that might produce unexpected behavior - tabs being used
53961 // for single-column alignment. So, when indent_with_tabs is true
53962 // and indent_size is 1, reset indent_size to 4.
53963 if (this.indent_size === 1) {
53964 this.indent_size = 4;
53968 // Backwards compat with 1.3.x
53969 this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));
53971 this.indent_empty_lines = this._get_boolean('indent_empty_lines');
53973 // valid templating languages ['django', 'erb', 'handlebars', 'php']
53974 // For now, 'auto' = all off for javascript, all on for html (and inline javascript).
53975 // other values ignored
53976 this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']);
53979 Options.prototype._get_array = function(name, default_value) {
53980 var option_value = this.raw_options[name];
53981 var result = default_value || [];
53982 if (typeof option_value === 'object') {
53983 if (option_value !== null && typeof option_value.concat === 'function') {
53984 result = option_value.concat();
53986 } else if (typeof option_value === 'string') {
53987 result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
53992 Options.prototype._get_boolean = function(name, default_value) {
53993 var option_value = this.raw_options[name];
53994 var result = option_value === undefined ? !!default_value : !!option_value;
53998 Options.prototype._get_characters = function(name, default_value) {
53999 var option_value = this.raw_options[name];
54000 var result = default_value || '';
54001 if (typeof option_value === 'string') {
54002 result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
54007 Options.prototype._get_number = function(name, default_value) {
54008 var option_value = this.raw_options[name];
54009 default_value = parseInt(default_value, 10);
54010 if (isNaN(default_value)) {
54013 var result = parseInt(option_value, 10);
54014 if (isNaN(result)) {
54015 result = default_value;
54020 Options.prototype._get_selection = function(name, selection_list, default_value) {
54021 var result = this._get_selection_list(name, selection_list, default_value);
54022 if (result.length !== 1) {
54024 "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
54025 selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
54032 Options.prototype._get_selection_list = function(name, selection_list, default_value) {
54033 if (!selection_list || selection_list.length === 0) {
54034 throw new Error("Selection list cannot be empty.");
54037 default_value = default_value || [selection_list[0]];
54038 if (!this._is_valid_selection(default_value, selection_list)) {
54039 throw new Error("Invalid Default Value!");
54042 var result = this._get_array(name, default_value);
54043 if (!this._is_valid_selection(result, selection_list)) {
54045 "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
54046 selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
54052 Options.prototype._is_valid_selection = function(result, selection_list) {
54053 return result.length && selection_list.length &&
54054 !result.some(function(item) { return selection_list.indexOf(item) === -1; });
54058 // merges child options up with the parent options object
54059 // Example: obj = {a: 1, b: {a: 2}}
54060 // mergeOpts(obj, 'b')
54063 function _mergeOpts(allOptions, childFieldName) {
54064 var finalOpts = {};
54065 allOptions = _normalizeOpts(allOptions);
54068 for (name in allOptions) {
54069 if (name !== childFieldName) {
54070 finalOpts[name] = allOptions[name];
54074 //merge in the per type settings for the childFieldName
54075 if (childFieldName && allOptions[childFieldName]) {
54076 for (name in allOptions[childFieldName]) {
54077 finalOpts[name] = allOptions[childFieldName][name];
54083 function _normalizeOpts(options) {
54084 var convertedOpts = {};
54087 for (key in options) {
54088 var newKey = key.replace(/-/g, "_");
54089 convertedOpts[newKey] = options[key];
54091 return convertedOpts;
54094 module.exports.Options = Options;
54095 module.exports.normalizeOpts = _normalizeOpts;
54096 module.exports.mergeOpts = _mergeOpts;
54102 /***/ (function(module, exports, __nested_webpack_require_28319__) {
54105 /*jshint node:true */
54108 The MIT License (MIT)
54110 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54112 Permission is hereby granted, free of charge, to any person
54113 obtaining a copy of this software and associated documentation files
54114 (the "Software"), to deal in the Software without restriction,
54115 including without limitation the rights to use, copy, modify, merge,
54116 publish, distribute, sublicense, and/or sell copies of the Software,
54117 and to permit persons to whom the Software is furnished to do so,
54118 subject to the following conditions:
54120 The above copyright notice and this permission notice shall be
54121 included in all copies or substantial portions of the Software.
54123 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54124 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54125 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54126 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54127 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54128 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54129 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54135 var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');
54137 function InputScanner(input_string) {
54138 this.__input = input_string || '';
54139 this.__input_length = this.__input.length;
54140 this.__position = 0;
54143 InputScanner.prototype.restart = function() {
54144 this.__position = 0;
54147 InputScanner.prototype.back = function() {
54148 if (this.__position > 0) {
54149 this.__position -= 1;
54153 InputScanner.prototype.hasNext = function() {
54154 return this.__position < this.__input_length;
54157 InputScanner.prototype.next = function() {
54159 if (this.hasNext()) {
54160 val = this.__input.charAt(this.__position);
54161 this.__position += 1;
54166 InputScanner.prototype.peek = function(index) {
54168 index = index || 0;
54169 index += this.__position;
54170 if (index >= 0 && index < this.__input_length) {
54171 val = this.__input.charAt(index);
54176 // This is a JavaScript only helper function (not in python)
54177 // Javascript doesn't have a match method
54178 // and not all implementation support "sticky" flag.
54179 // If they do not support sticky then both this.match() and this.test() method
54180 // must get the match and check the index of the match.
54181 // If sticky is supported and set, this method will use it.
54182 // Otherwise it will check that global is set, and fall back to the slower method.
54183 InputScanner.prototype.__match = function(pattern, index) {
54184 pattern.lastIndex = index;
54185 var pattern_match = pattern.exec(this.__input);
54187 if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
54188 if (pattern_match.index !== index) {
54189 pattern_match = null;
54193 return pattern_match;
54196 InputScanner.prototype.test = function(pattern, index) {
54197 index = index || 0;
54198 index += this.__position;
54200 if (index >= 0 && index < this.__input_length) {
54201 return !!this.__match(pattern, index);
54207 InputScanner.prototype.testChar = function(pattern, index) {
54208 // test one character regex match
54209 var val = this.peek(index);
54210 pattern.lastIndex = 0;
54211 return val !== null && pattern.test(val);
54214 InputScanner.prototype.match = function(pattern) {
54215 var pattern_match = this.__match(pattern, this.__position);
54216 if (pattern_match) {
54217 this.__position += pattern_match[0].length;
54219 pattern_match = null;
54221 return pattern_match;
54224 InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
54227 if (starting_pattern) {
54228 match = this.match(starting_pattern);
54233 if (until_pattern && (match || !starting_pattern)) {
54234 val += this.readUntil(until_pattern, until_after);
54239 InputScanner.prototype.readUntil = function(pattern, until_after) {
54241 var match_index = this.__position;
54242 pattern.lastIndex = this.__position;
54243 var pattern_match = pattern.exec(this.__input);
54244 if (pattern_match) {
54245 match_index = pattern_match.index;
54247 match_index += pattern_match[0].length;
54250 match_index = this.__input_length;
54253 val = this.__input.substring(this.__position, match_index);
54254 this.__position = match_index;
54258 InputScanner.prototype.readUntilAfter = function(pattern) {
54259 return this.readUntil(pattern, true);
54262 InputScanner.prototype.get_regexp = function(pattern, match_from) {
54265 if (match_from && regexp_has_sticky) {
54268 // strings are converted to regexp
54269 if (typeof pattern === "string" && pattern !== '') {
54270 // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags);
54271 result = new RegExp(pattern, flags);
54272 } else if (pattern) {
54273 result = new RegExp(pattern.source, flags);
54278 InputScanner.prototype.get_literal_regexp = function(literal_string) {
54279 return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
54282 /* css beautifier legacy helpers */
54283 InputScanner.prototype.peekUntilAfter = function(pattern) {
54284 var start = this.__position;
54285 var val = this.readUntilAfter(pattern);
54286 this.__position = start;
54290 InputScanner.prototype.lookBack = function(testVal) {
54291 var start = this.__position - 1;
54292 return start >= testVal.length && this.__input.substring(start - testVal.length, start)
54293 .toLowerCase() === testVal;
54296 module.exports.InputScanner = InputScanner;
54301 /***/ (function(module, exports, __nested_webpack_require_34031__) {
54304 /*jshint node:true */
54307 The MIT License (MIT)
54309 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54311 Permission is hereby granted, free of charge, to any person
54312 obtaining a copy of this software and associated documentation files
54313 (the "Software"), to deal in the Software without restriction,
54314 including without limitation the rights to use, copy, modify, merge,
54315 publish, distribute, sublicense, and/or sell copies of the Software,
54316 and to permit persons to whom the Software is furnished to do so,
54317 subject to the following conditions:
54319 The above copyright notice and this permission notice shall be
54320 included in all copies or substantial portions of the Software.
54322 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54323 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54324 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54325 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54326 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54327 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54328 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54334 var InputScanner = __nested_webpack_require_34031__(8).InputScanner;
54335 var Token = __nested_webpack_require_34031__(3).Token;
54336 var TokenStream = __nested_webpack_require_34031__(10).TokenStream;
54337 var WhitespacePattern = __nested_webpack_require_34031__(11).WhitespacePattern;
54345 var Tokenizer = function(input_string, options) {
54346 this._input = new InputScanner(input_string);
54347 this._options = options || {};
54348 this.__tokens = null;
54350 this._patterns = {};
54351 this._patterns.whitespace = new WhitespacePattern(this._input);
54354 Tokenizer.prototype.tokenize = function() {
54355 this._input.restart();
54356 this.__tokens = new TokenStream();
54361 var previous = new Token(TOKEN.START, '');
54362 var open_token = null;
54363 var open_stack = [];
54364 var comments = new TokenStream();
54366 while (previous.type !== TOKEN.EOF) {
54367 current = this._get_next_token(previous, open_token);
54368 while (this._is_comment(current)) {
54369 comments.add(current);
54370 current = this._get_next_token(previous, open_token);
54373 if (!comments.isEmpty()) {
54374 current.comments_before = comments;
54375 comments = new TokenStream();
54378 current.parent = open_token;
54380 if (this._is_opening(current)) {
54381 open_stack.push(open_token);
54382 open_token = current;
54383 } else if (open_token && this._is_closing(current, open_token)) {
54384 current.opened = open_token;
54385 open_token.closed = current;
54386 open_token = open_stack.pop();
54387 current.parent = open_token;
54390 current.previous = previous;
54391 previous.next = current;
54393 this.__tokens.add(current);
54394 previous = current;
54397 return this.__tokens;
54401 Tokenizer.prototype._is_first_token = function() {
54402 return this.__tokens.isEmpty();
54405 Tokenizer.prototype._reset = function() {};
54407 Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false
54408 this._readWhitespace();
54409 var resulting_string = this._input.read(/.+/g);
54410 if (resulting_string) {
54411 return this._create_token(TOKEN.RAW, resulting_string);
54413 return this._create_token(TOKEN.EOF, '');
54417 Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false
54421 Tokenizer.prototype._is_opening = function(current_token) { // jshint unused:false
54425 Tokenizer.prototype._is_closing = function(current_token, open_token) { // jshint unused:false
54429 Tokenizer.prototype._create_token = function(type, text) {
54430 var token = new Token(type, text,
54431 this._patterns.whitespace.newline_count,
54432 this._patterns.whitespace.whitespace_before_token);
54436 Tokenizer.prototype._readWhitespace = function() {
54437 return this._patterns.whitespace.read();
54442 module.exports.Tokenizer = Tokenizer;
54443 module.exports.TOKEN = TOKEN;
54448 /***/ (function(module, exports, __nested_webpack_require_38146__) {
54451 /*jshint node:true */
54454 The MIT License (MIT)
54456 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54458 Permission is hereby granted, free of charge, to any person
54459 obtaining a copy of this software and associated documentation files
54460 (the "Software"), to deal in the Software without restriction,
54461 including without limitation the rights to use, copy, modify, merge,
54462 publish, distribute, sublicense, and/or sell copies of the Software,
54463 and to permit persons to whom the Software is furnished to do so,
54464 subject to the following conditions:
54466 The above copyright notice and this permission notice shall be
54467 included in all copies or substantial portions of the Software.
54469 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54470 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54471 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54472 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54473 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54474 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54475 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54481 function TokenStream(parent_token) {
54483 this.__tokens = [];
54484 this.__tokens_length = this.__tokens.length;
54485 this.__position = 0;
54486 this.__parent_token = parent_token;
54489 TokenStream.prototype.restart = function() {
54490 this.__position = 0;
54493 TokenStream.prototype.isEmpty = function() {
54494 return this.__tokens_length === 0;
54497 TokenStream.prototype.hasNext = function() {
54498 return this.__position < this.__tokens_length;
54501 TokenStream.prototype.next = function() {
54503 if (this.hasNext()) {
54504 val = this.__tokens[this.__position];
54505 this.__position += 1;
54510 TokenStream.prototype.peek = function(index) {
54512 index = index || 0;
54513 index += this.__position;
54514 if (index >= 0 && index < this.__tokens_length) {
54515 val = this.__tokens[index];
54520 TokenStream.prototype.add = function(token) {
54521 if (this.__parent_token) {
54522 token.parent = this.__parent_token;
54524 this.__tokens.push(token);
54525 this.__tokens_length += 1;
54528 module.exports.TokenStream = TokenStream;
54533 /***/ (function(module, exports, __nested_webpack_require_40484__) {
54536 /*jshint node:true */
54539 The MIT License (MIT)
54541 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54543 Permission is hereby granted, free of charge, to any person
54544 obtaining a copy of this software and associated documentation files
54545 (the "Software"), to deal in the Software without restriction,
54546 including without limitation the rights to use, copy, modify, merge,
54547 publish, distribute, sublicense, and/or sell copies of the Software,
54548 and to permit persons to whom the Software is furnished to do so,
54549 subject to the following conditions:
54551 The above copyright notice and this permission notice shall be
54552 included in all copies or substantial portions of the Software.
54554 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54555 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54556 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54557 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54558 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54559 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54560 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54566 var Pattern = __nested_webpack_require_40484__(12).Pattern;
54568 function WhitespacePattern(input_scanner, parent) {
54569 Pattern.call(this, input_scanner, parent);
54571 this._line_regexp = this._input.get_regexp(parent._line_regexp);
54573 this.__set_whitespace_patterns('', '');
54576 this.newline_count = 0;
54577 this.whitespace_before_token = '';
54579 WhitespacePattern.prototype = new Pattern();
54581 WhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) {
54582 whitespace_chars += '\\t ';
54583 newline_chars += '\\n\\r';
54585 this._match_pattern = this._input.get_regexp(
54586 '[' + whitespace_chars + newline_chars + ']+', true);
54587 this._newline_regexp = this._input.get_regexp(
54588 '\\r\\n|[' + newline_chars + ']');
54591 WhitespacePattern.prototype.read = function() {
54592 this.newline_count = 0;
54593 this.whitespace_before_token = '';
54595 var resulting_string = this._input.read(this._match_pattern);
54596 if (resulting_string === ' ') {
54597 this.whitespace_before_token = ' ';
54598 } else if (resulting_string) {
54599 var matches = this.__split(this._newline_regexp, resulting_string);
54600 this.newline_count = matches.length - 1;
54601 this.whitespace_before_token = matches[this.newline_count];
54604 return resulting_string;
54607 WhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) {
54608 var result = this._create();
54609 result.__set_whitespace_patterns(whitespace_chars, newline_chars);
54614 WhitespacePattern.prototype._create = function() {
54615 return new WhitespacePattern(this._input, this);
54618 WhitespacePattern.prototype.__split = function(regexp, input_string) {
54619 regexp.lastIndex = 0;
54620 var start_index = 0;
54622 var next_match = regexp.exec(input_string);
54623 while (next_match) {
54624 result.push(input_string.substring(start_index, next_match.index));
54625 start_index = next_match.index + next_match[0].length;
54626 next_match = regexp.exec(input_string);
54629 if (start_index < input_string.length) {
54630 result.push(input_string.substring(start_index, input_string.length));
54640 module.exports.WhitespacePattern = WhitespacePattern;
54645 /***/ (function(module, exports, __nested_webpack_require_43972__) {
54648 /*jshint node:true */
54651 The MIT License (MIT)
54653 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54655 Permission is hereby granted, free of charge, to any person
54656 obtaining a copy of this software and associated documentation files
54657 (the "Software"), to deal in the Software without restriction,
54658 including without limitation the rights to use, copy, modify, merge,
54659 publish, distribute, sublicense, and/or sell copies of the Software,
54660 and to permit persons to whom the Software is furnished to do so,
54661 subject to the following conditions:
54663 The above copyright notice and this permission notice shall be
54664 included in all copies or substantial portions of the Software.
54666 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54667 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54668 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54669 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54670 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54671 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54672 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54678 function Pattern(input_scanner, parent) {
54679 this._input = input_scanner;
54680 this._starting_pattern = null;
54681 this._match_pattern = null;
54682 this._until_pattern = null;
54683 this._until_after = false;
54686 this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true);
54687 this._match_pattern = this._input.get_regexp(parent._match_pattern, true);
54688 this._until_pattern = this._input.get_regexp(parent._until_pattern);
54689 this._until_after = parent._until_after;
54693 Pattern.prototype.read = function() {
54694 var result = this._input.read(this._starting_pattern);
54695 if (!this._starting_pattern || result) {
54696 result += this._input.read(this._match_pattern, this._until_pattern, this._until_after);
54701 Pattern.prototype.read_match = function() {
54702 return this._input.match(this._match_pattern);
54705 Pattern.prototype.until_after = function(pattern) {
54706 var result = this._create();
54707 result._until_after = true;
54708 result._until_pattern = this._input.get_regexp(pattern);
54713 Pattern.prototype.until = function(pattern) {
54714 var result = this._create();
54715 result._until_after = false;
54716 result._until_pattern = this._input.get_regexp(pattern);
54721 Pattern.prototype.starting_with = function(pattern) {
54722 var result = this._create();
54723 result._starting_pattern = this._input.get_regexp(pattern, true);
54728 Pattern.prototype.matching = function(pattern) {
54729 var result = this._create();
54730 result._match_pattern = this._input.get_regexp(pattern, true);
54735 Pattern.prototype._create = function() {
54736 return new Pattern(this._input, this);
54739 Pattern.prototype._update = function() {};
54741 module.exports.Pattern = Pattern;
54746 /***/ (function(module, exports, __nested_webpack_require_47072__) {
54749 /*jshint node:true */
54752 The MIT License (MIT)
54754 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54756 Permission is hereby granted, free of charge, to any person
54757 obtaining a copy of this software and associated documentation files
54758 (the "Software"), to deal in the Software without restriction,
54759 including without limitation the rights to use, copy, modify, merge,
54760 publish, distribute, sublicense, and/or sell copies of the Software,
54761 and to permit persons to whom the Software is furnished to do so,
54762 subject to the following conditions:
54764 The above copyright notice and this permission notice shall be
54765 included in all copies or substantial portions of the Software.
54767 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54768 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54769 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54770 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54771 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54772 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54773 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54779 function Directives(start_block_pattern, end_block_pattern) {
54780 start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
54781 end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
54782 this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
54783 this.__directive_pattern = / (\w+)[:](\w+)/g;
54785 this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
54788 Directives.prototype.get_directives = function(text) {
54789 if (!text.match(this.__directives_block_pattern)) {
54793 var directives = {};
54794 this.__directive_pattern.lastIndex = 0;
54795 var directive_match = this.__directive_pattern.exec(text);
54797 while (directive_match) {
54798 directives[directive_match[1]] = directive_match[2];
54799 directive_match = this.__directive_pattern.exec(text);
54805 Directives.prototype.readIgnored = function(input) {
54806 return input.readUntilAfter(this.__directives_end_ignore_pattern);
54810 module.exports.Directives = Directives;
54815 /***/ (function(module, exports, __nested_webpack_require_49554__) {
54818 /*jshint node:true */
54821 The MIT License (MIT)
54823 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
54825 Permission is hereby granted, free of charge, to any person
54826 obtaining a copy of this software and associated documentation files
54827 (the "Software"), to deal in the Software without restriction,
54828 including without limitation the rights to use, copy, modify, merge,
54829 publish, distribute, sublicense, and/or sell copies of the Software,
54830 and to permit persons to whom the Software is furnished to do so,
54831 subject to the following conditions:
54833 The above copyright notice and this permission notice shall be
54834 included in all copies or substantial portions of the Software.
54836 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
54837 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
54838 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
54839 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
54840 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
54841 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54842 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54848 var Pattern = __nested_webpack_require_49554__(12).Pattern;
54851 var template_names = {
54858 // This lets templates appear anywhere we would do a readUntil
54859 // The cost is higher but it is pay to play.
54860 function TemplatablePattern(input_scanner, parent) {
54861 Pattern.call(this, input_scanner, parent);
54862 this.__template_pattern = null;
54863 this._disabled = Object.assign({}, template_names);
54864 this._excluded = Object.assign({}, template_names);
54867 this.__template_pattern = this._input.get_regexp(parent.__template_pattern);
54868 this._excluded = Object.assign(this._excluded, parent._excluded);
54869 this._disabled = Object.assign(this._disabled, parent._disabled);
54871 var pattern = new Pattern(input_scanner);
54872 this.__patterns = {
54873 handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/),
54874 handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/),
54875 handlebars: pattern.starting_with(/{{/).until_after(/}}/),
54876 php: pattern.starting_with(/<\?(?:[=]|php)/).until_after(/\?>/),
54877 erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/),
54878 // django coflicts with handlebars a bit.
54879 django: pattern.starting_with(/{%/).until_after(/%}/),
54880 django_value: pattern.starting_with(/{{/).until_after(/}}/),
54881 django_comment: pattern.starting_with(/{#/).until_after(/#}/)
54884 TemplatablePattern.prototype = new Pattern();
54886 TemplatablePattern.prototype._create = function() {
54887 return new TemplatablePattern(this._input, this);
54890 TemplatablePattern.prototype._update = function() {
54891 this.__set_templated_pattern();
54894 TemplatablePattern.prototype.disable = function(language) {
54895 var result = this._create();
54896 result._disabled[language] = true;
54901 TemplatablePattern.prototype.read_options = function(options) {
54902 var result = this._create();
54903 for (var language in template_names) {
54904 result._disabled[language] = options.templating.indexOf(language) === -1;
54910 TemplatablePattern.prototype.exclude = function(language) {
54911 var result = this._create();
54912 result._excluded[language] = true;
54917 TemplatablePattern.prototype.read = function() {
54919 if (this._match_pattern) {
54920 result = this._input.read(this._starting_pattern);
54922 result = this._input.read(this._starting_pattern, this.__template_pattern);
54924 var next = this._read_template();
54926 if (this._match_pattern) {
54927 next += this._input.read(this._match_pattern);
54929 next += this._input.readUntil(this.__template_pattern);
54932 next = this._read_template();
54935 if (this._until_after) {
54936 result += this._input.readUntilAfter(this._until_pattern);
54941 TemplatablePattern.prototype.__set_templated_pattern = function() {
54944 if (!this._disabled.php) {
54945 items.push(this.__patterns.php._starting_pattern.source);
54947 if (!this._disabled.handlebars) {
54948 items.push(this.__patterns.handlebars._starting_pattern.source);
54950 if (!this._disabled.erb) {
54951 items.push(this.__patterns.erb._starting_pattern.source);
54953 if (!this._disabled.django) {
54954 items.push(this.__patterns.django._starting_pattern.source);
54955 items.push(this.__patterns.django_value._starting_pattern.source);
54956 items.push(this.__patterns.django_comment._starting_pattern.source);
54959 if (this._until_pattern) {
54960 items.push(this._until_pattern.source);
54962 this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')');
54965 TemplatablePattern.prototype._read_template = function() {
54966 var resulting_string = '';
54967 var c = this._input.peek();
54969 var peek1 = this._input.peek(1);
54970 //if we're in a comment, do something special
54971 // We treat all comments as literals, even more than preformatted tags
54972 // we just look for the appropriate close tag
54973 if (!this._disabled.php && !this._excluded.php && peek1 === '?') {
54974 resulting_string = resulting_string ||
54975 this.__patterns.php.read();
54977 if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') {
54978 resulting_string = resulting_string ||
54979 this.__patterns.erb.read();
54981 } else if (c === '{') {
54982 if (!this._disabled.handlebars && !this._excluded.handlebars) {
54983 resulting_string = resulting_string ||
54984 this.__patterns.handlebars_comment.read();
54985 resulting_string = resulting_string ||
54986 this.__patterns.handlebars_unescaped.read();
54987 resulting_string = resulting_string ||
54988 this.__patterns.handlebars.read();
54990 if (!this._disabled.django) {
54991 // django coflicts with handlebars a bit.
54992 if (!this._excluded.django && !this._excluded.handlebars) {
54993 resulting_string = resulting_string ||
54994 this.__patterns.django_value.read();
54996 if (!this._excluded.django) {
54997 resulting_string = resulting_string ||
54998 this.__patterns.django_comment.read();
54999 resulting_string = resulting_string ||
55000 this.__patterns.django.read();
55004 return resulting_string;
55008 module.exports.TemplatablePattern = TemplatablePattern;
55016 /***/ (function(module, exports, __nested_webpack_require_56152__) {
55019 /*jshint node:true */
55022 The MIT License (MIT)
55024 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
55026 Permission is hereby granted, free of charge, to any person
55027 obtaining a copy of this software and associated documentation files
55028 (the "Software"), to deal in the Software without restriction,
55029 including without limitation the rights to use, copy, modify, merge,
55030 publish, distribute, sublicense, and/or sell copies of the Software,
55031 and to permit persons to whom the Software is furnished to do so,
55032 subject to the following conditions:
55034 The above copyright notice and this permission notice shall be
55035 included in all copies or substantial portions of the Software.
55037 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
55038 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55039 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55040 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
55041 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
55042 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
55043 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55049 var Beautifier = __nested_webpack_require_56152__(19).Beautifier,
55050 Options = __nested_webpack_require_56152__(20).Options;
55052 function style_html(html_source, options, js_beautify, css_beautify) {
55053 var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify);
55054 return beautifier.beautify();
55057 module.exports = style_html;
55058 module.exports.defaultOptions = function() {
55059 return new Options();
55065 /***/ (function(module, exports, __nested_webpack_require_57823__) {
55068 /*jshint node:true */
55071 The MIT License (MIT)
55073 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
55075 Permission is hereby granted, free of charge, to any person
55076 obtaining a copy of this software and associated documentation files
55077 (the "Software"), to deal in the Software without restriction,
55078 including without limitation the rights to use, copy, modify, merge,
55079 publish, distribute, sublicense, and/or sell copies of the Software,
55080 and to permit persons to whom the Software is furnished to do so,
55081 subject to the following conditions:
55083 The above copyright notice and this permission notice shall be
55084 included in all copies or substantial portions of the Software.
55086 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
55087 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55088 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55089 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
55090 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
55091 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
55092 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55098 var Options = __nested_webpack_require_57823__(20).Options;
55099 var Output = __nested_webpack_require_57823__(2).Output;
55100 var Tokenizer = __nested_webpack_require_57823__(21).Tokenizer;
55101 var TOKEN = __nested_webpack_require_57823__(21).TOKEN;
55103 var lineBreak = /\r\n|[\r\n]/;
55104 var allLineBreaks = /\r\n|[\r\n]/g;
55106 var Printer = function(options, base_indent_string) { //handles input/output and some other printing functions
55108 this.indent_level = 0;
55109 this.alignment_size = 0;
55110 this.max_preserve_newlines = options.max_preserve_newlines;
55111 this.preserve_newlines = options.preserve_newlines;
55113 this._output = new Output(options, base_indent_string);
55117 Printer.prototype.current_line_has_match = function(pattern) {
55118 return this._output.current_line.has_match(pattern);
55121 Printer.prototype.set_space_before_token = function(value, non_breaking) {
55122 this._output.space_before_token = value;
55123 this._output.non_breaking_space = non_breaking;
55126 Printer.prototype.set_wrap_point = function() {
55127 this._output.set_indent(this.indent_level, this.alignment_size);
55128 this._output.set_wrap_point();
55132 Printer.prototype.add_raw_token = function(token) {
55133 this._output.add_raw_token(token);
55136 Printer.prototype.print_preserved_newlines = function(raw_token) {
55138 if (raw_token.type !== TOKEN.TEXT && raw_token.previous.type !== TOKEN.TEXT) {
55139 newlines = raw_token.newlines ? 1 : 0;
55142 if (this.preserve_newlines) {
55143 newlines = raw_token.newlines < this.max_preserve_newlines + 1 ? raw_token.newlines : this.max_preserve_newlines + 1;
55145 for (var n = 0; n < newlines; n++) {
55146 this.print_newline(n > 0);
55149 return newlines !== 0;
55152 Printer.prototype.traverse_whitespace = function(raw_token) {
55153 if (raw_token.whitespace_before || raw_token.newlines) {
55154 if (!this.print_preserved_newlines(raw_token)) {
55155 this._output.space_before_token = true;
55162 Printer.prototype.previous_token_wrapped = function() {
55163 return this._output.previous_token_wrapped;
55166 Printer.prototype.print_newline = function(force) {
55167 this._output.add_new_line(force);
55170 Printer.prototype.print_token = function(token) {
55172 this._output.set_indent(this.indent_level, this.alignment_size);
55173 this._output.add_token(token.text);
55177 Printer.prototype.indent = function() {
55178 this.indent_level++;
55181 Printer.prototype.get_full_indent = function(level) {
55182 level = this.indent_level + (level || 0);
55187 return this._output.get_indent_string(level);
55190 var get_type_attribute = function(start_token) {
55192 var raw_token = start_token.next;
55194 // Search attributes for a type attribute
55195 while (raw_token.type !== TOKEN.EOF && start_token.closed !== raw_token) {
55196 if (raw_token.type === TOKEN.ATTRIBUTE && raw_token.text === 'type') {
55197 if (raw_token.next && raw_token.next.type === TOKEN.EQUALS &&
55198 raw_token.next.next && raw_token.next.next.type === TOKEN.VALUE) {
55199 result = raw_token.next.next.text;
55203 raw_token = raw_token.next;
55209 var get_custom_beautifier_name = function(tag_check, raw_token) {
55210 var typeAttribute = null;
55213 if (!raw_token.closed) {
55217 if (tag_check === 'script') {
55218 typeAttribute = 'text/javascript';
55219 } else if (tag_check === 'style') {
55220 typeAttribute = 'text/css';
55223 typeAttribute = get_type_attribute(raw_token) || typeAttribute;
55225 // For script and style tags that have a type attribute, only enable custom beautifiers for matching values
55226 // For those without a type attribute use default;
55227 if (typeAttribute.search('text/css') > -1) {
55229 } else if (typeAttribute.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1) {
55230 result = 'javascript';
55231 } else if (typeAttribute.search(/(text|application|dojo)\/(x-)?(html)/) > -1) {
55233 } else if (typeAttribute.search(/test\/null/) > -1) {
55234 // Test only mime-type for testing the beautifier when null is passed as beautifing function
55241 function in_array(what, arr) {
55242 return arr.indexOf(what) !== -1;
55245 function TagFrame(parent, parser_token, indent_level) {
55246 this.parent = parent || null;
55247 this.tag = parser_token ? parser_token.tag_name : '';
55248 this.indent_level = indent_level || 0;
55249 this.parser_token = parser_token || null;
55252 function TagStack(printer) {
55253 this._printer = printer;
55254 this._current_frame = null;
55257 TagStack.prototype.get_parser_token = function() {
55258 return this._current_frame ? this._current_frame.parser_token : null;
55261 TagStack.prototype.record_tag = function(parser_token) { //function to record a tag and its parent in this.tags Object
55262 var new_frame = new TagFrame(this._current_frame, parser_token, this._printer.indent_level);
55263 this._current_frame = new_frame;
55266 TagStack.prototype._try_pop_frame = function(frame) { //function to retrieve the opening tag to the corresponding closer
55267 var parser_token = null;
55270 parser_token = frame.parser_token;
55271 this._printer.indent_level = frame.indent_level;
55272 this._current_frame = frame.parent;
55275 return parser_token;
55278 TagStack.prototype._get_frame = function(tag_list, stop_list) { //function to retrieve the opening tag to the corresponding closer
55279 var frame = this._current_frame;
55281 while (frame) { //till we reach '' (the initial value);
55282 if (tag_list.indexOf(frame.tag) !== -1) { //if this is it use it
55284 } else if (stop_list && stop_list.indexOf(frame.tag) !== -1) {
55288 frame = frame.parent;
55294 TagStack.prototype.try_pop = function(tag, stop_list) { //function to retrieve the opening tag to the corresponding closer
55295 var frame = this._get_frame([tag], stop_list);
55296 return this._try_pop_frame(frame);
55299 TagStack.prototype.indent_to_tag = function(tag_list) {
55300 var frame = this._get_frame(tag_list);
55302 this._printer.indent_level = frame.indent_level;
55306 function Beautifier(source_text, options, js_beautify, css_beautify) {
55307 //Wrapper function to invoke all the necessary constructors and deal with the output.
55308 this._source_text = source_text || '';
55309 options = options || {};
55310 this._js_beautify = js_beautify;
55311 this._css_beautify = css_beautify;
55312 this._tag_stack = null;
55314 // Allow the setting of language/file-type specific options
55315 // with inheritance of overall settings
55316 var optionHtml = new Options(options, 'html');
55318 this._options = optionHtml;
55320 this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 'force'.length) === 'force';
55321 this._is_wrap_attributes_force_expand_multiline = (this._options.wrap_attributes === 'force-expand-multiline');
55322 this._is_wrap_attributes_force_aligned = (this._options.wrap_attributes === 'force-aligned');
55323 this._is_wrap_attributes_aligned_multiple = (this._options.wrap_attributes === 'aligned-multiple');
55324 this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 'preserve'.length) === 'preserve';
55325 this._is_wrap_attributes_preserve_aligned = (this._options.wrap_attributes === 'preserve-aligned');
55328 Beautifier.prototype.beautify = function() {
55330 // if disabled, return the input unchanged.
55331 if (this._options.disabled) {
55332 return this._source_text;
55335 var source_text = this._source_text;
55336 var eol = this._options.eol;
55337 if (this._options.eol === 'auto') {
55339 if (source_text && lineBreak.test(source_text)) {
55340 eol = source_text.match(lineBreak)[0];
55344 // HACK: newline parsing inconsistent. This brute force normalizes the input.
55345 source_text = source_text.replace(allLineBreaks, '\n');
55347 var baseIndentString = source_text.match(/^[\t ]*/)[0];
55354 var last_tag_token = new TagOpenParserToken();
55356 var printer = new Printer(this._options, baseIndentString);
55357 var tokens = new Tokenizer(source_text, this._options).tokenize();
55359 this._tag_stack = new TagStack(printer);
55361 var parser_token = null;
55362 var raw_token = tokens.next();
55363 while (raw_token.type !== TOKEN.EOF) {
55365 if (raw_token.type === TOKEN.TAG_OPEN || raw_token.type === TOKEN.COMMENT) {
55366 parser_token = this._handle_tag_open(printer, raw_token, last_tag_token, last_token);
55367 last_tag_token = parser_token;
55368 } else if ((raw_token.type === TOKEN.ATTRIBUTE || raw_token.type === TOKEN.EQUALS || raw_token.type === TOKEN.VALUE) ||
55369 (raw_token.type === TOKEN.TEXT && !last_tag_token.tag_complete)) {
55370 parser_token = this._handle_inside_tag(printer, raw_token, last_tag_token, tokens);
55371 } else if (raw_token.type === TOKEN.TAG_CLOSE) {
55372 parser_token = this._handle_tag_close(printer, raw_token, last_tag_token);
55373 } else if (raw_token.type === TOKEN.TEXT) {
55374 parser_token = this._handle_text(printer, raw_token, last_tag_token);
55376 // This should never happen, but if it does. Print the raw token
55377 printer.add_raw_token(raw_token);
55380 last_token = parser_token;
55382 raw_token = tokens.next();
55384 var sweet_code = printer._output.get_code(eol);
55389 Beautifier.prototype._handle_tag_close = function(printer, raw_token, last_tag_token) {
55390 var parser_token = {
55391 text: raw_token.text,
55392 type: raw_token.type
55394 printer.alignment_size = 0;
55395 last_tag_token.tag_complete = true;
55397 printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
55398 if (last_tag_token.is_unformatted) {
55399 printer.add_raw_token(raw_token);
55401 if (last_tag_token.tag_start_char === '<') {
55402 printer.set_space_before_token(raw_token.text[0] === '/', true); // space before />, no space before >
55403 if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.has_wrapped_attrs) {
55404 printer.print_newline(false);
55407 printer.print_token(raw_token);
55411 if (last_tag_token.indent_content &&
55412 !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
55415 // only indent once per opened tag
55416 last_tag_token.indent_content = false;
55419 if (!last_tag_token.is_inline_element &&
55420 !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {
55421 printer.set_wrap_point();
55424 return parser_token;
55427 Beautifier.prototype._handle_inside_tag = function(printer, raw_token, last_tag_token, tokens) {
55428 var wrapped = last_tag_token.has_wrapped_attrs;
55429 var parser_token = {
55430 text: raw_token.text,
55431 type: raw_token.type
55434 printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);
55435 if (last_tag_token.is_unformatted) {
55436 printer.add_raw_token(raw_token);
55437 } else if (last_tag_token.tag_start_char === '{' && raw_token.type === TOKEN.TEXT) {
55438 // For the insides of handlebars allow newlines or a single space between open and contents
55439 if (printer.print_preserved_newlines(raw_token)) {
55440 raw_token.newlines = 0;
55441 printer.add_raw_token(raw_token);
55443 printer.print_token(raw_token);
55446 if (raw_token.type === TOKEN.ATTRIBUTE) {
55447 printer.set_space_before_token(true);
55448 last_tag_token.attr_count += 1;
55449 } else if (raw_token.type === TOKEN.EQUALS) { //no space before =
55450 printer.set_space_before_token(false);
55451 } else if (raw_token.type === TOKEN.VALUE && raw_token.previous.type === TOKEN.EQUALS) { //no space before value
55452 printer.set_space_before_token(false);
55455 if (raw_token.type === TOKEN.ATTRIBUTE && last_tag_token.tag_start_char === '<') {
55456 if (this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) {
55457 printer.traverse_whitespace(raw_token);
55458 wrapped = wrapped || raw_token.newlines !== 0;
55462 if (this._is_wrap_attributes_force) {
55463 var force_attr_wrap = last_tag_token.attr_count > 1;
55464 if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.attr_count === 1) {
55465 var is_only_attribute = true;
55466 var peek_index = 0;
55469 peek_token = tokens.peek(peek_index);
55470 if (peek_token.type === TOKEN.ATTRIBUTE) {
55471 is_only_attribute = false;
55475 } while (peek_index < 4 && peek_token.type !== TOKEN.EOF && peek_token.type !== TOKEN.TAG_CLOSE);
55477 force_attr_wrap = !is_only_attribute;
55480 if (force_attr_wrap) {
55481 printer.print_newline(false);
55486 printer.print_token(raw_token);
55487 wrapped = wrapped || printer.previous_token_wrapped();
55488 last_tag_token.has_wrapped_attrs = wrapped;
55490 return parser_token;
55493 Beautifier.prototype._handle_text = function(printer, raw_token, last_tag_token) {
55494 var parser_token = {
55495 text: raw_token.text,
55498 if (last_tag_token.custom_beautifier_name) { //check if we need to format javascript
55499 this._print_custom_beatifier_text(printer, raw_token, last_tag_token);
55500 } else if (last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) {
55501 printer.add_raw_token(raw_token);
55503 printer.traverse_whitespace(raw_token);
55504 printer.print_token(raw_token);
55506 return parser_token;
55509 Beautifier.prototype._print_custom_beatifier_text = function(printer, raw_token, last_tag_token) {
55511 if (raw_token.text !== '') {
55513 var text = raw_token.text,
55515 script_indent_level = 1,
55518 if (last_tag_token.custom_beautifier_name === 'javascript' && typeof this._js_beautify === 'function') {
55519 _beautifier = this._js_beautify;
55520 } else if (last_tag_token.custom_beautifier_name === 'css' && typeof this._css_beautify === 'function') {
55521 _beautifier = this._css_beautify;
55522 } else if (last_tag_token.custom_beautifier_name === 'html') {
55523 _beautifier = function(html_source, options) {
55524 var beautifier = new Beautifier(html_source, options, local._js_beautify, local._css_beautify);
55525 return beautifier.beautify();
55529 if (this._options.indent_scripts === "keep") {
55530 script_indent_level = 0;
55531 } else if (this._options.indent_scripts === "separate") {
55532 script_indent_level = -printer.indent_level;
55535 var indentation = printer.get_full_indent(script_indent_level);
55537 // if there is at least one empty line at the end of this text, strip it
55538 // we'll be adding one back after the text but before the containing tag.
55539 text = text.replace(/\n[ \t]*$/, '');
55541 // Handle the case where content is wrapped in a comment or cdata.
55542 if (last_tag_token.custom_beautifier_name !== 'html' &&
55543 text[0] === '<' && text.match(/^(<!--|<!\[CDATA\[)/)) {
55544 var matched = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(text);
55546 // if we start to wrap but don't finish, print raw
55548 printer.add_raw_token(raw_token);
55552 pre = indentation + matched[1] + '\n';
55555 post = indentation + matched[5];
55558 // if there is at least one empty line at the end of this text, strip it
55559 // we'll be adding one back after the text but before the containing tag.
55560 text = text.replace(/\n[ \t]*$/, '');
55562 if (matched[2] || matched[3].indexOf('\n') !== -1) {
55563 // if the first line of the non-comment text has spaces
55564 // use that as the basis for indenting in null case.
55565 matched = matched[3].match(/[ \t]+$/);
55567 raw_token.whitespace_before = matched[0];
55575 // call the Beautifier if avaliable
55576 var Child_options = function() {
55579 Child_options.prototype = this._options.raw_options;
55580 var child_options = new Child_options();
55581 text = _beautifier(indentation + text, child_options);
55583 // simply indent the string otherwise
55584 var white = raw_token.whitespace_before;
55586 text = text.replace(new RegExp('\n(' + white + ')?', 'g'), '\n');
55589 text = indentation + text.replace(/\n/g, '\n' + indentation);
55597 text = pre + text + '\n' + post;
55601 printer.print_newline(false);
55603 raw_token.text = text;
55604 raw_token.whitespace_before = '';
55605 raw_token.newlines = 0;
55606 printer.add_raw_token(raw_token);
55607 printer.print_newline(true);
55612 Beautifier.prototype._handle_tag_open = function(printer, raw_token, last_tag_token, last_token) {
55613 var parser_token = this._get_tag_open_token(raw_token);
55615 if ((last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) &&
55616 !last_tag_token.is_empty_element &&
55617 raw_token.type === TOKEN.TAG_OPEN && raw_token.text.indexOf('</') === 0) {
55618 // End element tags for unformatted or content_unformatted elements
55619 // are printed raw to keep any newlines inside them exactly the same.
55620 printer.add_raw_token(raw_token);
55621 parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name);
55623 printer.traverse_whitespace(raw_token);
55624 this._set_tag_position(printer, raw_token, parser_token, last_tag_token, last_token);
55625 if (!parser_token.is_inline_element) {
55626 printer.set_wrap_point();
55628 printer.print_token(raw_token);
55631 //indent attributes an auto, forced, aligned or forced-align line-wrap
55632 if (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) {
55633 parser_token.alignment_size = raw_token.text.length + 1;
55636 if (!parser_token.tag_complete && !parser_token.is_unformatted) {
55637 printer.alignment_size = parser_token.alignment_size;
55640 return parser_token;
55643 var TagOpenParserToken = function(parent, raw_token) {
55644 this.parent = parent || null;
55646 this.type = 'TK_TAG_OPEN';
55647 this.tag_name = '';
55648 this.is_inline_element = false;
55649 this.is_unformatted = false;
55650 this.is_content_unformatted = false;
55651 this.is_empty_element = false;
55652 this.is_start_tag = false;
55653 this.is_end_tag = false;
55654 this.indent_content = false;
55655 this.multiline_content = false;
55656 this.custom_beautifier_name = null;
55657 this.start_tag_token = null;
55658 this.attr_count = 0;
55659 this.has_wrapped_attrs = false;
55660 this.alignment_size = 0;
55661 this.tag_complete = false;
55662 this.tag_start_char = '';
55663 this.tag_check = '';
55666 this.tag_complete = true;
55668 var tag_check_match;
55670 this.tag_start_char = raw_token.text[0];
55671 this.text = raw_token.text;
55673 if (this.tag_start_char === '<') {
55674 tag_check_match = raw_token.text.match(/^<([^\s>]*)/);
55675 this.tag_check = tag_check_match ? tag_check_match[1] : '';
55677 tag_check_match = raw_token.text.match(/^{{(?:[\^]|#\*?)?([^\s}]+)/);
55678 this.tag_check = tag_check_match ? tag_check_match[1] : '';
55680 // handle "{{#> myPartial}}
55681 if (raw_token.text === '{{#>' && this.tag_check === '>' && raw_token.next !== null) {
55682 this.tag_check = raw_token.next.text;
55685 this.tag_check = this.tag_check.toLowerCase();
55687 if (raw_token.type === TOKEN.COMMENT) {
55688 this.tag_complete = true;
55691 this.is_start_tag = this.tag_check.charAt(0) !== '/';
55692 this.tag_name = !this.is_start_tag ? this.tag_check.substr(1) : this.tag_check;
55693 this.is_end_tag = !this.is_start_tag ||
55694 (raw_token.closed && raw_token.closed.text === '/>');
55696 // handlebars tags that don't start with # or ^ are single_tags, and so also start and end.
55697 this.is_end_tag = this.is_end_tag ||
55698 (this.tag_start_char === '{' && (this.text.length < 3 || (/[^#\^]/.test(this.text.charAt(2)))));
55702 Beautifier.prototype._get_tag_open_token = function(raw_token) { //function to get a full tag and parse its type
55703 var parser_token = new TagOpenParserToken(this._tag_stack.get_parser_token(), raw_token);
55705 parser_token.alignment_size = this._options.wrap_attributes_indent_size;
55707 parser_token.is_end_tag = parser_token.is_end_tag ||
55708 in_array(parser_token.tag_check, this._options.void_elements);
55710 parser_token.is_empty_element = parser_token.tag_complete ||
55711 (parser_token.is_start_tag && parser_token.is_end_tag);
55713 parser_token.is_unformatted = !parser_token.tag_complete && in_array(parser_token.tag_check, this._options.unformatted);
55714 parser_token.is_content_unformatted = !parser_token.is_empty_element && in_array(parser_token.tag_check, this._options.content_unformatted);
55715 parser_token.is_inline_element = in_array(parser_token.tag_name, this._options.inline) || parser_token.tag_start_char === '{';
55717 return parser_token;
55720 Beautifier.prototype._set_tag_position = function(printer, raw_token, parser_token, last_tag_token, last_token) {
55722 if (!parser_token.is_empty_element) {
55723 if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending
55724 parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name); //remove it and all ancestors
55725 } else { // it's a start-tag
55726 // check if this tag is starting an element that has optional end element
55727 // and do an ending needed
55728 if (this._do_optional_end_element(parser_token)) {
55729 if (!parser_token.is_inline_element) {
55730 printer.print_newline(false);
55734 this._tag_stack.record_tag(parser_token); //push it on the tag stack
55736 if ((parser_token.tag_name === 'script' || parser_token.tag_name === 'style') &&
55737 !(parser_token.is_unformatted || parser_token.is_content_unformatted)) {
55738 parser_token.custom_beautifier_name = get_custom_beautifier_name(parser_token.tag_check, raw_token);
55743 if (in_array(parser_token.tag_check, this._options.extra_liners)) { //check if this double needs an extra line
55744 printer.print_newline(false);
55745 if (!printer._output.just_added_blankline()) {
55746 printer.print_newline(true);
55750 if (parser_token.is_empty_element) { //if this tag name is a single tag type (either in the list or has a closing /)
55752 // if you hit an else case, reset the indent level if you are inside an:
55753 // 'if', 'unless', or 'each' block.
55754 if (parser_token.tag_start_char === '{' && parser_token.tag_check === 'else') {
55755 this._tag_stack.indent_to_tag(['if', 'unless', 'each']);
55756 parser_token.indent_content = true;
55757 // Don't add a newline if opening {{#if}} tag is on the current line
55758 var foundIfOnCurrentLine = printer.current_line_has_match(/{{#if/);
55759 if (!foundIfOnCurrentLine) {
55760 printer.print_newline(false);
55764 // Don't add a newline before elements that should remain where they are.
55765 if (parser_token.tag_name === '!--' && last_token.type === TOKEN.TAG_CLOSE &&
55766 last_tag_token.is_end_tag && parser_token.text.indexOf('\n') === -1) {
55767 //Do nothing. Leave comments on same line.
55769 if (!(parser_token.is_inline_element || parser_token.is_unformatted)) {
55770 printer.print_newline(false);
55772 this._calcluate_parent_multiline(printer, parser_token);
55774 } else if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending
55775 var do_end_expand = false;
55777 // deciding whether a block is multiline should not be this hard
55778 do_end_expand = parser_token.start_tag_token && parser_token.start_tag_token.multiline_content;
55779 do_end_expand = do_end_expand || (!parser_token.is_inline_element &&
55780 !(last_tag_token.is_inline_element || last_tag_token.is_unformatted) &&
55781 !(last_token.type === TOKEN.TAG_CLOSE && parser_token.start_tag_token === last_tag_token) &&
55782 last_token.type !== 'TK_CONTENT'
55785 if (parser_token.is_content_unformatted || parser_token.is_unformatted) {
55786 do_end_expand = false;
55789 if (do_end_expand) {
55790 printer.print_newline(false);
55792 } else { // it's a start-tag
55793 parser_token.indent_content = !parser_token.custom_beautifier_name;
55795 if (parser_token.tag_start_char === '<') {
55796 if (parser_token.tag_name === 'html') {
55797 parser_token.indent_content = this._options.indent_inner_html;
55798 } else if (parser_token.tag_name === 'head') {
55799 parser_token.indent_content = this._options.indent_head_inner_html;
55800 } else if (parser_token.tag_name === 'body') {
55801 parser_token.indent_content = this._options.indent_body_inner_html;
55805 if (!(parser_token.is_inline_element || parser_token.is_unformatted) &&
55806 (last_token.type !== 'TK_CONTENT' || parser_token.is_content_unformatted)) {
55807 printer.print_newline(false);
55810 this._calcluate_parent_multiline(printer, parser_token);
55814 Beautifier.prototype._calcluate_parent_multiline = function(printer, parser_token) {
55815 if (parser_token.parent && printer._output.just_added_newline() &&
55816 !((parser_token.is_inline_element || parser_token.is_unformatted) && parser_token.parent.is_inline_element)) {
55817 parser_token.parent.multiline_content = true;
55821 //To be used for <p> tag special case:
55822 var p_closers = ['address', 'article', 'aside', 'blockquote', 'details', 'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'];
55823 var p_parent_excludes = ['a', 'audio', 'del', 'ins', 'map', 'noscript', 'video'];
55825 Beautifier.prototype._do_optional_end_element = function(parser_token) {
55827 // NOTE: cases of "if there is no more content in the parent element"
55828 // are handled automatically by the beautifier.
55829 // It assumes parent or ancestor close tag closes all children.
55830 // https://www.w3.org/TR/html5/syntax.html#optional-tags
55831 if (parser_token.is_empty_element || !parser_token.is_start_tag || !parser_token.parent) {
55836 if (parser_token.tag_name === 'body') {
55837 // A head element’s end tag may be omitted if the head element is not immediately followed by a space character or a comment.
55838 result = result || this._tag_stack.try_pop('head');
55840 //} else if (parser_token.tag_name === 'body') {
55841 // DONE: A body element’s end tag may be omitted if the body element is not immediately followed by a comment.
55843 } else if (parser_token.tag_name === 'li') {
55844 // An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.
55845 result = result || this._tag_stack.try_pop('li', ['ol', 'ul']);
55847 } else if (parser_token.tag_name === 'dd' || parser_token.tag_name === 'dt') {
55848 // A dd element’s end tag may be omitted if the dd element is immediately followed by another dd element or a dt element, or if there is no more content in the parent element.
55849 // A dt element’s end tag may be omitted if the dt element is immediately followed by another dt element or a dd element.
55850 result = result || this._tag_stack.try_pop('dt', ['dl']);
55851 result = result || this._tag_stack.try_pop('dd', ['dl']);
55854 } else if (parser_token.parent.tag_name === 'p' && p_closers.indexOf(parser_token.tag_name) !== -1) {
55855 // IMPORTANT: this else-if works because p_closers has no overlap with any other element we look for in this method
55856 // check for the parent element is an HTML element that is not an <a>, <audio>, <del>, <ins>, <map>, <noscript>, or <video> element, or an autonomous custom element.
55857 // To do this right, this needs to be coded as an inclusion of the inverse of the exclusion above.
55858 // But to start with (if we ignore "autonomous custom elements") the exclusion would be fine.
55859 var p_parent = parser_token.parent.parent;
55860 if (!p_parent || p_parent_excludes.indexOf(p_parent.tag_name) === -1) {
55861 result = result || this._tag_stack.try_pop('p');
55863 } else if (parser_token.tag_name === 'rp' || parser_token.tag_name === 'rt') {
55864 // An rt element’s end tag may be omitted if the rt element is immediately followed by an rt or rp element, or if there is no more content in the parent element.
55865 // An rp element’s end tag may be omitted if the rp element is immediately followed by an rt or rp element, or if there is no more content in the parent element.
55866 result = result || this._tag_stack.try_pop('rt', ['ruby', 'rtc']);
55867 result = result || this._tag_stack.try_pop('rp', ['ruby', 'rtc']);
55869 } else if (parser_token.tag_name === 'optgroup') {
55870 // An optgroup element’s end tag may be omitted if the optgroup element is immediately followed by another optgroup element, or if there is no more content in the parent element.
55871 // An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element.
55872 result = result || this._tag_stack.try_pop('optgroup', ['select']);
55873 //result = result || this._tag_stack.try_pop('option', ['select']);
55875 } else if (parser_token.tag_name === 'option') {
55876 // An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element.
55877 result = result || this._tag_stack.try_pop('option', ['select', 'datalist', 'optgroup']);
55879 } else if (parser_token.tag_name === 'colgroup') {
55880 // DONE: A colgroup element’s end tag may be omitted if the colgroup element is not immediately followed by a space character or a comment.
55881 // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
55882 result = result || this._tag_stack.try_pop('caption', ['table']);
55884 } else if (parser_token.tag_name === 'thead') {
55885 // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
55886 // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
55887 result = result || this._tag_stack.try_pop('caption', ['table']);
55888 result = result || this._tag_stack.try_pop('colgroup', ['table']);
55890 //} else if (parser_token.tag_name === 'caption') {
55891 // DONE: A caption element’s end tag may be omitted if the caption element is not immediately followed by a space character or a comment.
55893 } else if (parser_token.tag_name === 'tbody' || parser_token.tag_name === 'tfoot') {
55894 // A thead element’s end tag may be omitted if the thead element is immediately followed by a tbody or tfoot element.
55895 // A tbody element’s end tag may be omitted if the tbody element is immediately followed by a tbody or tfoot element, or if there is no more content in the parent element.
55896 // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
55897 // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
55898 result = result || this._tag_stack.try_pop('caption', ['table']);
55899 result = result || this._tag_stack.try_pop('colgroup', ['table']);
55900 result = result || this._tag_stack.try_pop('thead', ['table']);
55901 result = result || this._tag_stack.try_pop('tbody', ['table']);
55903 //} else if (parser_token.tag_name === 'tfoot') {
55904 // DONE: A tfoot element’s end tag may be omitted if there is no more content in the parent element.
55906 } else if (parser_token.tag_name === 'tr') {
55907 // A tr element’s end tag may be omitted if the tr element is immediately followed by another tr element, or if there is no more content in the parent element.
55908 // A colgroup element's end tag may be ommitted if a thead, tfoot, tbody, or tr element is started.
55909 // A caption element's end tag may be ommitted if a colgroup, thead, tfoot, tbody, or tr element is started.
55910 result = result || this._tag_stack.try_pop('caption', ['table']);
55911 result = result || this._tag_stack.try_pop('colgroup', ['table']);
55912 result = result || this._tag_stack.try_pop('tr', ['table', 'thead', 'tbody', 'tfoot']);
55914 } else if (parser_token.tag_name === 'th' || parser_token.tag_name === 'td') {
55915 // A td element’s end tag may be omitted if the td element is immediately followed by a td or th element, or if there is no more content in the parent element.
55916 // A th element’s end tag may be omitted if the th element is immediately followed by a td or th element, or if there is no more content in the parent element.
55917 result = result || this._tag_stack.try_pop('td', ['table', 'thead', 'tbody', 'tfoot', 'tr']);
55918 result = result || this._tag_stack.try_pop('th', ['table', 'thead', 'tbody', 'tfoot', 'tr']);
55921 // Start element omission not handled currently
55922 // A head element’s start tag may be omitted if the element is empty, or if the first thing inside the head element is an element.
55923 // A tbody element’s start tag may be omitted if the first thing inside the tbody element is a tr element, and if the element is not immediately preceded by a tbody, thead, or tfoot element whose end tag has been omitted. (It can’t be omitted if the element is empty.)
55924 // A colgroup element’s start tag may be omitted if the first thing inside the colgroup element is a col element, and if the element is not immediately preceded by another colgroup element whose end tag has been omitted. (It can’t be omitted if the element is empty.)
55926 // Fix up the parent of the parser token
55927 parser_token.parent = this._tag_stack.get_parser_token();
55932 module.exports.Beautifier = Beautifier;
55937 /***/ (function(module, exports, __nested_webpack_require_93162__) {
55940 /*jshint node:true */
55943 The MIT License (MIT)
55945 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
55947 Permission is hereby granted, free of charge, to any person
55948 obtaining a copy of this software and associated documentation files
55949 (the "Software"), to deal in the Software without restriction,
55950 including without limitation the rights to use, copy, modify, merge,
55951 publish, distribute, sublicense, and/or sell copies of the Software,
55952 and to permit persons to whom the Software is furnished to do so,
55953 subject to the following conditions:
55955 The above copyright notice and this permission notice shall be
55956 included in all copies or substantial portions of the Software.
55958 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
55959 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
55960 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55961 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
55962 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
55963 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
55964 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55970 var BaseOptions = __nested_webpack_require_93162__(6).Options;
55972 function Options(options) {
55973 BaseOptions.call(this, options, 'html');
55974 if (this.templating.length === 1 && this.templating[0] === 'auto') {
55975 this.templating = ['django', 'erb', 'handlebars', 'php'];
55978 this.indent_inner_html = this._get_boolean('indent_inner_html');
55979 this.indent_body_inner_html = this._get_boolean('indent_body_inner_html', true);
55980 this.indent_head_inner_html = this._get_boolean('indent_head_inner_html', true);
55982 this.indent_handlebars = this._get_boolean('indent_handlebars', true);
55983 this.wrap_attributes = this._get_selection('wrap_attributes',
55984 ['auto', 'force', 'force-aligned', 'force-expand-multiline', 'aligned-multiple', 'preserve', 'preserve-aligned']);
55985 this.wrap_attributes_indent_size = this._get_number('wrap_attributes_indent_size', this.indent_size);
55986 this.extra_liners = this._get_array('extra_liners', ['head', 'body', '/html']);
55988 // Block vs inline elements
55989 // https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
55990 // https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
55991 // https://www.w3.org/TR/html5/dom.html#phrasing-content
55992 this.inline = this._get_array('inline', [
55993 'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite',
55994 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'embed', 'i', 'iframe', 'img',
55995 'input', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'math', 'meter', 'noscript',
55996 'object', 'output', 'progress', 'q', 'ruby', 's', 'samp', /* 'script', */ 'select', 'small',
55997 'span', 'strong', 'sub', 'sup', 'svg', 'template', 'textarea', 'time', 'u', 'var',
55998 'video', 'wbr', 'text',
55999 // obsolete inline tags
56000 'acronym', 'big', 'strike', 'tt'
56002 this.void_elements = this._get_array('void_elements', [
56003 // HTLM void elements - aka self-closing tags - aka singletons
56004 // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
56005 'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen',
56006 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',
56007 // NOTE: Optional tags are too complex for a simple list
56008 // they are hard coded in _do_optional_end_element
56010 // Doctype and xml elements
56011 '!doctype', '?xml',
56014 // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
56015 // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
56016 'basefont', 'isindex'
56018 this.unformatted = this._get_array('unformatted', []);
56019 this.content_unformatted = this._get_array('content_unformatted', [
56022 this.unformatted_content_delimiter = this._get_characters('unformatted_content_delimiter');
56023 this.indent_scripts = this._get_selection('indent_scripts', ['normal', 'keep', 'separate']);
56026 Options.prototype = new BaseOptions();
56030 module.exports.Options = Options;
56035 /***/ (function(module, exports, __nested_webpack_require_97356__) {
56038 /*jshint node:true */
56041 The MIT License (MIT)
56043 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
56045 Permission is hereby granted, free of charge, to any person
56046 obtaining a copy of this software and associated documentation files
56047 (the "Software"), to deal in the Software without restriction,
56048 including without limitation the rights to use, copy, modify, merge,
56049 publish, distribute, sublicense, and/or sell copies of the Software,
56050 and to permit persons to whom the Software is furnished to do so,
56051 subject to the following conditions:
56053 The above copyright notice and this permission notice shall be
56054 included in all copies or substantial portions of the Software.
56056 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56057 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56058 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56059 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
56060 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56061 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56062 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56068 var BaseTokenizer = __nested_webpack_require_97356__(9).Tokenizer;
56069 var BASETOKEN = __nested_webpack_require_97356__(9).TOKEN;
56070 var Directives = __nested_webpack_require_97356__(13).Directives;
56071 var TemplatablePattern = __nested_webpack_require_97356__(14).TemplatablePattern;
56072 var Pattern = __nested_webpack_require_97356__(12).Pattern;
56075 TAG_OPEN: 'TK_TAG_OPEN',
56076 TAG_CLOSE: 'TK_TAG_CLOSE',
56077 ATTRIBUTE: 'TK_ATTRIBUTE',
56078 EQUALS: 'TK_EQUALS',
56080 COMMENT: 'TK_COMMENT',
56082 UNKNOWN: 'TK_UNKNOWN',
56083 START: BASETOKEN.START,
56084 RAW: BASETOKEN.RAW,
56088 var directives_core = new Directives(/<\!--/, /-->/);
56090 var Tokenizer = function(input_string, options) {
56091 BaseTokenizer.call(this, input_string, options);
56092 this._current_tag_name = '';
56094 // Words end at whitespace or when a tag starts
56095 // if we are indenting handlebars, they are considered tags
56096 var templatable_reader = new TemplatablePattern(this._input).read_options(this._options);
56097 var pattern_reader = new Pattern(this._input);
56099 this.__patterns = {
56100 word: templatable_reader.until(/[\n\r\t <]/),
56101 single_quote: templatable_reader.until_after(/'/),
56102 double_quote: templatable_reader.until_after(/"/),
56103 attribute: templatable_reader.until(/[\n\r\t =>]|\/>/),
56104 element_name: templatable_reader.until(/[\n\r\t >\/]/),
56106 handlebars_comment: pattern_reader.starting_with(/{{!--/).until_after(/--}}/),
56107 handlebars: pattern_reader.starting_with(/{{/).until_after(/}}/),
56108 handlebars_open: pattern_reader.until(/[\n\r\t }]/),
56109 handlebars_raw_close: pattern_reader.until(/}}/),
56110 comment: pattern_reader.starting_with(/<!--/).until_after(/-->/),
56111 cdata: pattern_reader.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
56112 // https://en.wikipedia.org/wiki/Conditional_comment
56113 conditional_comment: pattern_reader.starting_with(/<!\[/).until_after(/]>/),
56114 processing: pattern_reader.starting_with(/<\?/).until_after(/\?>/)
56117 if (this._options.indent_handlebars) {
56118 this.__patterns.word = this.__patterns.word.exclude('handlebars');
56121 this._unformatted_content_delimiter = null;
56123 if (this._options.unformatted_content_delimiter) {
56124 var literal_regexp = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
56125 this.__patterns.unformatted_content_delimiter =
56126 pattern_reader.matching(literal_regexp)
56127 .until_after(literal_regexp);
56130 Tokenizer.prototype = new BaseTokenizer();
56132 Tokenizer.prototype._is_comment = function(current_token) { // jshint unused:false
56133 return false; //current_token.type === TOKEN.COMMENT || current_token.type === TOKEN.UNKNOWN;
56136 Tokenizer.prototype._is_opening = function(current_token) {
56137 return current_token.type === TOKEN.TAG_OPEN;
56140 Tokenizer.prototype._is_closing = function(current_token, open_token) {
56141 return current_token.type === TOKEN.TAG_CLOSE &&
56143 ((current_token.text === '>' || current_token.text === '/>') && open_token.text[0] === '<') ||
56144 (current_token.text === '}}' && open_token.text[0] === '{' && open_token.text[1] === '{')));
56147 Tokenizer.prototype._reset = function() {
56148 this._current_tag_name = '';
56151 Tokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false
56153 this._readWhitespace();
56154 var c = this._input.peek();
56157 return this._create_token(TOKEN.EOF, '');
56160 token = token || this._read_open_handlebars(c, open_token);
56161 token = token || this._read_attribute(c, previous_token, open_token);
56162 token = token || this._read_close(c, open_token);
56163 token = token || this._read_raw_content(c, previous_token, open_token);
56164 token = token || this._read_content_word(c);
56165 token = token || this._read_comment_or_cdata(c);
56166 token = token || this._read_processing(c);
56167 token = token || this._read_open(c, open_token);
56168 token = token || this._create_token(TOKEN.UNKNOWN, this._input.next());
56173 Tokenizer.prototype._read_comment_or_cdata = function(c) { // jshint unused:false
56175 var resulting_string = null;
56176 var directives = null;
56179 var peek1 = this._input.peek(1);
56180 // We treat all comments as literals, even more than preformatted tags
56181 // we only look for the appropriate closing marker
56182 if (peek1 === '!') {
56183 resulting_string = this.__patterns.comment.read();
56185 // only process directive on html comments
56186 if (resulting_string) {
56187 directives = directives_core.get_directives(resulting_string);
56188 if (directives && directives.ignore === 'start') {
56189 resulting_string += directives_core.readIgnored(this._input);
56192 resulting_string = this.__patterns.cdata.read();
56196 if (resulting_string) {
56197 token = this._create_token(TOKEN.COMMENT, resulting_string);
56198 token.directives = directives;
56205 Tokenizer.prototype._read_processing = function(c) { // jshint unused:false
56207 var resulting_string = null;
56208 var directives = null;
56211 var peek1 = this._input.peek(1);
56212 if (peek1 === '!' || peek1 === '?') {
56213 resulting_string = this.__patterns.conditional_comment.read();
56214 resulting_string = resulting_string || this.__patterns.processing.read();
56217 if (resulting_string) {
56218 token = this._create_token(TOKEN.COMMENT, resulting_string);
56219 token.directives = directives;
56226 Tokenizer.prototype._read_open = function(c, open_token) {
56227 var resulting_string = null;
56232 resulting_string = this._input.next();
56233 if (this._input.peek() === '/') {
56234 resulting_string += this._input.next();
56236 resulting_string += this.__patterns.element_name.read();
56237 token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
56243 Tokenizer.prototype._read_open_handlebars = function(c, open_token) {
56244 var resulting_string = null;
56247 if (this._options.indent_handlebars && c === '{' && this._input.peek(1) === '{') {
56248 if (this._input.peek(2) === '!') {
56249 resulting_string = this.__patterns.handlebars_comment.read();
56250 resulting_string = resulting_string || this.__patterns.handlebars.read();
56251 token = this._create_token(TOKEN.COMMENT, resulting_string);
56253 resulting_string = this.__patterns.handlebars_open.read();
56254 token = this._create_token(TOKEN.TAG_OPEN, resulting_string);
56262 Tokenizer.prototype._read_close = function(c, open_token) {
56263 var resulting_string = null;
56266 if (open_token.text[0] === '<' && (c === '>' || (c === '/' && this._input.peek(1) === '>'))) {
56267 resulting_string = this._input.next();
56268 if (c === '/') { // for close tag "/>"
56269 resulting_string += this._input.next();
56271 token = this._create_token(TOKEN.TAG_CLOSE, resulting_string);
56272 } else if (open_token.text[0] === '{' && c === '}' && this._input.peek(1) === '}') {
56273 this._input.next();
56274 this._input.next();
56275 token = this._create_token(TOKEN.TAG_CLOSE, '}}');
56282 Tokenizer.prototype._read_attribute = function(c, previous_token, open_token) {
56284 var resulting_string = '';
56285 if (open_token && open_token.text[0] === '<') {
56288 token = this._create_token(TOKEN.EQUALS, this._input.next());
56289 } else if (c === '"' || c === "'") {
56290 var content = this._input.next();
56292 content += this.__patterns.double_quote.read();
56294 content += this.__patterns.single_quote.read();
56296 token = this._create_token(TOKEN.VALUE, content);
56298 resulting_string = this.__patterns.attribute.read();
56300 if (resulting_string) {
56301 if (previous_token.type === TOKEN.EQUALS) {
56302 token = this._create_token(TOKEN.VALUE, resulting_string);
56304 token = this._create_token(TOKEN.ATTRIBUTE, resulting_string);
56312 Tokenizer.prototype._is_content_unformatted = function(tag_name) {
56313 // void_elements have no content and so cannot have unformatted content
56314 // script and style tags should always be read as unformatted content
56315 // finally content_unformatted and unformatted element contents are unformatted
56316 return this._options.void_elements.indexOf(tag_name) === -1 &&
56317 (this._options.content_unformatted.indexOf(tag_name) !== -1 ||
56318 this._options.unformatted.indexOf(tag_name) !== -1);
56322 Tokenizer.prototype._read_raw_content = function(c, previous_token, open_token) { // jshint unused:false
56323 var resulting_string = '';
56324 if (open_token && open_token.text[0] === '{') {
56325 resulting_string = this.__patterns.handlebars_raw_close.read();
56326 } else if (previous_token.type === TOKEN.TAG_CLOSE &&
56327 previous_token.opened.text[0] === '<' && previous_token.text[0] !== '/') {
56328 // ^^ empty tag has no content
56329 var tag_name = previous_token.opened.text.substr(1).toLowerCase();
56330 if (tag_name === 'script' || tag_name === 'style') {
56331 // Script and style tags are allowed to have comments wrapping their content
56332 // or just have regular content.
56333 var token = this._read_comment_or_cdata(c);
56335 token.type = TOKEN.TEXT;
56338 resulting_string = this._input.readUntil(new RegExp('</' + tag_name + '[\\n\\r\\t ]*?>', 'ig'));
56339 } else if (this._is_content_unformatted(tag_name)) {
56341 resulting_string = this._input.readUntil(new RegExp('</' + tag_name + '[\\n\\r\\t ]*?>', 'ig'));
56345 if (resulting_string) {
56346 return this._create_token(TOKEN.TEXT, resulting_string);
56352 Tokenizer.prototype._read_content_word = function(c) {
56353 var resulting_string = '';
56354 if (this._options.unformatted_content_delimiter) {
56355 if (c === this._options.unformatted_content_delimiter[0]) {
56356 resulting_string = this.__patterns.unformatted_content_delimiter.read();
56360 if (!resulting_string) {
56361 resulting_string = this.__patterns.word.read();
56363 if (resulting_string) {
56364 return this._create_token(TOKEN.TEXT, resulting_string);
56368 module.exports.Tokenizer = Tokenizer;
56369 module.exports.TOKEN = TOKEN;
56375 function html_beautify(html_source, options) {
56376 return legacy_beautify_html(html_source, options, _beautify__WEBPACK_IMPORTED_MODULE_0__.js_beautify, _beautify_css__WEBPACK_IMPORTED_MODULE_1__.css_beautify);
56381 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
56383 __webpack_require__.r(__webpack_exports__);
56384 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
56385 /* harmony export */ "js_beautify": () => /* binding */ js_beautify
56386 /* harmony export */ });
56387 /*---------------------------------------------------------------------------------------------
56388 * Copyright (c) Microsoft Corporation. All rights reserved.
56389 * Licensed under the MIT License. See License.txt in the project root for license information.
56390 *--------------------------------------------------------------------------------------------*/
56392 * Mock for the JS formatter. Ignore formatting of JS content in HTML.
56394 function js_beautify(js_source_text, options) {
56396 return js_source_text;
56402 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
56404 __webpack_require__.r(__webpack_exports__);
56405 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
56406 /* harmony export */ "css_beautify": () => /* binding */ css_beautify
56407 /* harmony export */ });
56408 // copied from js-beautify/js/lib/beautify-css.js
56410 /* AUTO-GENERATED. DO NOT MODIFY. */
56413 The MIT License (MIT)
56415 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
56417 Permission is hereby granted, free of charge, to any person
56418 obtaining a copy of this software and associated documentation files
56419 (the "Software"), to deal in the Software without restriction,
56420 including without limitation the rights to use, copy, modify, merge,
56421 publish, distribute, sublicense, and/or sell copies of the Software,
56422 and to permit persons to whom the Software is furnished to do so,
56423 subject to the following conditions:
56425 The above copyright notice and this permission notice shall be
56426 included in all copies or substantial portions of the Software.
56428 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56429 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56430 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56431 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
56432 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56433 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56434 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56441 Written by Harutyun Amirjanyan, (amirjanyan@gmail.com)
56443 Based on code initially developed by: Einar Lielmanis, <einar@beautifier.io>
56444 https://beautifier.io/
56447 css_beautify(source_text);
56448 css_beautify(source_text, options);
56450 The options are (default in brackets):
56451 indent_size (4) — indentation size,
56452 indent_char (space) — character to indent with,
56453 selector_separator_newline (true) - separate selectors with newline or
56454 not (e.g. "a,\nbr" or "a, br")
56455 end_with_newline (false) - end with a newline
56456 newline_between_rules (true) - add a new line after every css rule
56457 space_around_selector_separator (false) - ensure space around selector separators:
56458 '>', '+', '~' (e.g. "a>b" -> "a > b")
56461 css_beautify(css_source_text, {
56463 'indent_char': '\t',
56464 'selector_separator': ' ',
56465 'end_with_newline': false,
56466 'newline_between_rules': true,
56467 'space_around_selector_separator': true
56471 // http://www.w3.org/TR/CSS21/syndata.html#tokenization
56472 // http://www.w3.org/TR/css3-syntax/
56474 var legacy_beautify_css =
56475 /******/ (function(modules) { // webpackBootstrap
56476 /******/ // The module cache
56477 /******/ var installedModules = {};
56479 /******/ // The require function
56480 /******/ function __nested_webpack_require_2800__(moduleId) {
56482 /******/ // Check if module is in cache
56483 /******/ if(installedModules[moduleId]) {
56484 /******/ return installedModules[moduleId].exports;
56486 /******/ // Create a new module (and put it into the cache)
56487 /******/ var module = installedModules[moduleId] = {
56488 /******/ i: moduleId,
56490 /******/ exports: {}
56493 /******/ // Execute the module function
56494 /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_2800__);
56496 /******/ // Flag the module as loaded
56497 /******/ module.l = true;
56499 /******/ // Return the exports of the module
56500 /******/ return module.exports;
56504 /******/ // expose the modules object (__webpack_modules__)
56505 /******/ __nested_webpack_require_2800__.m = modules;
56507 /******/ // expose the module cache
56508 /******/ __nested_webpack_require_2800__.c = installedModules;
56510 /******/ // define getter function for harmony exports
56511 /******/ __nested_webpack_require_2800__.d = function(exports, name, getter) {
56512 /******/ if(!__nested_webpack_require_2800__.o(exports, name)) {
56513 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
56517 /******/ // define __esModule on exports
56518 /******/ __nested_webpack_require_2800__.r = function(exports) {
56519 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56520 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
56522 /******/ Object.defineProperty(exports, '__esModule', { value: true });
56525 /******/ // create a fake namespace object
56526 /******/ // mode & 1: value is a module id, require it
56527 /******/ // mode & 2: merge all properties of value into the ns
56528 /******/ // mode & 4: return value when already ns object
56529 /******/ // mode & 8|1: behave like require
56530 /******/ __nested_webpack_require_2800__.t = function(value, mode) {
56531 /******/ if(mode & 1) value = __nested_webpack_require_2800__(value);
56532 /******/ if(mode & 8) return value;
56533 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
56534 /******/ var ns = Object.create(null);
56535 /******/ __nested_webpack_require_2800__.r(ns);
56536 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
56537 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_2800__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
56538 /******/ return ns;
56541 /******/ // getDefaultExport function for compatibility with non-harmony modules
56542 /******/ __nested_webpack_require_2800__.n = function(module) {
56543 /******/ var getter = module && module.__esModule ?
56544 /******/ function getDefault() { return module['default']; } :
56545 /******/ function getModuleExports() { return module; };
56546 /******/ __nested_webpack_require_2800__.d(getter, 'a', getter);
56547 /******/ return getter;
56550 /******/ // Object.prototype.hasOwnProperty.call
56551 /******/ __nested_webpack_require_2800__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
56553 /******/ // __webpack_public_path__
56554 /******/ __nested_webpack_require_2800__.p = "";
56557 /******/ // Load entry module and return exports
56558 /******/ return __nested_webpack_require_2800__(__nested_webpack_require_2800__.s = 15);
56560 /************************************************************************/
56565 /***/ (function(module, exports, __nested_webpack_require_6283__) {
56568 /*jshint node:true */
56570 The MIT License (MIT)
56572 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
56574 Permission is hereby granted, free of charge, to any person
56575 obtaining a copy of this software and associated documentation files
56576 (the "Software"), to deal in the Software without restriction,
56577 including without limitation the rights to use, copy, modify, merge,
56578 publish, distribute, sublicense, and/or sell copies of the Software,
56579 and to permit persons to whom the Software is furnished to do so,
56580 subject to the following conditions:
56582 The above copyright notice and this permission notice shall be
56583 included in all copies or substantial portions of the Software.
56585 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56586 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56587 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
56588 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
56589 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
56590 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
56591 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56597 function OutputLine(parent) {
56598 this.__parent = parent;
56599 this.__character_count = 0;
56600 // use indent_count as a marker for this.__lines that have preserved indentation
56601 this.__indent_count = -1;
56602 this.__alignment_count = 0;
56603 this.__wrap_point_index = 0;
56604 this.__wrap_point_character_count = 0;
56605 this.__wrap_point_indent_count = -1;
56606 this.__wrap_point_alignment_count = 0;
56611 OutputLine.prototype.clone_empty = function() {
56612 var line = new OutputLine(this.__parent);
56613 line.set_indent(this.__indent_count, this.__alignment_count);
56617 OutputLine.prototype.item = function(index) {
56619 return this.__items[this.__items.length + index];
56621 return this.__items[index];
56625 OutputLine.prototype.has_match = function(pattern) {
56626 for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {
56627 if (this.__items[lastCheckedOutput].match(pattern)) {
56634 OutputLine.prototype.set_indent = function(indent, alignment) {
56635 if (this.is_empty()) {
56636 this.__indent_count = indent || 0;
56637 this.__alignment_count = alignment || 0;
56638 this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);
56642 OutputLine.prototype._set_wrap_point = function() {
56643 if (this.__parent.wrap_line_length) {
56644 this.__wrap_point_index = this.__items.length;
56645 this.__wrap_point_character_count = this.__character_count;
56646 this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;
56647 this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;
56651 OutputLine.prototype._should_wrap = function() {
56652 return this.__wrap_point_index &&
56653 this.__character_count > this.__parent.wrap_line_length &&
56654 this.__wrap_point_character_count > this.__parent.next_line.__character_count;
56657 OutputLine.prototype._allow_wrap = function() {
56658 if (this._should_wrap()) {
56659 this.__parent.add_new_line();
56660 var next = this.__parent.current_line;
56661 next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);
56662 next.__items = this.__items.slice(this.__wrap_point_index);
56663 this.__items = this.__items.slice(0, this.__wrap_point_index);
56665 next.__character_count += this.__character_count - this.__wrap_point_character_count;
56666 this.__character_count = this.__wrap_point_character_count;
56668 if (next.__items[0] === " ") {
56669 next.__items.splice(0, 1);
56670 next.__character_count -= 1;
56677 OutputLine.prototype.is_empty = function() {
56678 return this.__items.length === 0;
56681 OutputLine.prototype.last = function() {
56682 if (!this.is_empty()) {
56683 return this.__items[this.__items.length - 1];
56689 OutputLine.prototype.push = function(item) {
56690 this.__items.push(item);
56691 var last_newline_index = item.lastIndexOf('\n');
56692 if (last_newline_index !== -1) {
56693 this.__character_count = item.length - last_newline_index;
56695 this.__character_count += item.length;
56699 OutputLine.prototype.pop = function() {
56701 if (!this.is_empty()) {
56702 item = this.__items.pop();
56703 this.__character_count -= item.length;
56709 OutputLine.prototype._remove_indent = function() {
56710 if (this.__indent_count > 0) {
56711 this.__indent_count -= 1;
56712 this.__character_count -= this.__parent.indent_size;
56716 OutputLine.prototype._remove_wrap_indent = function() {
56717 if (this.__wrap_point_indent_count > 0) {
56718 this.__wrap_point_indent_count -= 1;
56721 OutputLine.prototype.trim = function() {
56722 while (this.last() === ' ') {
56723 this.__items.pop();
56724 this.__character_count -= 1;
56728 OutputLine.prototype.toString = function() {
56730 if (this.is_empty()) {
56731 if (this.__parent.indent_empty_lines) {
56732 result = this.__parent.get_indent_string(this.__indent_count);
56735 result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);
56736 result += this.__items.join('');
56741 function IndentStringCache(options, baseIndentString) {
56742 this.__cache = [''];
56743 this.__indent_size = options.indent_size;
56744 this.__indent_string = options.indent_char;
56745 if (!options.indent_with_tabs) {
56746 this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);
56749 // Set to null to continue support for auto detection of base indent
56750 baseIndentString = baseIndentString || '';
56751 if (options.indent_level > 0) {
56752 baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);
56755 this.__base_string = baseIndentString;
56756 this.__base_string_length = baseIndentString.length;
56759 IndentStringCache.prototype.get_indent_size = function(indent, column) {
56760 var result = this.__base_string_length;
56761 column = column || 0;
56765 result += indent * this.__indent_size;
56770 IndentStringCache.prototype.get_indent_string = function(indent_level, column) {
56771 var result = this.__base_string;
56772 column = column || 0;
56773 if (indent_level < 0) {
56777 column += indent_level * this.__indent_size;
56778 this.__ensure_cache(column);
56779 result += this.__cache[column];
56783 IndentStringCache.prototype.__ensure_cache = function(column) {
56784 while (column >= this.__cache.length) {
56785 this.__add_column();
56789 IndentStringCache.prototype.__add_column = function() {
56790 var column = this.__cache.length;
56793 if (this.__indent_size && column >= this.__indent_size) {
56794 indent = Math.floor(column / this.__indent_size);
56795 column -= indent * this.__indent_size;
56796 result = new Array(indent + 1).join(this.__indent_string);
56799 result += new Array(column + 1).join(' ');
56802 this.__cache.push(result);
56805 function Output(options, baseIndentString) {
56806 this.__indent_cache = new IndentStringCache(options, baseIndentString);
56808 this._end_with_newline = options.end_with_newline;
56809 this.indent_size = options.indent_size;
56810 this.wrap_line_length = options.wrap_line_length;
56811 this.indent_empty_lines = options.indent_empty_lines;
56813 this.previous_line = null;
56814 this.current_line = null;
56815 this.next_line = new OutputLine(this);
56816 this.space_before_token = false;
56817 this.non_breaking_space = false;
56818 this.previous_token_wrapped = false;
56820 this.__add_outputline();
56823 Output.prototype.__add_outputline = function() {
56824 this.previous_line = this.current_line;
56825 this.current_line = this.next_line.clone_empty();
56826 this.__lines.push(this.current_line);
56829 Output.prototype.get_line_number = function() {
56830 return this.__lines.length;
56833 Output.prototype.get_indent_string = function(indent, column) {
56834 return this.__indent_cache.get_indent_string(indent, column);
56837 Output.prototype.get_indent_size = function(indent, column) {
56838 return this.__indent_cache.get_indent_size(indent, column);
56841 Output.prototype.is_empty = function() {
56842 return !this.previous_line && this.current_line.is_empty();
56845 Output.prototype.add_new_line = function(force_newline) {
56846 // never newline at the start of file
56847 // otherwise, newline only if we didn't just add one or we're forced
56848 if (this.is_empty() ||
56849 (!force_newline && this.just_added_newline())) {
56853 // if raw output is enabled, don't print additional newlines,
56854 // but still return True as though you had
56856 this.__add_outputline();
56861 Output.prototype.get_code = function(eol) {
56864 // handle some edge cases where the last tokens
56865 // has text that ends with newline(s)
56866 var last_item = this.current_line.pop();
56868 if (last_item[last_item.length - 1] === '\n') {
56869 last_item = last_item.replace(/\n+$/g, '');
56871 this.current_line.push(last_item);
56874 if (this._end_with_newline) {
56875 this.__add_outputline();
56878 var sweet_code = this.__lines.join('\n');
56880 if (eol !== '\n') {
56881 sweet_code = sweet_code.replace(/[\n]/g, eol);
56886 Output.prototype.set_wrap_point = function() {
56887 this.current_line._set_wrap_point();
56890 Output.prototype.set_indent = function(indent, alignment) {
56891 indent = indent || 0;
56892 alignment = alignment || 0;
56894 // Next line stores alignment values
56895 this.next_line.set_indent(indent, alignment);
56897 // Never indent your first output indent at the start of the file
56898 if (this.__lines.length > 1) {
56899 this.current_line.set_indent(indent, alignment);
56903 this.current_line.set_indent();
56907 Output.prototype.add_raw_token = function(token) {
56908 for (var x = 0; x < token.newlines; x++) {
56909 this.__add_outputline();
56911 this.current_line.set_indent(-1);
56912 this.current_line.push(token.whitespace_before);
56913 this.current_line.push(token.text);
56914 this.space_before_token = false;
56915 this.non_breaking_space = false;
56916 this.previous_token_wrapped = false;
56919 Output.prototype.add_token = function(printable_token) {
56920 this.__add_space_before_token();
56921 this.current_line.push(printable_token);
56922 this.space_before_token = false;
56923 this.non_breaking_space = false;
56924 this.previous_token_wrapped = this.current_line._allow_wrap();
56927 Output.prototype.__add_space_before_token = function() {
56928 if (this.space_before_token && !this.just_added_newline()) {
56929 if (!this.non_breaking_space) {
56930 this.set_wrap_point();
56932 this.current_line.push(' ');
56936 Output.prototype.remove_indent = function(index) {
56937 var output_length = this.__lines.length;
56938 while (index < output_length) {
56939 this.__lines[index]._remove_indent();
56942 this.current_line._remove_wrap_indent();
56945 Output.prototype.trim = function(eat_newlines) {
56946 eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;
56948 this.current_line.trim();
56950 while (eat_newlines && this.__lines.length > 1 &&
56951 this.current_line.is_empty()) {
56952 this.__lines.pop();
56953 this.current_line = this.__lines[this.__lines.length - 1];
56954 this.current_line.trim();
56957 this.previous_line = this.__lines.length > 1 ?
56958 this.__lines[this.__lines.length - 2] : null;
56961 Output.prototype.just_added_newline = function() {
56962 return this.current_line.is_empty();
56965 Output.prototype.just_added_blankline = function() {
56966 return this.is_empty() ||
56967 (this.current_line.is_empty() && this.previous_line.is_empty());
56970 Output.prototype.ensure_empty_line_above = function(starts_with, ends_with) {
56971 var index = this.__lines.length - 2;
56972 while (index >= 0) {
56973 var potentialEmptyLine = this.__lines[index];
56974 if (potentialEmptyLine.is_empty()) {
56976 } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&
56977 potentialEmptyLine.item(-1) !== ends_with) {
56978 this.__lines.splice(index + 1, 0, new OutputLine(this));
56979 this.previous_line = this.__lines[this.__lines.length - 2];
56986 module.exports.Output = Output;
56994 /***/ (function(module, exports, __nested_webpack_require_18743__) {
56997 /*jshint node:true */
57000 The MIT License (MIT)
57002 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
57004 Permission is hereby granted, free of charge, to any person
57005 obtaining a copy of this software and associated documentation files
57006 (the "Software"), to deal in the Software without restriction,
57007 including without limitation the rights to use, copy, modify, merge,
57008 publish, distribute, sublicense, and/or sell copies of the Software,
57009 and to permit persons to whom the Software is furnished to do so,
57010 subject to the following conditions:
57012 The above copyright notice and this permission notice shall be
57013 included in all copies or substantial portions of the Software.
57015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
57016 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
57018 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
57019 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
57020 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
57021 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
57027 function Options(options, merge_child_field) {
57028 this.raw_options = _mergeOpts(options, merge_child_field);
57030 // Support passing the source text back with no change
57031 this.disabled = this._get_boolean('disabled');
57033 this.eol = this._get_characters('eol', 'auto');
57034 this.end_with_newline = this._get_boolean('end_with_newline');
57035 this.indent_size = this._get_number('indent_size', 4);
57036 this.indent_char = this._get_characters('indent_char', ' ');
57037 this.indent_level = this._get_number('indent_level');
57039 this.preserve_newlines = this._get_boolean('preserve_newlines', true);
57040 this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);
57041 if (!this.preserve_newlines) {
57042 this.max_preserve_newlines = 0;
57045 this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\t');
57046 if (this.indent_with_tabs) {
57047 this.indent_char = '\t';
57049 // indent_size behavior changed after 1.8.6
57050 // It used to be that indent_size would be
57051 // set to 1 for indent_with_tabs. That is no longer needed and
57052 // actually doesn't make sense - why not use spaces? Further,
57053 // that might produce unexpected behavior - tabs being used
57054 // for single-column alignment. So, when indent_with_tabs is true
57055 // and indent_size is 1, reset indent_size to 4.
57056 if (this.indent_size === 1) {
57057 this.indent_size = 4;
57061 // Backwards compat with 1.3.x
57062 this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));
57064 this.indent_empty_lines = this._get_boolean('indent_empty_lines');
57066 // valid templating languages ['django', 'erb', 'handlebars', 'php']
57067 // For now, 'auto' = all off for javascript, all on for html (and inline javascript).
57068 // other values ignored
57069 this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']);
57072 Options.prototype._get_array = function(name, default_value) {
57073 var option_value = this.raw_options[name];
57074 var result = default_value || [];
57075 if (typeof option_value === 'object') {
57076 if (option_value !== null && typeof option_value.concat === 'function') {
57077 result = option_value.concat();
57079 } else if (typeof option_value === 'string') {
57080 result = option_value.split(/[^a-zA-Z0-9_\/\-]+/);
57085 Options.prototype._get_boolean = function(name, default_value) {
57086 var option_value = this.raw_options[name];
57087 var result = option_value === undefined ? !!default_value : !!option_value;
57091 Options.prototype._get_characters = function(name, default_value) {
57092 var option_value = this.raw_options[name];
57093 var result = default_value || '';
57094 if (typeof option_value === 'string') {
57095 result = option_value.replace(/\\r/, '\r').replace(/\\n/, '\n').replace(/\\t/, '\t');
57100 Options.prototype._get_number = function(name, default_value) {
57101 var option_value = this.raw_options[name];
57102 default_value = parseInt(default_value, 10);
57103 if (isNaN(default_value)) {
57106 var result = parseInt(option_value, 10);
57107 if (isNaN(result)) {
57108 result = default_value;
57113 Options.prototype._get_selection = function(name, selection_list, default_value) {
57114 var result = this._get_selection_list(name, selection_list, default_value);
57115 if (result.length !== 1) {
57117 "Invalid Option Value: The option '" + name + "' can only be one of the following values:\n" +
57118 selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
57125 Options.prototype._get_selection_list = function(name, selection_list, default_value) {
57126 if (!selection_list || selection_list.length === 0) {
57127 throw new Error("Selection list cannot be empty.");
57130 default_value = default_value || [selection_list[0]];
57131 if (!this._is_valid_selection(default_value, selection_list)) {
57132 throw new Error("Invalid Default Value!");
57135 var result = this._get_array(name, default_value);
57136 if (!this._is_valid_selection(result, selection_list)) {
57138 "Invalid Option Value: The option '" + name + "' can contain only the following values:\n" +
57139 selection_list + "\nYou passed in: '" + this.raw_options[name] + "'");
57145 Options.prototype._is_valid_selection = function(result, selection_list) {
57146 return result.length && selection_list.length &&
57147 !result.some(function(item) { return selection_list.indexOf(item) === -1; });
57151 // merges child options up with the parent options object
57152 // Example: obj = {a: 1, b: {a: 2}}
57153 // mergeOpts(obj, 'b')
57156 function _mergeOpts(allOptions, childFieldName) {
57157 var finalOpts = {};
57158 allOptions = _normalizeOpts(allOptions);
57161 for (name in allOptions) {
57162 if (name !== childFieldName) {
57163 finalOpts[name] = allOptions[name];
57167 //merge in the per type settings for the childFieldName
57168 if (childFieldName && allOptions[childFieldName]) {
57169 for (name in allOptions[childFieldName]) {
57170 finalOpts[name] = allOptions[childFieldName][name];
57176 function _normalizeOpts(options) {
57177 var convertedOpts = {};
57180 for (key in options) {
57181 var newKey = key.replace(/-/g, "_");
57182 convertedOpts[newKey] = options[key];
57184 return convertedOpts;
57187 module.exports.Options = Options;
57188 module.exports.normalizeOpts = _normalizeOpts;
57189 module.exports.mergeOpts = _mergeOpts;
57195 /***/ (function(module, exports, __nested_webpack_require_25535__) {
57198 /*jshint node:true */
57201 The MIT License (MIT)
57203 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
57205 Permission is hereby granted, free of charge, to any person
57206 obtaining a copy of this software and associated documentation files
57207 (the "Software"), to deal in the Software without restriction,
57208 including without limitation the rights to use, copy, modify, merge,
57209 publish, distribute, sublicense, and/or sell copies of the Software,
57210 and to permit persons to whom the Software is furnished to do so,
57211 subject to the following conditions:
57213 The above copyright notice and this permission notice shall be
57214 included in all copies or substantial portions of the Software.
57216 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
57217 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57218 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
57219 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
57220 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
57221 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
57222 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
57228 var regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');
57230 function InputScanner(input_string) {
57231 this.__input = input_string || '';
57232 this.__input_length = this.__input.length;
57233 this.__position = 0;
57236 InputScanner.prototype.restart = function() {
57237 this.__position = 0;
57240 InputScanner.prototype.back = function() {
57241 if (this.__position > 0) {
57242 this.__position -= 1;
57246 InputScanner.prototype.hasNext = function() {
57247 return this.__position < this.__input_length;
57250 InputScanner.prototype.next = function() {
57252 if (this.hasNext()) {
57253 val = this.__input.charAt(this.__position);
57254 this.__position += 1;
57259 InputScanner.prototype.peek = function(index) {
57261 index = index || 0;
57262 index += this.__position;
57263 if (index >= 0 && index < this.__input_length) {
57264 val = this.__input.charAt(index);
57269 // This is a JavaScript only helper function (not in python)
57270 // Javascript doesn't have a match method
57271 // and not all implementation support "sticky" flag.
57272 // If they do not support sticky then both this.match() and this.test() method
57273 // must get the match and check the index of the match.
57274 // If sticky is supported and set, this method will use it.
57275 // Otherwise it will check that global is set, and fall back to the slower method.
57276 InputScanner.prototype.__match = function(pattern, index) {
57277 pattern.lastIndex = index;
57278 var pattern_match = pattern.exec(this.__input);
57280 if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {
57281 if (pattern_match.index !== index) {
57282 pattern_match = null;
57286 return pattern_match;
57289 InputScanner.prototype.test = function(pattern, index) {
57290 index = index || 0;
57291 index += this.__position;
57293 if (index >= 0 && index < this.__input_length) {
57294 return !!this.__match(pattern, index);
57300 InputScanner.prototype.testChar = function(pattern, index) {
57301 // test one character regex match
57302 var val = this.peek(index);
57303 pattern.lastIndex = 0;
57304 return val !== null && pattern.test(val);
57307 InputScanner.prototype.match = function(pattern) {
57308 var pattern_match = this.__match(pattern, this.__position);
57309 if (pattern_match) {
57310 this.__position += pattern_match[0].length;
57312 pattern_match = null;
57314 return pattern_match;
57317 InputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {
57320 if (starting_pattern) {
57321 match = this.match(starting_pattern);
57326 if (until_pattern && (match || !starting_pattern)) {
57327 val += this.readUntil(until_pattern, until_after);
57332 InputScanner.prototype.readUntil = function(pattern, until_after) {
57334 var match_index = this.__position;
57335 pattern.lastIndex = this.__position;
57336 var pattern_match = pattern.exec(this.__input);
57337 if (pattern_match) {
57338 match_index = pattern_match.index;
57340 match_index += pattern_match[0].length;
57343 match_index = this.__input_length;
57346 val = this.__input.substring(this.__position, match_index);
57347 this.__position = match_index;
57351 InputScanner.prototype.readUntilAfter = function(pattern) {
57352 return this.readUntil(pattern, true);
57355 InputScanner.prototype.get_regexp = function(pattern, match_from) {
57358 if (match_from && regexp_has_sticky) {
57361 // strings are converted to regexp
57362 if (typeof pattern === "string" && pattern !== '') {
57363 // result = new RegExp(pattern.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), flags);
57364 result = new RegExp(pattern, flags);
57365 } else if (pattern) {
57366 result = new RegExp(pattern.source, flags);
57371 InputScanner.prototype.get_literal_regexp = function(literal_string) {
57372 return RegExp(literal_string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'));
57375 /* css beautifier legacy helpers */
57376 InputScanner.prototype.peekUntilAfter = function(pattern) {
57377 var start = this.__position;
57378 var val = this.readUntilAfter(pattern);
57379 this.__position = start;
57383 InputScanner.prototype.lookBack = function(testVal) {
57384 var start = this.__position - 1;
57385 return start >= testVal.length && this.__input.substring(start - testVal.length, start)
57386 .toLowerCase() === testVal;
57389 module.exports.InputScanner = InputScanner;
57398 /***/ (function(module, exports, __nested_webpack_require_31287__) {
57401 /*jshint node:true */
57404 The MIT License (MIT)
57406 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
57408 Permission is hereby granted, free of charge, to any person
57409 obtaining a copy of this software and associated documentation files
57410 (the "Software"), to deal in the Software without restriction,
57411 including without limitation the rights to use, copy, modify, merge,
57412 publish, distribute, sublicense, and/or sell copies of the Software,
57413 and to permit persons to whom the Software is furnished to do so,
57414 subject to the following conditions:
57416 The above copyright notice and this permission notice shall be
57417 included in all copies or substantial portions of the Software.
57419 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
57420 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57421 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
57422 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
57423 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
57424 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
57425 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
57431 function Directives(start_block_pattern, end_block_pattern) {
57432 start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;
57433 end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;
57434 this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \w+[:]\w+)+ /.source + end_block_pattern, 'g');
57435 this.__directive_pattern = / (\w+)[:](\w+)/g;
57437 this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\sbeautify\signore:end\s/.source + end_block_pattern, 'g');
57440 Directives.prototype.get_directives = function(text) {
57441 if (!text.match(this.__directives_block_pattern)) {
57445 var directives = {};
57446 this.__directive_pattern.lastIndex = 0;
57447 var directive_match = this.__directive_pattern.exec(text);
57449 while (directive_match) {
57450 directives[directive_match[1]] = directive_match[2];
57451 directive_match = this.__directive_pattern.exec(text);
57457 Directives.prototype.readIgnored = function(input) {
57458 return input.readUntilAfter(this.__directives_end_ignore_pattern);
57462 module.exports.Directives = Directives;
57468 /***/ (function(module, exports, __nested_webpack_require_33779__) {
57471 /*jshint node:true */
57474 The MIT License (MIT)
57476 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
57478 Permission is hereby granted, free of charge, to any person
57479 obtaining a copy of this software and associated documentation files
57480 (the "Software"), to deal in the Software without restriction,
57481 including without limitation the rights to use, copy, modify, merge,
57482 publish, distribute, sublicense, and/or sell copies of the Software,
57483 and to permit persons to whom the Software is furnished to do so,
57484 subject to the following conditions:
57486 The above copyright notice and this permission notice shall be
57487 included in all copies or substantial portions of the Software.
57489 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
57490 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57491 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
57492 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
57493 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
57494 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
57495 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
57501 var Beautifier = __nested_webpack_require_33779__(16).Beautifier,
57502 Options = __nested_webpack_require_33779__(17).Options;
57504 function css_beautify(source_text, options) {
57505 var beautifier = new Beautifier(source_text, options);
57506 return beautifier.beautify();
57509 module.exports = css_beautify;
57510 module.exports.defaultOptions = function() {
57511 return new Options();
57517 /***/ (function(module, exports, __nested_webpack_require_35400__) {
57520 /*jshint node:true */
57523 The MIT License (MIT)
57525 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
57527 Permission is hereby granted, free of charge, to any person
57528 obtaining a copy of this software and associated documentation files
57529 (the "Software"), to deal in the Software without restriction,
57530 including without limitation the rights to use, copy, modify, merge,
57531 publish, distribute, sublicense, and/or sell copies of the Software,
57532 and to permit persons to whom the Software is furnished to do so,
57533 subject to the following conditions:
57535 The above copyright notice and this permission notice shall be
57536 included in all copies or substantial portions of the Software.
57538 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
57539 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57540 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
57541 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
57542 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
57543 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
57544 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
57550 var Options = __nested_webpack_require_35400__(17).Options;
57551 var Output = __nested_webpack_require_35400__(2).Output;
57552 var InputScanner = __nested_webpack_require_35400__(8).InputScanner;
57553 var Directives = __nested_webpack_require_35400__(13).Directives;
57555 var directives_core = new Directives(/\/\*/, /\*\//);
57557 var lineBreak = /\r\n|[\r\n]/;
57558 var allLineBreaks = /\r\n|[\r\n]/g;
57561 var whitespaceChar = /\s/;
57562 var whitespacePattern = /(?:\s|\n)+/g;
57563 var block_comment_pattern = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g;
57564 var comment_pattern = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
57566 function Beautifier(source_text, options) {
57567 this._source_text = source_text || '';
57568 // Allow the setting of language/file-type specific options
57569 // with inheritance of overall settings
57570 this._options = new Options(options);
57572 this._input = null;
57574 // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule
57575 this.NESTED_AT_RULE = {
57577 "@font-face": true,
57578 "@keyframes": true,
57579 // also in CONDITIONAL_GROUP_RULE below
57584 this.CONDITIONAL_GROUP_RULE = {
57592 Beautifier.prototype.eatString = function(endChars) {
57594 this._ch = this._input.next();
57596 result += this._ch;
57597 if (this._ch === "\\") {
57598 result += this._input.next();
57599 } else if (endChars.indexOf(this._ch) !== -1 || this._ch === "\n") {
57602 this._ch = this._input.next();
57607 // Skips any white space in the source text from the current position.
57608 // When allowAtLeastOneNewLine is true, will output new lines for each
57609 // newline character found; if the user has preserve_newlines off, only
57610 // the first newline will be output
57611 Beautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) {
57612 var result = whitespaceChar.test(this._input.peek());
57613 var isFirstNewLine = true;
57615 while (whitespaceChar.test(this._input.peek())) {
57616 this._ch = this._input.next();
57617 if (allowAtLeastOneNewLine && this._ch === '\n') {
57618 if (this._options.preserve_newlines || isFirstNewLine) {
57619 isFirstNewLine = false;
57620 this._output.add_new_line(true);
57627 // Nested pseudo-class if we are insideRule
57628 // and the next special character found opens
57630 Beautifier.prototype.foundNestedPseudoClass = function() {
57633 var ch = this._input.peek(i);
57637 } else if (ch === '(') {
57638 // pseudoclasses can contain ()
57640 } else if (ch === ')') {
57641 if (openParen === 0) {
57645 } else if (ch === ";" || ch === "}") {
57649 ch = this._input.peek(i);
57654 Beautifier.prototype.print_string = function(output_string) {
57655 this._output.set_indent(this._indentLevel);
57656 this._output.non_breaking_space = true;
57657 this._output.add_token(output_string);
57660 Beautifier.prototype.preserveSingleSpace = function(isAfterSpace) {
57661 if (isAfterSpace) {
57662 this._output.space_before_token = true;
57666 Beautifier.prototype.indent = function() {
57667 this._indentLevel++;
57670 Beautifier.prototype.outdent = function() {
57671 if (this._indentLevel > 0) {
57672 this._indentLevel--;
57676 /*_____________________--------------------_____________________*/
57678 Beautifier.prototype.beautify = function() {
57679 if (this._options.disabled) {
57680 return this._source_text;
57683 var source_text = this._source_text;
57684 var eol = this._options.eol;
57685 if (eol === 'auto') {
57687 if (source_text && lineBreak.test(source_text || '')) {
57688 eol = source_text.match(lineBreak)[0];
57693 // HACK: newline parsing inconsistent. This brute force normalizes the this._input.
57694 source_text = source_text.replace(allLineBreaks, '\n');
57697 var baseIndentString = source_text.match(/^[\t ]*/)[0];
57699 this._output = new Output(this._options, baseIndentString);
57700 this._input = new InputScanner(source_text);
57701 this._indentLevel = 0;
57702 this._nestedLevel = 0;
57705 var parenLevel = 0;
57707 var insideRule = false;
57708 // This is the value side of a property value pair (blue in the following ex)
57709 // label { content: blue }
57710 var insidePropertyValue = false;
57711 var enteringConditionalGroup = false;
57712 var insideAtExtend = false;
57713 var insideAtImport = false;
57714 var topCharacter = this._ch;
57720 whitespace = this._input.read(whitespacePattern);
57721 isAfterSpace = whitespace !== '';
57722 previous_ch = topCharacter;
57723 this._ch = this._input.next();
57724 if (this._ch === '\\' && this._input.hasNext()) {
57725 this._ch += this._input.next();
57727 topCharacter = this._ch;
57731 } else if (this._ch === '/' && this._input.peek() === '*') {
57732 // /* css comment */
57733 // Always start block comments on a new line.
57734 // This handles scenarios where a block comment immediately
57735 // follows a property definition on the same line or where
57736 // minified code is being beautified.
57737 this._output.add_new_line();
57738 this._input.back();
57740 var comment = this._input.read(block_comment_pattern);
57742 // Handle ignore directive
57743 var directives = directives_core.get_directives(comment);
57744 if (directives && directives.ignore === 'start') {
57745 comment += directives_core.readIgnored(this._input);
57748 this.print_string(comment);
57750 // Ensures any new lines following the comment are preserved
57751 this.eatWhitespace(true);
57753 // Block comments are followed by a new line so they don't
57754 // share a line with other properties
57755 this._output.add_new_line();
57756 } else if (this._ch === '/' && this._input.peek() === '/') {
57757 // // single line comment
57758 // Preserves the space before a comment
57759 // on the same line as a rule
57760 this._output.space_before_token = true;
57761 this._input.back();
57762 this.print_string(this._input.read(comment_pattern));
57764 // Ensures any new lines following the comment are preserved
57765 this.eatWhitespace(true);
57766 } else if (this._ch === '@') {
57767 this.preserveSingleSpace(isAfterSpace);
57769 // deal with less propery mixins @{...}
57770 if (this._input.peek() === '{') {
57771 this.print_string(this._ch + this.eatString('}'));
57773 this.print_string(this._ch);
57775 // strip trailing space, if present, for hash property checks
57776 var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
57778 if (variableOrRule.match(/[ :]$/)) {
57779 // we have a variable or pseudo-class, add it and insert one space before continuing
57780 variableOrRule = this.eatString(": ").replace(/\s$/, '');
57781 this.print_string(variableOrRule);
57782 this._output.space_before_token = true;
57785 variableOrRule = variableOrRule.replace(/\s$/, '');
57787 if (variableOrRule === 'extend') {
57788 insideAtExtend = true;
57789 } else if (variableOrRule === 'import') {
57790 insideAtImport = true;
57793 // might be a nesting at-rule
57794 if (variableOrRule in this.NESTED_AT_RULE) {
57795 this._nestedLevel += 1;
57796 if (variableOrRule in this.CONDITIONAL_GROUP_RULE) {
57797 enteringConditionalGroup = true;
57799 // might be less variable
57800 } else if (!insideRule && parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {
57801 insidePropertyValue = true;
57805 } else if (this._ch === '#' && this._input.peek() === '{') {
57806 this.preserveSingleSpace(isAfterSpace);
57807 this.print_string(this._ch + this.eatString('}'));
57808 } else if (this._ch === '{') {
57809 if (insidePropertyValue) {
57810 insidePropertyValue = false;
57814 // when entering conditional groups, only rulesets are allowed
57815 if (enteringConditionalGroup) {
57816 enteringConditionalGroup = false;
57817 insideRule = (this._indentLevel >= this._nestedLevel);
57819 // otherwise, declarations are also allowed
57820 insideRule = (this._indentLevel >= this._nestedLevel - 1);
57822 if (this._options.newline_between_rules && insideRule) {
57823 if (this._output.previous_line && this._output.previous_line.item(-1) !== '{') {
57824 this._output.ensure_empty_line_above('/', ',');
57828 this._output.space_before_token = true;
57830 // The difference in print_string and indent order is necessary to indent the '{' correctly
57831 if (this._options.brace_style === 'expand') {
57832 this._output.add_new_line();
57833 this.print_string(this._ch);
57835 this._output.set_indent(this._indentLevel);
57838 this.print_string(this._ch);
57841 this.eatWhitespace(true);
57842 this._output.add_new_line();
57843 } else if (this._ch === '}') {
57845 this._output.add_new_line();
57846 if (previous_ch === '{') {
57847 this._output.trim(true);
57849 insideAtImport = false;
57850 insideAtExtend = false;
57851 if (insidePropertyValue) {
57853 insidePropertyValue = false;
57855 this.print_string(this._ch);
57856 insideRule = false;
57857 if (this._nestedLevel) {
57858 this._nestedLevel--;
57861 this.eatWhitespace(true);
57862 this._output.add_new_line();
57864 if (this._options.newline_between_rules && !this._output.just_added_blankline()) {
57865 if (this._input.peek() !== '}') {
57866 this._output.add_new_line(true);
57869 } else if (this._ch === ":") {
57870 if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) {
57871 // 'property: value' delimiter
57872 // which could be in a conditional group query
57873 this.print_string(':');
57874 if (!insidePropertyValue) {
57875 insidePropertyValue = true;
57876 this._output.space_before_token = true;
57877 this.eatWhitespace(true);
57881 // sass/less parent reference don't use a space
57882 // sass nested pseudo-class don't use a space
57884 // preserve space before pseudoclasses/pseudoelements, as it means "in any child"
57885 if (this._input.lookBack(" ")) {
57886 this._output.space_before_token = true;
57888 if (this._input.peek() === ":") {
57890 this._ch = this._input.next();
57891 this.print_string("::");
57894 this.print_string(':');
57897 } else if (this._ch === '"' || this._ch === '\'') {
57898 this.preserveSingleSpace(isAfterSpace);
57899 this.print_string(this._ch + this.eatString(this._ch));
57900 this.eatWhitespace(true);
57901 } else if (this._ch === ';') {
57902 if (parenLevel === 0) {
57903 if (insidePropertyValue) {
57905 insidePropertyValue = false;
57907 insideAtExtend = false;
57908 insideAtImport = false;
57909 this.print_string(this._ch);
57910 this.eatWhitespace(true);
57912 // This maintains single line comments on the same
57913 // line. Block comments are also affected, but
57914 // a new line is always output before one inside
57916 if (this._input.peek() !== '/') {
57917 this._output.add_new_line();
57920 this.print_string(this._ch);
57921 this.eatWhitespace(true);
57922 this._output.space_before_token = true;
57924 } else if (this._ch === '(') { // may be a url
57925 if (this._input.lookBack("url")) {
57926 this.print_string(this._ch);
57927 this.eatWhitespace();
57930 this._ch = this._input.next();
57931 if (this._ch === ')' || this._ch === '"' || this._ch === '\'') {
57932 this._input.back();
57933 } else if (this._ch) {
57934 this.print_string(this._ch + this.eatString(')'));
57941 this.preserveSingleSpace(isAfterSpace);
57942 this.print_string(this._ch);
57943 this.eatWhitespace();
57947 } else if (this._ch === ')') {
57952 this.print_string(this._ch);
57953 } else if (this._ch === ',') {
57954 this.print_string(this._ch);
57955 this.eatWhitespace(true);
57956 if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) {
57957 this._output.add_new_line();
57959 this._output.space_before_token = true;
57961 } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) {
57962 //handle combinator spacing
57963 if (this._options.space_around_combinator) {
57964 this._output.space_before_token = true;
57965 this.print_string(this._ch);
57966 this._output.space_before_token = true;
57968 this.print_string(this._ch);
57969 this.eatWhitespace();
57970 // squash extra whitespace
57971 if (this._ch && whitespaceChar.test(this._ch)) {
57975 } else if (this._ch === ']') {
57976 this.print_string(this._ch);
57977 } else if (this._ch === '[') {
57978 this.preserveSingleSpace(isAfterSpace);
57979 this.print_string(this._ch);
57980 } else if (this._ch === '=') { // no whitespace before or after
57981 this.eatWhitespace();
57982 this.print_string('=');
57983 if (whitespaceChar.test(this._ch)) {
57986 } else if (this._ch === '!' && !this._input.lookBack("\\")) { // !important
57987 this.print_string(' ');
57988 this.print_string(this._ch);
57990 this.preserveSingleSpace(isAfterSpace);
57991 this.print_string(this._ch);
57995 var sweetCode = this._output.get_code(eol);
58000 module.exports.Beautifier = Beautifier;
58005 /***/ (function(module, exports, __nested_webpack_require_51026__) {
58008 /*jshint node:true */
58011 The MIT License (MIT)
58013 Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
58015 Permission is hereby granted, free of charge, to any person
58016 obtaining a copy of this software and associated documentation files
58017 (the "Software"), to deal in the Software without restriction,
58018 including without limitation the rights to use, copy, modify, merge,
58019 publish, distribute, sublicense, and/or sell copies of the Software,
58020 and to permit persons to whom the Software is furnished to do so,
58021 subject to the following conditions:
58023 The above copyright notice and this permission notice shall be
58024 included in all copies or substantial portions of the Software.
58026 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
58027 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
58028 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
58029 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
58030 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
58031 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
58032 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
58038 var BaseOptions = __nested_webpack_require_51026__(6).Options;
58040 function Options(options) {
58041 BaseOptions.call(this, options, 'css');
58043 this.selector_separator_newline = this._get_boolean('selector_separator_newline', true);
58044 this.newline_between_rules = this._get_boolean('newline_between_rules', true);
58045 var space_around_selector_separator = this._get_boolean('space_around_selector_separator');
58046 this.space_around_combinator = this._get_boolean('space_around_combinator') || space_around_selector_separator;
58048 var brace_style_split = this._get_selection_list('brace_style', ['collapse', 'expand', 'end-expand', 'none', 'preserve-inline']);
58049 this.brace_style = 'collapse';
58050 for (var bs = 0; bs < brace_style_split.length; bs++) {
58051 if (brace_style_split[bs] !== 'expand') {
58052 // default to collapse, as only collapse|expand is implemented for now
58053 this.brace_style = 'collapse';
58055 this.brace_style = brace_style_split[bs];
58059 Options.prototype = new BaseOptions();
58063 module.exports.Options = Options;
58069 var css_beautify = legacy_beautify_css;
58073 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
58075 __webpack_require__.r(__webpack_exports__);
58076 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
58077 /* harmony export */ "findDocumentLinks": () => /* binding */ findDocumentLinks
58078 /* harmony export */ });
58079 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(116);
58080 /* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(124);
58081 /* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(135);
58082 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(117);
58083 /*---------------------------------------------------------------------------------------------
58084 * Copyright (c) Microsoft Corporation. All rights reserved.
58085 * Licensed under the MIT License. See License.txt in the project root for license information.
58086 *--------------------------------------------------------------------------------------------*/
58091 function normalizeRef(url) {
58092 var first = url[0];
58093 var last = url[url.length - 1];
58094 if (first === last && (first === '\'' || first === '\"')) {
58095 url = url.substr(1, url.length - 2);
58099 function validateRef(url, languageId) {
58103 if (languageId === 'handlebars' && /{{.*}}/.test(url)) {
58106 return /\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(url);
58108 function getWorkspaceUrl(documentUri, tokenContent, documentContext, base) {
58109 if (/^\s*javascript\:/i.test(tokenContent) || /[\n\r]/.test(tokenContent)) {
58112 tokenContent = tokenContent.replace(/^\s*/g, '');
58113 if (/^https?:\/\//i.test(tokenContent) || /^file:\/\//i.test(tokenContent)) {
58114 // Absolute link that needs no treatment
58115 return tokenContent;
58117 if (/^\#/i.test(tokenContent)) {
58118 return documentUri + tokenContent;
58120 if (/^\/\//i.test(tokenContent)) {
58121 // Absolute link (that does not name the protocol)
58122 var pickedScheme = _utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith(documentUri, 'https://') ? 'https' : 'http';
58123 return pickedScheme + ':' + tokenContent.replace(/^\s*/g, '');
58125 if (documentContext) {
58126 return documentContext.resolveReference(tokenContent, base || documentUri);
58128 return tokenContent;
58130 function createLink(document, documentContext, attributeValue, startOffset, endOffset, base) {
58131 var tokenContent = normalizeRef(attributeValue);
58132 if (!validateRef(tokenContent, document.languageId)) {
58135 if (tokenContent.length < attributeValue.length) {
58139 var workspaceUrl = getWorkspaceUrl(document.uri, tokenContent, documentContext, base);
58140 if (!workspaceUrl || !isValidURI(workspaceUrl)) {
58144 range: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.Range.create(document.positionAt(startOffset), document.positionAt(endOffset)),
58145 target: workspaceUrl
58148 function isValidURI(uri) {
58150 vscode_uri__WEBPACK_IMPORTED_MODULE_2__.URI.parse(uri);
58157 function findDocumentLinks(document, documentContext) {
58159 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(document.getText(), 0);
58160 var token = scanner.scan();
58161 var lastAttributeName = undefined;
58162 var afterBase = false;
58164 var idLocations = {};
58165 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TokenType.EOS) {
58167 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TokenType.StartTag:
58169 var tagName = scanner.getTokenText().toLowerCase();
58170 afterBase = tagName === 'base';
58173 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TokenType.AttributeName:
58174 lastAttributeName = scanner.getTokenText().toLowerCase();
58176 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_3__.TokenType.AttributeValue:
58177 if (lastAttributeName === 'src' || lastAttributeName === 'href') {
58178 var attributeValue = scanner.getTokenText();
58179 if (!afterBase) { // don't highlight the base link itself
58180 var link = createLink(document, documentContext, attributeValue, scanner.getTokenOffset(), scanner.getTokenEnd(), base);
58182 newLinks.push(link);
58185 if (afterBase && typeof base === 'undefined') {
58186 base = normalizeRef(attributeValue);
58187 if (base && documentContext) {
58188 base = documentContext.resolveReference(base, document.uri);
58192 lastAttributeName = undefined;
58194 else if (lastAttributeName === 'id') {
58195 var id = normalizeRef(scanner.getTokenText());
58196 idLocations[id] = scanner.getTokenOffset();
58200 token = scanner.scan();
58202 // change local links with ids to actual positions
58203 for (var _i = 0, newLinks_1 = newLinks; _i < newLinks_1.length; _i++) {
58204 var link = newLinks_1[_i];
58205 var localWithHash = document.uri + '#';
58206 if (link.target && _utils_strings__WEBPACK_IMPORTED_MODULE_1__.startsWith(link.target, localWithHash)) {
58207 var target = link.target.substr(localWithHash.length);
58208 var offset = idLocations[target];
58209 if (offset !== undefined) {
58210 var pos = document.positionAt(offset);
58211 link.target = "" + localWithHash + (pos.line + 1) + "," + (pos.character + 1);
58221 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
58223 __webpack_require__.r(__webpack_exports__);
58224 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
58225 /* harmony export */ "URI": () => /* binding */ URI,
58226 /* harmony export */ "uriToFsPath": () => /* binding */ uriToFsPath
58227 /* harmony export */ });
58228 /*---------------------------------------------------------------------------------------------
58229 * Copyright (c) Microsoft Corporation. All rights reserved.
58230 * Licensed under the MIT License. See License.txt in the project root for license information.
58231 *--------------------------------------------------------------------------------------------*/
58233 var __extends = (undefined && undefined.__extends) || (function () {
58234 var extendStatics = function (d, b) {
58235 extendStatics = Object.setPrototypeOf ||
58236 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
58237 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
58238 return extendStatics(d, b);
58240 return function (d, b) {
58241 extendStatics(d, b);
58242 function __() { this.constructor = d; }
58243 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
58248 if (typeof process === 'object') {
58249 isWindows = process.platform === 'win32';
58251 else if (typeof navigator === 'object') {
58252 var userAgent = navigator.userAgent;
58253 isWindows = userAgent.indexOf('Windows') >= 0;
58255 function isHighSurrogate(charCode) {
58256 return (0xD800 <= charCode && charCode <= 0xDBFF);
58258 function isLowSurrogate(charCode) {
58259 return (0xDC00 <= charCode && charCode <= 0xDFFF);
58261 function isLowerAsciiHex(code) {
58262 return code >= 97 /* a */ && code <= 102 /* f */;
58264 function isLowerAsciiLetter(code) {
58265 return code >= 97 /* a */ && code <= 122 /* z */;
58267 function isUpperAsciiLetter(code) {
58268 return code >= 65 /* A */ && code <= 90 /* Z */;
58270 function isAsciiLetter(code) {
58271 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
58274 var _schemePattern = /^\w[\w\d+.-]*$/;
58275 var _singleSlashStart = /^\//;
58276 var _doubleSlashStart = /^\/\//;
58277 function _validateUri(ret, _strict) {
58278 // scheme, must be set
58279 if (!ret.scheme && _strict) {
58280 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
58282 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
58283 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
58284 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
58285 throw new Error('[UriError]: Scheme contains illegal characters.');
58287 // path, http://tools.ietf.org/html/rfc3986#section-3.3
58288 // If a URI contains an authority component, then the path component
58289 // must either be empty or begin with a slash ("/") character. If a URI
58290 // does not contain an authority component, then the path cannot begin
58291 // with two slash characters ("//").
58293 if (ret.authority) {
58294 if (!_singleSlashStart.test(ret.path)) {
58295 throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
58299 if (_doubleSlashStart.test(ret.path)) {
58300 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
58305 // for a while we allowed uris *without* schemes and this is the migration
58306 // for them, e.g. an uri without scheme and without strict-mode warns and falls
58307 // back to the file-scheme. that should cause the least carnage and still be a
58309 function _schemeFix(scheme, _strict) {
58310 if (!scheme && !_strict) {
58315 // implements a bit of https://tools.ietf.org/html/rfc3986#section-5
58316 function _referenceResolution(scheme, path) {
58317 // the slash-character is our 'default base' as we don't
58318 // support constructing URIs relative to other URIs. This
58319 // also means that we alter and potentially break paths.
58320 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
58328 else if (path[0] !== _slash) {
58329 path = _slash + path;
58337 var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
58339 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
58340 * This class is a simple parser which creates the basic component parts
58341 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
58345 * foo://example.com:8042/over/there?name=ferret#nose
58346 * \_/ \______________/\_________/ \_________/ \__/
58348 * scheme authority path query fragment
58349 * | _____________________|__
58351 * urn:example:animal:ferret:nose
58354 var URI = /** @class */ (function () {
58358 function URI(schemeOrData, authority, path, query, fragment, _strict) {
58359 if (_strict === void 0) { _strict = false; }
58360 if (typeof schemeOrData === 'object') {
58361 this.scheme = schemeOrData.scheme || _empty;
58362 this.authority = schemeOrData.authority || _empty;
58363 this.path = schemeOrData.path || _empty;
58364 this.query = schemeOrData.query || _empty;
58365 this.fragment = schemeOrData.fragment || _empty;
58366 // no validation because it's this URI
58367 // that creates uri components.
58368 // _validateUri(this);
58371 this.scheme = _schemeFix(schemeOrData, _strict);
58372 this.authority = authority || _empty;
58373 this.path = _referenceResolution(this.scheme, path || _empty);
58374 this.query = query || _empty;
58375 this.fragment = fragment || _empty;
58376 _validateUri(this, _strict);
58379 URI.isUri = function (thing) {
58380 if (thing instanceof URI) {
58386 return typeof thing.authority === 'string'
58387 && typeof thing.fragment === 'string'
58388 && typeof thing.path === 'string'
58389 && typeof thing.query === 'string'
58390 && typeof thing.scheme === 'string'
58391 && typeof thing.fsPath === 'function'
58392 && typeof thing.with === 'function'
58393 && typeof thing.toString === 'function';
58395 Object.defineProperty(URI.prototype, "fsPath", {
58396 // ---- filesystem path -----------------------
58398 * Returns a string representing the corresponding file system path of this URI.
58399 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
58400 * platform specific path separator.
58402 * * Will *not* validate the path for invalid characters and semantics.
58403 * * Will *not* look at the scheme of this URI.
58404 * * The result shall *not* be used for display purposes but for accessing a file on disk.
58407 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
58408 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
58411 const u = URI.parse('file://server/c$/folder/file.txt')
58412 u.authority === 'server'
58413 u.path === '/shares/c$/file.txt'
58414 u.fsPath === '\\server\c$\folder\file.txt'
58417 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
58418 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
58419 * with URIs that represent files on disk (`file` scheme).
58422 // if (this.scheme !== 'file') {
58423 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
58425 return uriToFsPath(this, false);
58430 // ---- modify to new -------------------------
58431 URI.prototype.with = function (change) {
58435 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
58436 if (scheme === undefined) {
58437 scheme = this.scheme;
58439 else if (scheme === null) {
58442 if (authority === undefined) {
58443 authority = this.authority;
58445 else if (authority === null) {
58446 authority = _empty;
58448 if (path === undefined) {
58451 else if (path === null) {
58454 if (query === undefined) {
58455 query = this.query;
58457 else if (query === null) {
58460 if (fragment === undefined) {
58461 fragment = this.fragment;
58463 else if (fragment === null) {
58466 if (scheme === this.scheme
58467 && authority === this.authority
58468 && path === this.path
58469 && query === this.query
58470 && fragment === this.fragment) {
58473 return new _URI(scheme, authority, path, query, fragment);
58475 // ---- parse & validate ------------------------
58477 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
58478 * `file:///usr/home`, or `scheme:with/path`.
58480 * @param value A string which represents an URI (see `URI#toString`).
58482 URI.parse = function (value, _strict) {
58483 if (_strict === void 0) { _strict = false; }
58484 var match = _regexp.exec(value);
58486 return new _URI(_empty, _empty, _empty, _empty, _empty);
58488 return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
58491 * Creates a new URI from a file system path, e.g. `c:\my\files`,
58492 * `/usr/home`, or `\\server\share\some\path`.
58494 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
58495 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
58496 * `URI.parse('file://' + path)` because the path might contain characters that are
58497 * interpreted (# and ?). See the following sample:
58499 const good = URI.file('/coding/c#/project1');
58500 good.scheme === 'file';
58501 good.path === '/coding/c#/project1';
58502 good.fragment === '';
58503 const bad = URI.parse('file://' + '/coding/c#/project1');
58504 bad.scheme === 'file';
58505 bad.path === '/coding/c'; // path is now broken
58506 bad.fragment === '/project1';
58509 * @param path A file system path (see `URI#fsPath`)
58511 URI.file = function (path) {
58512 var authority = _empty;
58513 // normalize to fwd-slashes on windows,
58514 // on other systems bwd-slashes are valid
58515 // filename character, eg /f\oo/ba\r.txt
58517 path = path.replace(/\\/g, _slash);
58519 // check for authority as used in UNC shares
58520 // or use the path as given
58521 if (path[0] === _slash && path[1] === _slash) {
58522 var idx = path.indexOf(_slash, 2);
58524 authority = path.substring(2);
58528 authority = path.substring(2, idx);
58529 path = path.substring(idx) || _slash;
58532 return new _URI('file', authority, path, _empty, _empty);
58534 URI.from = function (components) {
58535 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
58538 // * Join a URI path with path fragments and normalizes the resulting path.
58540 // * @param uri The input URI.
58541 // * @param pathFragment The path fragment to add to the URI path.
58542 // * @returns The resulting URI.
58544 // static joinPath(uri: URI, ...pathFragment: string[]): URI {
58545 // if (!uri.path) {
58546 // throw new Error(`[UriError]: cannot call joinPaths on URI without path`);
58548 // let newPath: string;
58549 // if (isWindows && uri.scheme === 'file') {
58550 // newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
58552 // newPath = paths.posix.join(uri.path, ...pathFragment);
58554 // return uri.with({ path: newPath });
58556 // ---- printing/externalize ---------------------------
58558 * Creates a string representation for this URI. It's guaranteed that calling
58559 * `URI.parse` with the result of this function creates an URI which is equal
58562 * * The result shall *not* be used for display purposes but for externalization or transport.
58563 * * The result will be encoded using the percentage encoding and encoding happens mostly
58564 * ignore the scheme-specific encoding rules.
58566 * @param skipEncoding Do not encode the result, default is `false`
58568 URI.prototype.toString = function (skipEncoding) {
58569 if (skipEncoding === void 0) { skipEncoding = false; }
58570 return _asFormatted(this, skipEncoding);
58572 URI.prototype.toJSON = function () {
58575 URI.revive = function (data) {
58579 else if (data instanceof URI) {
58583 var result = new _URI(data);
58584 result._formatted = data.external;
58585 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
58592 var _pathSepMarker = isWindows ? 1 : undefined;
58593 // eslint-disable-next-line @typescript-eslint/class-name-casing
58594 var _URI = /** @class */ (function (_super) {
58595 __extends(_URI, _super);
58597 var _this = _super !== null && _super.apply(this, arguments) || this;
58598 _this._formatted = null;
58599 _this._fsPath = null;
58602 Object.defineProperty(_URI.prototype, "fsPath", {
58604 if (!this._fsPath) {
58605 this._fsPath = uriToFsPath(this, false);
58607 return this._fsPath;
58612 _URI.prototype.toString = function (skipEncoding) {
58613 if (skipEncoding === void 0) { skipEncoding = false; }
58614 if (!skipEncoding) {
58615 if (!this._formatted) {
58616 this._formatted = _asFormatted(this, false);
58618 return this._formatted;
58621 // we don't cache that
58622 return _asFormatted(this, true);
58625 _URI.prototype.toJSON = function () {
58630 if (this._fsPath) {
58631 res.fsPath = this._fsPath;
58632 res._sep = _pathSepMarker;
58634 if (this._formatted) {
58635 res.external = this._formatted;
58639 res.path = this.path;
58642 res.scheme = this.scheme;
58644 if (this.authority) {
58645 res.authority = this.authority;
58648 res.query = this.query;
58650 if (this.fragment) {
58651 res.fragment = this.fragment;
58657 // reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
58658 var encodeTable = (_a = {},
58659 _a[58 /* Colon */] = '%3A',
58660 _a[47 /* Slash */] = '%2F',
58661 _a[63 /* QuestionMark */] = '%3F',
58662 _a[35 /* Hash */] = '%23',
58663 _a[91 /* OpenSquareBracket */] = '%5B',
58664 _a[93 /* CloseSquareBracket */] = '%5D',
58665 _a[64 /* AtSign */] = '%40',
58666 _a[33 /* ExclamationMark */] = '%21',
58667 _a[36 /* DollarSign */] = '%24',
58668 _a[38 /* Ampersand */] = '%26',
58669 _a[39 /* SingleQuote */] = '%27',
58670 _a[40 /* OpenParen */] = '%28',
58671 _a[41 /* CloseParen */] = '%29',
58672 _a[42 /* Asterisk */] = '%2A',
58673 _a[43 /* Plus */] = '%2B',
58674 _a[44 /* Comma */] = '%2C',
58675 _a[59 /* Semicolon */] = '%3B',
58676 _a[61 /* Equals */] = '%3D',
58677 _a[32 /* Space */] = '%20',
58679 function encodeURIComponentFast(uriComponent, allowSlash) {
58680 var res = undefined;
58681 var nativeEncodePos = -1;
58682 for (var pos = 0; pos < uriComponent.length; pos++) {
58683 var code = uriComponent.charCodeAt(pos);
58684 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
58685 if ((code >= 97 /* a */ && code <= 122 /* z */)
58686 || (code >= 65 /* A */ && code <= 90 /* Z */)
58687 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
58688 || code === 45 /* Dash */
58689 || code === 46 /* Period */
58690 || code === 95 /* Underline */
58691 || code === 126 /* Tilde */
58692 || (allowSlash && code === 47 /* Slash */)) {
58693 // check if we are delaying native encode
58694 if (nativeEncodePos !== -1) {
58695 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
58696 nativeEncodePos = -1;
58698 // check if we write into a new string (by default we try to return the param)
58699 if (res !== undefined) {
58700 res += uriComponent.charAt(pos);
58704 // encoding needed, we need to allocate a new string
58705 if (res === undefined) {
58706 res = uriComponent.substr(0, pos);
58708 // check with default table first
58709 var escaped = encodeTable[code];
58710 if (escaped !== undefined) {
58711 // check if we are delaying native encode
58712 if (nativeEncodePos !== -1) {
58713 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
58714 nativeEncodePos = -1;
58716 // append escaped variant to result
58719 else if (nativeEncodePos === -1) {
58720 // use native encode only when needed
58721 nativeEncodePos = pos;
58725 if (nativeEncodePos !== -1) {
58726 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
58728 return res !== undefined ? res : uriComponent;
58730 function encodeURIComponentMinimal(path) {
58731 var res = undefined;
58732 for (var pos = 0; pos < path.length; pos++) {
58733 var code = path.charCodeAt(pos);
58734 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
58735 if (res === undefined) {
58736 res = path.substr(0, pos);
58738 res += encodeTable[code];
58741 if (res !== undefined) {
58746 return res !== undefined ? res : path;
58749 * Compute `fsPath` for the given uri
58751 function uriToFsPath(uri, keepDriveLetterCasing) {
58753 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
58754 // unc path: file://shares/c$/far/boo
58755 value = "//" + uri.authority + uri.path;
58757 else if (uri.path.charCodeAt(0) === 47 /* Slash */
58758 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
58759 && uri.path.charCodeAt(2) === 58 /* Colon */) {
58760 if (!keepDriveLetterCasing) {
58761 // windows drive letter: file:///c:/far/boo
58762 value = uri.path[1].toLowerCase() + uri.path.substr(2);
58765 value = uri.path.substr(1);
58773 value = value.replace(/\//g, '\\');
58778 * Create the external version of a uri
58780 function _asFormatted(uri, skipEncoding) {
58781 var encoder = !skipEncoding
58782 ? encodeURIComponentFast
58783 : encodeURIComponentMinimal;
58785 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
58790 if (authority || scheme === 'file') {
58795 var idx = authority.indexOf('@');
58798 var userinfo = authority.substr(0, idx);
58799 authority = authority.substr(idx + 1);
58800 idx = userinfo.indexOf(':');
58802 res += encoder(userinfo, false);
58805 // <user>:<pass>@<auth>
58806 res += encoder(userinfo.substr(0, idx), false);
58808 res += encoder(userinfo.substr(idx + 1), false);
58812 authority = authority.toLowerCase();
58813 idx = authority.indexOf(':');
58815 res += encoder(authority, false);
58819 res += encoder(authority.substr(0, idx), false);
58820 res += authority.substr(idx);
58824 // lower-case windows drive letters in /C:/fff or C:/fff
58825 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
58826 var code = path.charCodeAt(1);
58827 if (code >= 65 /* A */ && code <= 90 /* Z */) {
58828 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
58831 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
58832 var code = path.charCodeAt(0);
58833 if (code >= 65 /* A */ && code <= 90 /* Z */) {
58834 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
58837 // encode the rest of the path
58838 res += encoder(path, true);
58842 res += encoder(query, false);
58846 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
58851 function decodeURIComponentGraceful(str) {
58853 return decodeURIComponent(str);
58856 if (str.length > 3) {
58857 return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
58864 var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
58865 function percentDecode(str) {
58866 if (!str.match(_rEncodedAsHex)) {
58869 return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });
58875 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
58877 __webpack_require__.r(__webpack_exports__);
58878 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
58879 /* harmony export */ "findDocumentHighlights": () => /* binding */ findDocumentHighlights
58880 /* harmony export */ });
58881 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(116);
58882 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(117);
58883 /*---------------------------------------------------------------------------------------------
58884 * Copyright (c) Microsoft Corporation. All rights reserved.
58885 * Licensed under the MIT License. See License.txt in the project root for license information.
58886 *--------------------------------------------------------------------------------------------*/
58889 function findDocumentHighlights(document, position, htmlDocument) {
58890 var offset = document.offsetAt(position);
58891 var node = htmlDocument.findNodeAt(offset);
58896 var startTagRange = getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.StartTag, document, node.start);
58897 var endTagRange = typeof node.endTagStart === 'number' && getTagNameRange(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EndTag, document, node.endTagStart);
58898 if (startTagRange && covers(startTagRange, position) || endTagRange && covers(endTagRange, position)) {
58899 if (startTagRange) {
58900 result.push({ kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.DocumentHighlightKind.Read, range: startTagRange });
58903 result.push({ kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.DocumentHighlightKind.Read, range: endTagRange });
58908 function isBeforeOrEqual(pos1, pos2) {
58909 return pos1.line < pos2.line || (pos1.line === pos2.line && pos1.character <= pos2.character);
58911 function covers(range, position) {
58912 return isBeforeOrEqual(range.start, position) && isBeforeOrEqual(position, range.end);
58914 function getTagNameRange(tokenType, document, startOffset) {
58915 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(document.getText(), startOffset);
58916 var token = scanner.scan();
58917 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS && token !== tokenType) {
58918 token = scanner.scan();
58920 if (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_1__.TokenType.EOS) {
58921 return { start: document.positionAt(scanner.getTokenOffset()), end: document.positionAt(scanner.getTokenEnd()) };
58929 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
58931 __webpack_require__.r(__webpack_exports__);
58932 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
58933 /* harmony export */ "findDocumentSymbols": () => /* binding */ findDocumentSymbols
58934 /* harmony export */ });
58935 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(117);
58936 /*---------------------------------------------------------------------------------------------
58937 * Copyright (c) Microsoft Corporation. All rights reserved.
58938 * Licensed under the MIT License. See License.txt in the project root for license information.
58939 *--------------------------------------------------------------------------------------------*/
58941 function findDocumentSymbols(document, htmlDocument) {
58943 htmlDocument.roots.forEach(function (node) {
58944 provideFileSymbolsInternal(document, node, '', symbols);
58948 function provideFileSymbolsInternal(document, node, container, symbols) {
58949 var name = nodeToName(node);
58950 var location = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Location.create(document.uri, _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(document.positionAt(node.start), document.positionAt(node.end)));
58953 location: location,
58954 containerName: container,
58955 kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.SymbolKind.Field
58957 symbols.push(symbol);
58958 node.children.forEach(function (child) {
58959 provideFileSymbolsInternal(document, child, name, symbols);
58962 function nodeToName(node) {
58963 var name = node.tag;
58964 if (node.attributes) {
58965 var id = node.attributes['id'];
58966 var classes = node.attributes['class'];
58968 name += "#" + id.replace(/[\"\']/g, '');
58971 name += classes.replace(/[\"\']/g, '').split(/\s+/).map(function (className) { return "." + className; }).join('');
58974 return name || '?';
58980 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
58982 __webpack_require__.r(__webpack_exports__);
58983 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
58984 /* harmony export */ "doRename": () => /* binding */ doRename
58985 /* harmony export */ });
58986 /*---------------------------------------------------------------------------------------------
58987 * Copyright (c) Microsoft Corporation. All rights reserved.
58988 * Licensed under the MIT License. See License.txt in the project root for license information.
58989 *--------------------------------------------------------------------------------------------*/
58990 function doRename(document, position, newName, htmlDocument) {
58992 var offset = document.offsetAt(position);
58993 var node = htmlDocument.findNodeAt(offset);
58997 if (!isWithinTagRange(node, offset, node.tag)) {
59001 var startTagRange = {
59002 start: document.positionAt(node.start + '<'.length),
59003 end: document.positionAt(node.start + '<'.length + node.tag.length)
59006 range: startTagRange,
59009 if (node.endTagStart) {
59010 var endTagRange = {
59011 start: document.positionAt(node.endTagStart + '</'.length),
59012 end: document.positionAt(node.endTagStart + '</'.length + node.tag.length)
59015 range: endTagRange,
59019 var changes = (_a = {},
59020 _a[document.uri.toString()] = edits,
59026 function toLocString(p) {
59027 return "(" + p.line + ", " + p.character + ")";
59029 function isWithinTagRange(node, offset, nodeTag) {
59030 // Self-closing tag
59031 if (node.endTagStart) {
59032 if (node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + nodeTag.length) {
59036 return node.start + '<'.length <= offset && offset <= node.start + '<'.length + nodeTag.length;
59042 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59044 __webpack_require__.r(__webpack_exports__);
59045 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59046 /* harmony export */ "findMatchingTagPosition": () => /* binding */ findMatchingTagPosition
59047 /* harmony export */ });
59048 /*---------------------------------------------------------------------------------------------
59049 * Copyright (c) Microsoft Corporation. All rights reserved.
59050 * Licensed under the MIT License. See License.txt in the project root for license information.
59051 *--------------------------------------------------------------------------------------------*/
59052 function findMatchingTagPosition(document, position, htmlDocument) {
59053 var offset = document.offsetAt(position);
59054 var node = htmlDocument.findNodeAt(offset);
59058 if (!node.endTagStart) {
59061 // Within open tag, compute close tag
59062 if (node.start + '<'.length <= offset && offset <= node.start + '<'.length + node.tag.length) {
59063 var mirrorOffset = (offset - '<'.length - node.start) + node.endTagStart + '</'.length;
59064 return document.positionAt(mirrorOffset);
59066 // Within closing tag, compute open tag
59067 if (node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + node.tag.length) {
59068 var mirrorOffset = (offset - '</'.length - node.endTagStart) + node.start + '<'.length;
59069 return document.positionAt(mirrorOffset);
59077 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59079 __webpack_require__.r(__webpack_exports__);
59080 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59081 /* harmony export */ "findLinkedEditingRanges": () => /* binding */ findLinkedEditingRanges
59082 /* harmony export */ });
59083 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(117);
59084 /*---------------------------------------------------------------------------------------------
59085 * Copyright (c) Microsoft Corporation. All rights reserved.
59086 * Licensed under the MIT License. See License.txt in the project root for license information.
59087 *--------------------------------------------------------------------------------------------*/
59089 function findLinkedEditingRanges(document, position, htmlDocument) {
59090 var offset = document.offsetAt(position);
59091 var node = htmlDocument.findNodeAt(offset);
59092 var tagLength = node.tag ? node.tag.length : 0;
59093 if (!node.endTagStart) {
59097 // Within open tag, compute close tag
59098 (node.start + '<'.length <= offset && offset <= node.start + '<'.length + tagLength) ||
59099 // Within closing tag, compute open tag
59100 node.endTagStart + '</'.length <= offset && offset <= node.endTagStart + '</'.length + tagLength) {
59102 _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(document.positionAt(node.start + '<'.length), document.positionAt(node.start + '<'.length + tagLength)),
59103 _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.Range.create(document.positionAt(node.endTagStart + '</'.length), document.positionAt(node.endTagStart + '</'.length + tagLength))
59112 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59114 __webpack_require__.r(__webpack_exports__);
59115 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59116 /* harmony export */ "getFoldingRanges": () => /* binding */ getFoldingRanges
59117 /* harmony export */ });
59118 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(117);
59119 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(116);
59120 /* harmony import */ var _languageFacts_fact__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(121);
59121 /*---------------------------------------------------------------------------------------------
59122 * Copyright (c) Microsoft Corporation. All rights reserved.
59123 * Licensed under the MIT License. See License.txt in the project root for license information.
59124 *--------------------------------------------------------------------------------------------*/
59128 function limitRanges(ranges, rangeLimit) {
59129 ranges = ranges.sort(function (r1, r2) {
59130 var diff = r1.startLine - r2.startLine;
59132 diff = r1.endLine - r2.endLine;
59136 // compute each range's nesting level in 'nestingLevels'.
59137 // count the number of ranges for each level in 'nestingLevelCounts'
59140 var nestingLevels = [];
59141 var nestingLevelCounts = [];
59142 var setNestingLevel = function (index, level) {
59143 nestingLevels[index] = level;
59145 nestingLevelCounts[level] = (nestingLevelCounts[level] || 0) + 1;
59148 // compute nesting levels and sanitize
59149 for (var i = 0; i < ranges.length; i++) {
59150 var entry = ranges[i];
59153 setNestingLevel(i, 0);
59156 if (entry.startLine > top.startLine) {
59157 if (entry.endLine <= top.endLine) {
59158 previous.push(top);
59160 setNestingLevel(i, previous.length);
59162 else if (entry.startLine > top.endLine) {
59164 top = previous.pop();
59165 } while (top && entry.startLine > top.endLine);
59167 previous.push(top);
59170 setNestingLevel(i, previous.length);
59177 for (var i = 0; i < nestingLevelCounts.length; i++) {
59178 var n = nestingLevelCounts[i];
59180 if (n + entries > rangeLimit) {
59188 for (var i = 0; i < ranges.length; i++) {
59189 var level = nestingLevels[i];
59190 if (typeof level === 'number') {
59191 if (level < maxLevel || (level === maxLevel && entries++ < rangeLimit)) {
59192 result.push(ranges[i]);
59198 function getFoldingRanges(document, context) {
59199 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_1__.createScanner)(document.getText());
59200 var token = scanner.scan();
59203 var lastTagName = null;
59204 var prevStart = -1;
59205 function addRange(range) {
59206 ranges.push(range);
59207 prevStart = range.startLine;
59209 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TokenType.EOS) {
59211 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TokenType.StartTag: {
59212 var tagName = scanner.getTokenText();
59213 var startLine = document.positionAt(scanner.getTokenOffset()).line;
59214 stack.push({ startLine: startLine, tagName: tagName });
59215 lastTagName = tagName;
59218 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TokenType.EndTag: {
59219 lastTagName = scanner.getTokenText();
59222 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TokenType.StartTagClose:
59223 if (!lastTagName || !(0,_languageFacts_fact__WEBPACK_IMPORTED_MODULE_2__.isVoidElement)(lastTagName)) {
59227 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TokenType.EndTagClose:
59228 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TokenType.StartTagSelfClose: {
59229 var i = stack.length - 1;
59230 while (i >= 0 && stack[i].tagName !== lastTagName) {
59234 var stackElement = stack[i];
59236 var line = document.positionAt(scanner.getTokenOffset()).line;
59237 var startLine = stackElement.startLine;
59238 var endLine = line - 1;
59239 if (endLine > startLine && prevStart !== startLine) {
59240 addRange({ startLine: startLine, endLine: endLine });
59245 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.TokenType.Comment: {
59246 var startLine = document.positionAt(scanner.getTokenOffset()).line;
59247 var text = scanner.getTokenText();
59248 var m = text.match(/^\s*#(region\b)|(endregion\b)/);
59250 if (m[1]) { // start pattern match
59251 stack.push({ startLine: startLine, tagName: '' }); // empty tagName marks region
59254 var i = stack.length - 1;
59255 while (i >= 0 && stack[i].tagName.length) {
59259 var stackElement = stack[i];
59261 var endLine = startLine;
59262 startLine = stackElement.startLine;
59263 if (endLine > startLine && prevStart !== startLine) {
59264 addRange({ startLine: startLine, endLine: endLine, kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FoldingRangeKind.Region });
59270 var endLine = document.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()).line;
59271 if (startLine < endLine) {
59272 addRange({ startLine: startLine, endLine: endLine, kind: _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_0__.FoldingRangeKind.Comment });
59278 token = scanner.scan();
59280 var rangeLimit = context && context.rangeLimit || Number.MAX_VALUE;
59281 if (ranges.length > rangeLimit) {
59282 return limitRanges(ranges, rangeLimit);
59290 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59292 __webpack_require__.r(__webpack_exports__);
59293 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59294 /* harmony export */ "getSelectionRanges": () => /* binding */ getSelectionRanges
59295 /* harmony export */ });
59296 /* harmony import */ var _parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(116);
59297 /* harmony import */ var _parser_htmlParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(119);
59298 /* harmony import */ var _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(117);
59299 /*---------------------------------------------------------------------------------------------
59300 * Copyright (c) Microsoft Corporation. All rights reserved.
59301 * Licensed under the MIT License. See License.txt in the project root for license information.
59302 *--------------------------------------------------------------------------------------------*/
59306 function getSelectionRanges(document, positions) {
59307 function getSelectionRange(position) {
59308 var applicableRanges = getApplicableRanges(document, position);
59309 var prev = undefined;
59310 var current = undefined;
59311 for (var index = applicableRanges.length - 1; index >= 0; index--) {
59312 var range = applicableRanges[index];
59313 if (!prev || range[0] !== prev[0] || range[1] !== prev[1]) {
59314 current = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.SelectionRange.create(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.Range.create(document.positionAt(applicableRanges[index][0]), document.positionAt(applicableRanges[index][1])), current);
59319 current = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.SelectionRange.create(_htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.Range.create(position, position));
59323 return positions.map(getSelectionRange);
59325 function getApplicableRanges(document, position) {
59326 var htmlDoc = (0,_parser_htmlParser__WEBPACK_IMPORTED_MODULE_1__.parse)(document.getText());
59327 var currOffset = document.offsetAt(position);
59328 var currNode = htmlDoc.findNodeAt(currOffset);
59329 var result = getAllParentTagRanges(currNode);
59330 // Self-closing or void elements
59331 if (currNode.startTagEnd && !currNode.endTagStart) {
59332 // THe rare case of unmatching tag pairs like <div></div1>
59333 if (currNode.startTagEnd !== currNode.end) {
59334 return [[currNode.start, currNode.end]];
59336 var closeRange = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.Range.create(document.positionAt(currNode.startTagEnd - 2), document.positionAt(currNode.startTagEnd));
59337 var closeText = document.getText(closeRange);
59338 // Self-closing element
59339 if (closeText === '/>') {
59340 result.unshift([currNode.start + 1, currNode.startTagEnd - 2]);
59344 result.unshift([currNode.start + 1, currNode.startTagEnd - 1]);
59346 var attributeLevelRanges = getAttributeLevelRanges(document, currNode, currOffset);
59347 result = attributeLevelRanges.concat(result);
59350 if (!currNode.startTagEnd || !currNode.endTagStart) {
59355 * `<div class="foo">bar</div>`
59357 result.unshift([currNode.start, currNode.end]);
59359 * Cursor inside `<div class="foo">`
59361 if (currNode.start < currOffset && currOffset < currNode.startTagEnd) {
59362 result.unshift([currNode.start + 1, currNode.startTagEnd - 1]);
59363 var attributeLevelRanges = getAttributeLevelRanges(document, currNode, currOffset);
59364 result = attributeLevelRanges.concat(result);
59368 * Cursor inside `bar`
59370 else if (currNode.startTagEnd <= currOffset && currOffset <= currNode.endTagStart) {
59371 result.unshift([currNode.startTagEnd, currNode.endTagStart]);
59375 * Cursor inside `</div>`
59378 // `div` inside `</div>`
59379 if (currOffset >= currNode.endTagStart + 2) {
59380 result.unshift([currNode.endTagStart + 2, currNode.end - 1]);
59385 function getAllParentTagRanges(initialNode) {
59386 var currNode = initialNode;
59387 var getNodeRanges = function (n) {
59388 if (n.startTagEnd && n.endTagStart && n.startTagEnd < n.endTagStart) {
59390 [n.startTagEnd, n.endTagStart],
59399 while (currNode.parent) {
59400 currNode = currNode.parent;
59401 getNodeRanges(currNode).forEach(function (r) { return result.push(r); });
59405 function getAttributeLevelRanges(document, currNode, currOffset) {
59406 var currNodeRange = _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.Range.create(document.positionAt(currNode.start), document.positionAt(currNode.end));
59407 var currNodeText = document.getText(currNodeRange);
59408 var relativeOffset = currOffset - currNode.start;
59410 * Tag level semantic selection
59412 var scanner = (0,_parser_htmlScanner__WEBPACK_IMPORTED_MODULE_0__.createScanner)(currNodeText);
59413 var token = scanner.scan();
59416 * <div class="foo">bar</div>
59418 var positionOffset = currNode.start;
59420 var isInsideAttribute = false;
59421 var attrStart = -1;
59422 while (token !== _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.EOS) {
59424 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.AttributeName: {
59425 if (relativeOffset < scanner.getTokenOffset()) {
59426 isInsideAttribute = false;
59429 if (relativeOffset <= scanner.getTokenEnd()) {
59431 result.unshift([scanner.getTokenOffset(), scanner.getTokenEnd()]);
59433 isInsideAttribute = true;
59434 attrStart = scanner.getTokenOffset();
59437 case _htmlLanguageTypes__WEBPACK_IMPORTED_MODULE_2__.TokenType.AttributeValue: {
59438 if (!isInsideAttribute) {
59441 var valueText = scanner.getTokenText();
59442 if (relativeOffset < scanner.getTokenOffset()) {
59444 result.push([attrStart, scanner.getTokenEnd()]);
59447 if (relativeOffset >= scanner.getTokenOffset() && relativeOffset <= scanner.getTokenEnd()) {
59449 result.unshift([scanner.getTokenOffset(), scanner.getTokenEnd()]);
59451 if ((valueText[0] === "\"" && valueText[valueText.length - 1] === "\"") || (valueText[0] === "'" && valueText[valueText.length - 1] === "'")) {
59452 if (relativeOffset >= scanner.getTokenOffset() + 1 && relativeOffset <= scanner.getTokenEnd() - 1) {
59453 result.unshift([scanner.getTokenOffset() + 1, scanner.getTokenEnd() - 1]);
59457 result.push([attrStart, scanner.getTokenEnd()]);
59462 token = scanner.scan();
59464 return result.map(function (pair) {
59465 return [pair[0] + positionOffset, pair[1] + positionOffset];
59472 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59474 __webpack_require__.r(__webpack_exports__);
59475 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59476 /* harmony export */ "HTMLDataManager": () => /* binding */ HTMLDataManager
59477 /* harmony export */ });
59478 /* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(126);
59479 /* harmony import */ var _data_webCustomData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(144);
59480 /*---------------------------------------------------------------------------------------------
59481 * Copyright (c) Microsoft Corporation. All rights reserved.
59482 * Licensed under the MIT License. See License.txt in the project root for license information.
59483 *--------------------------------------------------------------------------------------------*/
59486 var HTMLDataManager = /** @class */ (function () {
59487 function HTMLDataManager(options) {
59488 this.dataProviders = [];
59489 this.setDataProviders(options.useDefaultDataProvider !== false, options.customDataProviders || []);
59491 HTMLDataManager.prototype.setDataProviders = function (builtIn, providers) {
59493 this.dataProviders = [];
59495 this.dataProviders.push(new _dataProvider__WEBPACK_IMPORTED_MODULE_0__.HTMLDataProvider('html5', _data_webCustomData__WEBPACK_IMPORTED_MODULE_1__.htmlData));
59497 (_a = this.dataProviders).push.apply(_a, providers);
59499 HTMLDataManager.prototype.getDataProviders = function () {
59500 return this.dataProviders;
59502 return HTMLDataManager;
59509 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59511 __webpack_require__.r(__webpack_exports__);
59512 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59513 /* harmony export */ "htmlData": () => /* binding */ htmlData
59514 /* harmony export */ });
59515 /*---------------------------------------------------------------------------------------------
59516 * Copyright (c) Microsoft Corporation. All rights reserved.
59517 * Licensed under the MIT License. See License.txt in the project root for license information.
59518 *--------------------------------------------------------------------------------------------*/
59519 // file generated from vscode-web-custom-data NPM package
59526 "kind": "markdown",
59527 "value": "The html element represents the root of an HTML document."
59531 "name": "manifest",
59533 "kind": "markdown",
59534 "value": "Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details."
59539 "description": "Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD \"Document Type Definition: In HTML, the doctype is the required \"<!DOCTYPE html>\" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the \"<!DOCTYPE html>\" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.\") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration."
59543 "description": "Specifies the XML Namespace of the document. Default value is `\"http://www.w3.org/1999/xhtml\"`. This is required in documents parsed with XML parsers, and optional in text/html documents."
59548 "name": "MDN Reference",
59549 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/html"
59556 "kind": "markdown",
59557 "value": "The head element represents a collection of metadata for the Document."
59562 "description": "The URIs of one or more metadata profiles, separated by white space."
59567 "name": "MDN Reference",
59568 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/head"
59575 "kind": "markdown",
59576 "value": "The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context."
59581 "name": "MDN Reference",
59582 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/title"
59589 "kind": "markdown",
59590 "value": "The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information."
59596 "kind": "markdown",
59597 "value": "The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed."
59603 "kind": "markdown",
59604 "value": "A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the result into a new unnamed browsing context.\n* `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."
59610 "name": "MDN Reference",
59611 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/base"
59618 "kind": "markdown",
59619 "value": "The link element allows authors to link their document to other resources."
59625 "kind": "markdown",
59626 "value": "This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL \"URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.\") of the linked resource. A URL can be absolute or relative."
59630 "name": "crossorigin",
59633 "kind": "markdown",
59634 "value": "This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin \"The Origin request header indicates where a fetch originates from. It doesn't include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn't disclose the whole path.\") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin \"The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.\") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials \"The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is \"include\".\") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information."
59640 "kind": "markdown",
59641 "value": "This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
59647 "kind": "markdown",
59648 "value": "This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets — it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n* In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n* Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."
59652 "name": "hreflang",
59654 "kind": "markdown",
59655 "value": "This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."
59661 "kind": "markdown",
59662 "value": "This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel=\"preload\"` link types, to make sure the browser only downloads file types that it supports."
59668 "kind": "markdown",
59669 "value": "This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n* `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n* a white-space separated list of sizes, each in the format `_<width in pixels>_x_<height in pixels>_` or `_<width in pixels>_X_<height in pixels>_`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."
59674 "description": "This attribute is only used when `rel=\"preload\"` or `rel=\"prefetch\"` has been set on the `<link>` element. It specifies the type of content being loaded by the `<link>`, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept \"The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image, video or a script.\") request header."
59677 "name": "importance",
59678 "description": "Indicates the relative importance of the resource. Priority hints are delegated using the values:"
59681 "name": "importance",
59682 "description": "**`auto`**: Indicates **no preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the browser that the resource is of **high** priority.\n\n**`low`**: Indicates to the browser that the resource is of **low** priority.\n\n**Note:** The `importance` attribute may only be used for the `<link>` element if `rel=\"preload\"` or `rel=\"prefetch\"` is present."
59685 "name": "integrity",
59686 "description": "Contains inline metadata — a base64-encoded cryptographic hash of the resource (file) you’re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)."
59689 "name": "referrerpolicy",
59690 "description": "A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior, if no policy is otherwise specified.\n* `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n* `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer's path.\n* `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins."
59694 "description": "The `title` attribute has special semantics on the `<link>` element. When used on a `<link rel=\"stylesheet\">` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets)."
59699 "name": "MDN Reference",
59700 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/link"
59707 "kind": "markdown",
59708 "value": "The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements."
59714 "kind": "markdown",
59715 "value": "This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [`itemprop`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set.\n\nThis metadata name is associated with the value contained by the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are:\n\n* `application-name` which defines the name of the application running in the web page.\n \n **Note:**\n \n * Browsers may use this to identify the application. It is different from the [`<title>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title \"The HTML Title element (<title>) defines the document's title that is shown in a browser's title bar or a page's tab.\") element, which usually contain the application name, but may also contain information like the document name or a status.\n * Simple web pages shouldn't define an application-name.\n \n* `author` which defines the name of the document's author.\n* `description` which contains a short and accurate summary of the content of the page. Several browsers, like Firefox and Opera, use this as the default description of bookmarked pages.\n* `generator` which contains the identifier of the software that generated the page.\n* `keywords` which contains words relevant to the page's content separated by commas.\n* `referrer` which controls the [`Referer` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) attached to requests sent from the document:\n \n Values for the `content` attribute of `<meta name=\"referrer\">`\n \n `no-referrer`\n \n Do not send a HTTP `Referrer` header.\n \n `origin`\n \n Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the document.\n \n `no-referrer-when-downgrade`\n \n Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) as a referrer to URLs as secure as the current page, (https→https), but does not send a referrer to less secure URLs (https→http). This is the default behaviour.\n \n `origin-when-cross-origin`\n \n Send the full URL (stripped of parameters) for same-origin requests, but only send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) for other cases.\n \n `same-origin`\n \n A referrer will be sent for [same-site origins](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy), but cross-origin requests will contain no referrer information.\n \n `strict-origin`\n \n Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP).\n \n `strict-origin-when-cross-origin`\n \n Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP).\n \n `unsafe-URL`\n \n Send the full URL (stripped of parameters) for same-origin or cross-origin requests.\n \n **Notes:**\n \n * Some browsers support the deprecated values of `always`, `default`, and `never` for referrer.\n * Dynamically inserting `<meta name=\"referrer\">` (with [`document.write`](https://developer.mozilla.org/en-US/docs/Web/API/Document/write) or [`appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)) makes the referrer behaviour unpredictable.\n * When several conflicting policies are defined, the no-referrer policy is applied.\n \n\nThis attribute may also have a value taken from the extended list defined on [WHATWG Wiki MetaExtensions page](https://wiki.whatwg.org/wiki/MetaExtensions). Although none have been formally accepted yet, a few commonly used names are:\n\n* `creator` which defines the name of the creator of the document, such as an organization or institution. If there are more than one, several [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") elements should be used.\n* `googlebot`, a synonym of `robots`, is only followed by Googlebot (the indexing crawler for Google).\n* `publisher` which defines the name of the document's publisher.\n* `robots` which defines the behaviour that cooperative crawlers, or \"robots\", should use with the page. It is a comma-separated list of the values below:\n \n Values for the content of `<meta name=\"robots\">`\n \n Value\n \n Description\n \n Used by\n \n `index`\n \n Allows the robot to index the page (default).\n \n All\n \n `noindex`\n \n Requests the robot to not index the page.\n \n All\n \n `follow`\n \n Allows the robot to follow the links on the page (default).\n \n All\n \n `nofollow`\n \n Requests the robot to not follow the links on the page.\n \n All\n \n `none`\n \n Equivalent to `noindex, nofollow`\n \n [Google](https://support.google.com/webmasters/answer/79812)\n \n `noodp`\n \n Prevents using the [Open Directory Project](https://www.dmoz.org/) description, if any, as the page description in search engine results.\n \n [Google](https://support.google.com/webmasters/answer/35624#nodmoz), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/meta-tags-robotstxt-yahoo-search-sln2213.html#cont5), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n \n `noarchive`\n \n Requests the search engine not to cache the page content.\n \n [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/SLN2213.html), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n \n `nosnippet`\n \n Prevents displaying any description of the page in search engine results.\n \n [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n \n `noimageindex`\n \n Requests this page not to appear as the referring page of an indexed image.\n \n [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives)\n \n `nocache`\n \n Synonym of `noarchive`.\n \n [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240)\n \n **Notes:**\n \n * Only cooperative robots follow these rules. Do not expect to prevent e-mail harvesters with them.\n * The robot still needs to access the page in order to read these rules. To prevent bandwidth consumption, use a _[robots.txt](https://developer.mozilla.org/en-US/docs/Glossary/robots.txt \"robots.txt: Robots.txt is a file which is usually placed in the root of any website. It decides whether crawlers are permitted or forbidden access to the web site.\")_ file.\n * If you want to remove a page, `noindex` will work, but only after the robot visits the page again. Ensure that the `robots.txt` file is not preventing revisits.\n * Some values are mutually exclusive, like `index` and `noindex`, or `follow` and `nofollow`. In these cases the robot's behaviour is undefined and may vary between them.\n * Some crawler robots, like Google, Yahoo and Bing, support the same values for the HTTP header `X-Robots-Tag`; this allows non-HTML documents like images to use these rules.\n \n* `slurp`, is a synonym of `robots`, but only for Slurp - the crawler for Yahoo Search.\n* `viewport`, which gives hints about the size of the initial size of the [viewport](https://developer.mozilla.org/en-US/docs/Glossary/viewport \"viewport: A viewport represents a polygonal (normally rectangular) area in computer graphics that is currently being viewed. In web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode). Content outside the viewport is not visible onscreen until scrolled into view.\"). Used by mobile devices only.\n \n Values for the content of `<meta name=\"viewport\">`\n \n Value\n \n Possible subvalues\n \n Description\n \n `width`\n \n A positive integer number, or the text `device-width`\n \n Defines the pixel width of the viewport that you want the web site to be rendered at.\n \n `height`\n \n A positive integer, or the text `device-height`\n \n Defines the height of the viewport. Not used by any browser.\n \n `initial-scale`\n \n A positive number between `0.0` and `10.0`\n \n Defines the ratio between the device width (`device-width` in portrait mode or `device-height` in landscape mode) and the viewport size.\n \n `maximum-scale`\n \n A positive number between `0.0` and `10.0`\n \n Defines the maximum amount to zoom in. It must be greater or equal to the `minimum-scale` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.\n \n `minimum-scale`\n \n A positive number between `0.0` and `10.0`\n \n Defines the minimum zoom level. It must be smaller or equal to the `maximum-scale` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default.\n \n `user-scalable`\n \n `yes` or `no`\n \n If set to `no`, the user is not able to zoom in the webpage. The default is `yes`. Browser settings can ignore this rule, and iOS10+ ignores it by default.\n \n Specification\n \n Status\n \n Comment\n \n [CSS Device Adaptation \n The definition of '<meta name=\"viewport\">' in that specification.](https://drafts.csswg.org/css-device-adapt/#viewport-meta)\n \n Working Draft\n \n Non-normatively describes the Viewport META element\n \n See also: [`@viewport`](https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport \"The @viewport CSS at-rule lets you configure the viewport through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like \"snap to edge\" (such as Microsoft Edge).\")\n \n **Notes:**\n \n * Though unstandardized, this declaration is respected by most mobile browsers due to de-facto dominance.\n * The default values may vary between devices and browsers.\n * To learn about this declaration in Firefox for Mobile, see [this article](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag \"Mobile/Viewport meta tag\")."
59719 "name": "http-equiv",
59721 "kind": "markdown",
59722 "value": "Defines a pragma directive. The attribute is named `**http-equiv**(alent)` because all the allowed values are names of particular HTTP headers:\n\n* `\"content-language\"` \n Defines the default language of the page. It can be overridden by the [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) attribute on any element.\n \n **Warning:** Do not use this value, as it is obsolete. Prefer the `lang` attribute on the [`<html>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html \"The HTML <html> element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.\") element.\n \n* `\"content-security-policy\"` \n Allows page authors to define a [content policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives) for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.\n* `\"content-type\"` \n Defines the [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) of the document, followed by its character encoding. It follows the same syntax as the HTTP `content-type` entity-header field, but as it is inside a HTML page, most values other than `text/html` are impossible. Therefore the valid syntax for its `content` is the string '`text/html`' followed by a character set with the following syntax: '`; charset=_IANAcharset_`', where `IANAcharset` is the _preferred MIME name_ for a character set as [defined by the IANA.](https://www.iana.org/assignments/character-sets)\n \n **Warning:** Do not use this value, as it is obsolete. Use the [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute on the [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element.\n \n **Note:** As [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") can't change documents' types in XHTML or HTML5's XHTML serialization, never set the MIME type to an XHTML MIME type with `<meta>`.\n \n* `\"refresh\"` \n This instruction specifies:\n * The number of seconds until the page should be reloaded - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer.\n * The number of seconds until the page should redirect to another - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer followed by the string '`;url=`', and a valid URL.\n* `\"set-cookie\"` \n Defines a [cookie](https://developer.mozilla.org/en-US/docs/cookie) for the page. Its content must follow the syntax defined in the [IETF HTTP Cookie Specification](https://tools.ietf.org/html/draft-ietf-httpstate-cookie-14).\n \n **Warning:** Do not use this instruction, as it is obsolete. Use the HTTP header [`Set-Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) instead."
59728 "kind": "markdown",
59729 "value": "This attribute contains the value for the [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-name) attribute, depending on which is used."
59735 "kind": "markdown",
59736 "value": "This attribute declares the page's character encoding. It must contain a [standard IANA MIME name for character encodings](https://www.iana.org/assignments/character-sets). Although the standard doesn't request a specific encoding, it suggests:\n\n* Authors are encouraged to use [`UTF-8`](https://developer.mozilla.org/en-US/docs/Glossary/UTF-8).\n* Authors should not use ASCII-incompatible encodings to avoid security risk: browsers not supporting them may interpret harmful content as HTML. This happens with the `JIS_C6226-1983`, `JIS_X0212-1990`, `HZ-GB-2312`, `JOHAB`, the ISO-2022 family and the EBCDIC family.\n\n**Note:** ASCII-incompatible encodings are those that don't map the 8-bit code points `0x20` to `0x7E` to the `0x0020` to `0x007E` Unicode code points)\n\n* Authors **must not** use `CESU-8`, `UTF-7`, `BOCU-1` and/or `SCSU` as [cross-site scripting](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) attacks with these encodings have been demonstrated.\n* Authors should not use `UTF-32` because not all HTML5 encoding algorithms can distinguish it from `UTF-16`.\n\n**Notes:**\n\n* The declared character encoding must match the one the page was saved with to avoid garbled characters and security holes.\n* The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element declaring the encoding must be inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head \"The HTML <head> element provides general information (metadata) about the document, including its title and links to its scripts and style sheets.\") element and **within the first 1024 bytes** of the HTML as some browsers only look at those bytes before choosing an encoding.\n* This [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element is only one part of the [algorithm to determine a page's character set](https://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#encoding-sniffing-algorithm \"Algorithm charset page\"). The [`Content-Type` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) and any [Byte-Order Marks](https://developer.mozilla.org/en-US/docs/Glossary/Byte-Order_Mark \"The definition of that term (Byte-Order Marks) has not been written yet; please consider contributing it!\") override this element.\n* It is strongly recommended to define the character encoding. If a page's encoding is undefined, cross-scripting techniques are possible, such as the [`UTF-7` fallback cross-scripting technique](https://code.google.com/p/doctype-mirror/wiki/ArticleUtf7).\n* The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta \"The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.\") element with a `charset` attribute is a synonym for the pre-HTML5 `<meta http-equiv=\"Content-Type\" content=\"text/html; charset=_IANAcharset_\">`, where _`IANAcharset`_ contains the value of the equivalent [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute. This syntax is still allowed, although no longer recommended."
59741 "description": "This attribute defines the scheme in which metadata is described. A scheme is a context leading to the correct interpretations of the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) value, like a format.\n\n**Warning:** Do not use this value, as it is obsolete. There is no replacement as there was no real usage for it."
59746 "name": "MDN Reference",
59747 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/meta"
59754 "kind": "markdown",
59755 "value": "The style element allows authors to embed style information in their documents. The style element is one of several inputs to the styling processing model. The element does not represent content for the user."
59761 "kind": "markdown",
59762 "value": "This attribute defines which media the style should be applied to. Its value is a [media query](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries), which defaults to `all` if the attribute is missing."
59768 "kind": "markdown",
59769 "value": "A cryptographic nonce (number used once) used to whitelist inline styles in a [style-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource’s policy is otherwise trivial."
59775 "kind": "markdown",
59776 "value": "This attribute defines the styling language as a MIME type (charset should not be specified). This attribute is optional and defaults to `text/css` if it is not specified — there is very little reason to include this in modern web documents."
59785 "description": "This attribute specifies [alternative style sheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets) sets."
59790 "name": "MDN Reference",
59791 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/style"
59798 "kind": "markdown",
59799 "value": "The body element represents the content of the document."
59803 "name": "onafterprint",
59805 "kind": "markdown",
59806 "value": "Function to call after the user has printed the document."
59810 "name": "onbeforeprint",
59812 "kind": "markdown",
59813 "value": "Function to call when the user requests printing of the document."
59817 "name": "onbeforeunload",
59819 "kind": "markdown",
59820 "value": "Function to call when the document is about to be unloaded."
59824 "name": "onhashchange",
59826 "kind": "markdown",
59827 "value": "Function to call when the fragment identifier part (starting with the hash (`'#'`) character) of the document's current address has changed."
59831 "name": "onlanguagechange",
59833 "kind": "markdown",
59834 "value": "Function to call when the preferred languages changed."
59838 "name": "onmessage",
59840 "kind": "markdown",
59841 "value": "Function to call when the document has received a message."
59845 "name": "onoffline",
59847 "kind": "markdown",
59848 "value": "Function to call when network communication has failed."
59852 "name": "ononline",
59854 "kind": "markdown",
59855 "value": "Function to call when network communication has been restored."
59859 "name": "onpagehide"
59862 "name": "onpageshow"
59865 "name": "onpopstate",
59867 "kind": "markdown",
59868 "value": "Function to call when the user has navigated session history."
59872 "name": "onstorage",
59874 "kind": "markdown",
59875 "value": "Function to call when the storage area has changed."
59879 "name": "onunload",
59881 "kind": "markdown",
59882 "value": "Function to call when the document is going away."
59887 "description": "Color of text for hyperlinks when selected. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:active`](https://developer.mozilla.org/en-US/docs/Web/CSS/:active \"The :active CSS pseudo-class represents an element (such as a button) that is being activated by the user.\") pseudo-class instead._"
59890 "name": "background",
59891 "description": "URI of a image to use as a background. _This method is non-conforming, use CSS [`background`](https://developer.mozilla.org/en-US/docs/Web/CSS/background \"The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method.\") property on the element instead._"
59895 "description": "Background color for the document. _This method is non-conforming, use CSS [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property on the element instead._"
59898 "name": "bottommargin",
59899 "description": "The margin of the bottom of the body. _This method is non-conforming, use CSS [`margin-bottom`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom \"The margin-bottom CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._"
59902 "name": "leftmargin",
59903 "description": "The margin of the left of the body. _This method is non-conforming, use CSS [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left \"The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._"
59907 "description": "Color of text for unvisited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:link`](https://developer.mozilla.org/en-US/docs/Web/CSS/:link \"The :link CSS pseudo-class represents an element that has not yet been visited. It matches every unvisited <a>, <area>, or <link> element that has an href attribute.\") pseudo-class instead._"
59911 "description": "Function to call when the document loses focus."
59915 "description": "Function to call when the document fails to load properly."
59919 "description": "Function to call when the document receives focus."
59923 "description": "Function to call when the document has finished loading."
59927 "description": "Function to call when the user has moved forward in undo transaction history."
59930 "name": "onresize",
59931 "description": "Function to call when the document has been resized."
59935 "description": "Function to call when the user has moved backward in undo transaction history."
59938 "name": "rightmargin",
59939 "description": "The margin of the right of the body. _This method is non-conforming, use CSS [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right \"The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._"
59943 "description": "Foreground color of text. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property on the element instead._"
59946 "name": "topmargin",
59947 "description": "The margin of the top of the body. _This method is non-conforming, use CSS [`margin-top`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top \"The margin-top CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") property on the element instead._"
59951 "description": "Color of text for visited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color \"The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value.\") property in conjunction with the [`:visited`](https://developer.mozilla.org/en-US/docs/Web/CSS/:visited \"The :visited CSS pseudo-class represents links that the user has already visited. For privacy reasons, the styles that can be modified using this selector are very limited.\") pseudo-class instead._"
59956 "name": "MDN Reference",
59957 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/body"
59964 "kind": "markdown",
59965 "value": "The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. Each article should be identified, typically by including a heading (h1–h6 element) as a child of the article element."
59970 "name": "MDN Reference",
59971 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/article"
59978 "kind": "markdown",
59979 "value": "The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content. Each section should be identified, typically by including a heading ( h1- h6 element) as a child of the section element."
59984 "name": "MDN Reference",
59985 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/section"
59992 "kind": "markdown",
59993 "value": "The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links."
59998 "name": "MDN Reference",
59999 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/nav"
60006 "kind": "markdown",
60007 "value": "The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography."
60012 "name": "MDN Reference",
60013 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/aside"
60020 "kind": "markdown",
60021 "value": "The h1 element represents a section heading."
60026 "name": "MDN Reference",
60027 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
60034 "kind": "markdown",
60035 "value": "The h2 element represents a section heading."
60040 "name": "MDN Reference",
60041 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
60048 "kind": "markdown",
60049 "value": "The h3 element represents a section heading."
60054 "name": "MDN Reference",
60055 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
60062 "kind": "markdown",
60063 "value": "The h4 element represents a section heading."
60068 "name": "MDN Reference",
60069 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
60076 "kind": "markdown",
60077 "value": "The h5 element represents a section heading."
60082 "name": "MDN Reference",
60083 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
60090 "kind": "markdown",
60091 "value": "The h6 element represents a section heading."
60096 "name": "MDN Reference",
60097 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"
60104 "kind": "markdown",
60105 "value": "The header element represents introductory content for its nearest ancestor sectioning content or sectioning root element. A header typically contains a group of introductory or navigational aids. When the nearest ancestor sectioning content or sectioning root element is the body element, then it applies to the whole page."
60110 "name": "MDN Reference",
60111 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/header"
60118 "kind": "markdown",
60119 "value": "The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like."
60124 "name": "MDN Reference",
60125 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/footer"
60132 "kind": "markdown",
60133 "value": "The address element represents the contact information for its nearest article or body element ancestor. If that is the body element, then the contact information applies to the document as a whole."
60138 "name": "MDN Reference",
60139 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/address"
60146 "kind": "markdown",
60147 "value": "The p element represents a paragraph."
60152 "name": "MDN Reference",
60153 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/p"
60160 "kind": "markdown",
60161 "value": "The hr element represents a paragraph-level thematic break, e.g. a scene change in a story, or a transition to another topic within a section of a reference book."
60166 "description": "Sets the alignment of the rule on the page. If no value is specified, the default value is `left`."
60170 "description": "Sets the color of the rule through color name or hexadecimal value."
60174 "description": "Sets the rule to have no shading."
60178 "description": "Sets the height, in pixels, of the rule."
60182 "description": "Sets the length of the rule on the page through a pixel or percentage value."
60187 "name": "MDN Reference",
60188 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/hr"
60195 "kind": "markdown",
60196 "value": "The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements."
60201 "description": "Contains the _preferred_ count of characters that a line should have. It was a non-standard synonym of [`width`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre#attr-width). To achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width \"The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.\") instead."
60205 "description": "Contains the _preferred_ count of characters that a line should have. Though technically still implemented, this attribute has no visual effect; to achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width \"The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.\") instead."
60209 "description": "Is a _hint_ indicating how the overflow must happen. In modern browser this hint is ignored and no visual effect results in its present; to achieve such an effect, use CSS [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space \"The white-space CSS property sets how white space inside an element is handled.\") instead."
60214 "name": "MDN Reference",
60215 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/pre"
60220 "name": "blockquote",
60222 "kind": "markdown",
60223 "value": "The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations."
60229 "kind": "markdown",
60230 "value": "A URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."
60236 "name": "MDN Reference",
60237 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/blockquote"
60244 "kind": "markdown",
60245 "value": "The ol element represents a list of items, where the items have been intentionally ordered, such that changing the order would change the meaning of the document."
60249 "name": "reversed",
60252 "kind": "markdown",
60253 "value": "This Boolean attribute specifies that the items of the list are specified in reversed order."
60259 "kind": "markdown",
60260 "value": "This integer attribute specifies the start value for numbering the individual list items. Although the ordering type of list elements might be Roman numerals, such as XXXI, or letters, the value of start is always represented as a number. To start numbering elements from the letter \"C\", use `<ol start=\"3\">`.\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5."
60267 "kind": "markdown",
60268 "value": "Indicates the numbering type:\n\n* `'a'` indicates lowercase letters,\n* `'A'` indicates uppercase letters,\n* `'i'` indicates lowercase Roman numerals,\n* `'I'` indicates uppercase Roman numerals,\n* and `'1'` indicates numbers (default).\n\nThe type set is used for the entire list unless a different [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li#attr-type) attribute is used within an enclosed [`<li>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li \"The HTML <li> element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.\") element.\n\n**Note:** This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\nUnless the value of the list number matters (e.g. in legal or technical documents where items are to be referenced by their number/letter), the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property should be used instead."
60273 "description": "This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.\n\n**Warning:** Do not use this attribute, as it has been deprecated: the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give an effect similar to the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [`line-height`](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height \"The line-height CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.\") can be used with a value of `80%`."
60278 "name": "MDN Reference",
60279 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/ol"
60286 "kind": "markdown",
60287 "value": "The ul element represents a list of items, where the order of the items is not important — that is, where changing the order would not materially change the meaning of the document."
60292 "description": "This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn't work in all browsers.\n\n**Usage note: **Do not use this attribute, as it has been deprecated: the [`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul \"The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give a similar effect as the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [line-height](https://developer.mozilla.org/en-US/docs/CSS/line-height) can be used with a value of `80%`."
60297 "name": "MDN Reference",
60298 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/ul"
60305 "kind": "markdown",
60306 "value": "The li element represents a list item. If its parent element is an ol, ul, or menu element, then the element is an item of the parent element's list, as defined for those elements. Otherwise, the list item has no defined list-related relationship to any other li element."
60312 "kind": "markdown",
60313 "value": "This integer attribute indicates the current ordinal value of the list item as defined by the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element. The only allowed value for this attribute is a number, even if the list is displayed with Roman numerals or letters. List items that follow this one continue numbering from the value set. The **value** attribute has no meaning for unordered lists ([`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul \"The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.\")) or for menus ([`<menu>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu \"The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.\")).\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\n**Note:** Prior to Gecko 9.0, negative values were incorrectly converted to 0. Starting in Gecko 9.0 all integer values are correctly parsed."
60318 "description": "This character attribute indicates the numbering type:\n\n* `a`: lowercase letters\n* `A`: uppercase letters\n* `i`: lowercase Roman numerals\n* `I`: uppercase Roman numerals\n* `1`: numbers\n\nThis type overrides the one used by its parent [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol \"The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.\") element, if any.\n\n**Usage note:** This attribute has been deprecated: use the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property instead."
60323 "name": "MDN Reference",
60324 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/li"
60331 "kind": "markdown",
60332 "value": "The dl element represents an association list consisting of zero or more name-value groups (a description list). A name-value group consists of one or more names (dt elements) followed by one or more values (dd elements), ignoring any nodes other than dt and dd elements. Within a single dl element, there should not be more than one dt element for each name."
60337 "name": "MDN Reference",
60338 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dl"
60345 "kind": "markdown",
60346 "value": "The dt element represents the term, or name, part of a term-description group in a description list (dl element)."
60351 "name": "MDN Reference",
60352 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dt"
60359 "kind": "markdown",
60360 "value": "The dd element represents the description, definition, or value, part of a term-description group in a description list (dl element)."
60365 "description": "If the value of this attribute is set to `yes`, the definition text will not wrap. The default value is `no`."
60370 "name": "MDN Reference",
60371 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dd"
60378 "kind": "markdown",
60379 "value": "The figure element represents some flow content, optionally with a caption, that is self-contained (like a complete sentence) and is typically referenced as a single unit from the main flow of the document."
60384 "name": "MDN Reference",
60385 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/figure"
60390 "name": "figcaption",
60392 "kind": "markdown",
60393 "value": "The figcaption element represents a caption or legend for the rest of the contents of the figcaption element's parent figure element, if any."
60398 "name": "MDN Reference",
60399 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/figcaption"
60406 "kind": "markdown",
60407 "value": "The main element represents the main content of the body of a document or application. The main content area consists of content that is directly related to or expands upon the central topic of a document or central functionality of an application."
60412 "name": "MDN Reference",
60413 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/main"
60420 "kind": "markdown",
60421 "value": "The div element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements."
60426 "name": "MDN Reference",
60427 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/div"
60434 "kind": "markdown",
60435 "value": "If the a element has an href attribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents."
60441 "kind": "markdown",
60442 "value": "Contains a URL or a URL fragment that the hyperlink points to."
60448 "kind": "markdown",
60449 "value": "Specifies where to display the linked URL. It is a name of, or keyword for, a _browsing context_: a tab, window, or `<iframe>`. The following keywords have special meanings:\n\n* `_self`: Load the URL into the same browsing context as the current one. This is the default behavior.\n* `_blank`: Load the URL into a new browsing context. This is usually a tab, but users can configure browsers to use new windows instead.\n* `_parent`: Load the URL into the parent browsing context of the current one. If there is no parent, this behaves the same way as `_self`.\n* `_top`: Load the URL into the top-level browsing context (that is, the \"highest\" browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this behaves the same way as `_self`.\n\n**Note:** When using `target`, consider adding `rel=\"noreferrer\"` to avoid exploitation of the `window.opener` API.\n\n**Note:** Linking to another page using `target=\"_blank\"` will run the new page on the same process as your page. If the new page is executing expensive JS, your page's performance may suffer. To avoid this use `rel=\"noopener\"`."
60453 "name": "download",
60455 "kind": "markdown",
60456 "value": "This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want). There are no restrictions on allowed values, though `/` and `\\` are converted to underscores. Most file systems limit some punctuation in file names, and browsers will adjust the suggested name accordingly.\n\n**Notes:**\n\n* This attribute only works for [same-origin URLs](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy).\n* Although HTTP(s) URLs need to be in the same-origin, [`blob:` URLs](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL) and [`data:` URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) are allowed so that content generated by JavaScript, such as pictures created in an image-editor Web app, can be downloaded.\n* If the HTTP header [`Content-Disposition:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) gives a different filename than this attribute, the HTTP header takes priority over this attribute.\n* If `Content-Disposition:` is set to `inline`, Firefox prioritizes `Content-Disposition`, like the filename case, while Chrome prioritizes the `download` attribute."
60462 "kind": "markdown",
60463 "value": "Contains a space-separated list of URLs to which, when the hyperlink is followed, [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST \"The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.\") requests with the body `PING` will be sent by the browser (in the background). Typically used for tracking."
60469 "kind": "markdown",
60470 "value": "Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."
60474 "name": "hreflang",
60476 "kind": "markdown",
60477 "value": "This attribute indicates the human language of the linked resource. It is purely advisory, with no built-in functionality. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt \"Tags for Identifying Languages\")."
60483 "kind": "markdown",
60484 "value": "Specifies the media type in the form of a [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type \"MIME type: A MIME type (now properly called \"media type\", but also sometimes \"content type\") is a string sent along with a file indicating the type of the file (describing the content format, for example, a sound file might be labeled audio/ogg, or an image file image/png).\") for the linked URL. It is purely advisory, with no built-in functionality."
60488 "name": "referrerpolicy",
60489 "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) to send when fetching the URL:\n\n* `'no-referrer'` means the `Referer:` header will not be sent.\n* `'no-referrer-when-downgrade'` means no `Referer:` header will be sent when navigating to an origin without HTTPS. This is the default behavior.\n* `'origin'` means the referrer will be the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the page, not including information after the domain.\n* `'origin-when-cross-origin'` meaning that navigations to other origins will be limited to the scheme, the host and the port, while navigations on the same origin will include the referrer's path.\n* `'strict-origin-when-cross-origin'`\n* `'unsafe-url'` means the referrer will include the origin and path, but not the fragment, password, or username. This is unsafe because it can leak data from secure URLs to insecure ones."
60494 "name": "MDN Reference",
60495 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/a"
60502 "kind": "markdown",
60503 "value": "The em element represents stress emphasis of its contents."
60508 "name": "MDN Reference",
60509 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/em"
60516 "kind": "markdown",
60517 "value": "The strong element represents strong importance, seriousness, or urgency for its contents."
60522 "name": "MDN Reference",
60523 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/strong"
60530 "kind": "markdown",
60531 "value": "The small element represents side comments such as small print."
60536 "name": "MDN Reference",
60537 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/small"
60544 "kind": "markdown",
60545 "value": "The s element represents contents that are no longer accurate or no longer relevant."
60550 "name": "MDN Reference",
60551 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/s"
60558 "kind": "markdown",
60559 "value": "The cite element represents a reference to a creative work. It must include the title of the work or the name of the author(person, people or organization) or an URL reference, or a reference in abbreviated form as per the conventions used for the addition of citation metadata."
60564 "name": "MDN Reference",
60565 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/cite"
60572 "kind": "markdown",
60573 "value": "The q element represents some phrasing content quoted from another source."
60579 "kind": "markdown",
60580 "value": "The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."
60586 "name": "MDN Reference",
60587 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/q"
60594 "kind": "markdown",
60595 "value": "The dfn element represents the defining instance of a term. The paragraph, description list group, or section that is the nearest ancestor of the dfn element must also contain the definition(s) for the term given by the dfn element."
60600 "name": "MDN Reference",
60601 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dfn"
60608 "kind": "markdown",
60609 "value": "The abbr element represents an abbreviation or acronym, optionally with its expansion. The title attribute may be used to provide an expansion of the abbreviation. The attribute, if specified, must contain an expansion of the abbreviation, and nothing else."
60614 "name": "MDN Reference",
60615 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/abbr"
60622 "kind": "markdown",
60623 "value": "The ruby element allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations. In Japanese, this form of typography is also known as furigana. Ruby text can appear on either side, and sometimes both sides, of the base text, and it is possible to control its position using CSS. A more complete introduction to ruby can be found in the Use Cases & Exploratory Approaches for Ruby Markup document as well as in CSS Ruby Module Level 1. [RUBY-UC] [CSSRUBY]"
60628 "name": "MDN Reference",
60629 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/ruby"
60636 "kind": "markdown",
60637 "value": "The rb element marks the base text component of a ruby annotation. When it is the child of a ruby element, it doesn't represent anything itself, but its parent ruby element uses it as part of determining what it represents."
60642 "name": "MDN Reference",
60643 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/rb"
60650 "kind": "markdown",
60651 "value": "The rt element marks the ruby text component of a ruby annotation. When it is the child of a ruby element or of an rtc element that is itself the child of a ruby element, it doesn't represent anything itself, but its ancestor ruby element uses it as part of determining what it represents."
60656 "name": "MDN Reference",
60657 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/rt"
60664 "kind": "markdown",
60665 "value": "The rp element is used to provide fallback text to be shown by user agents that don't support ruby annotations. One widespread convention is to provide parentheses around the ruby text component of a ruby annotation."
60670 "name": "MDN Reference",
60671 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/rp"
60678 "kind": "markdown",
60679 "value": "The time element represents its contents, along with a machine-readable form of those contents in the datetime attribute. The kind of content is limited to various kinds of dates, times, time-zone offsets, and durations, as described below."
60683 "name": "datetime",
60685 "kind": "markdown",
60686 "value": "This attribute indicates the time and/or date of the element and must be in one of the formats described below."
60692 "name": "MDN Reference",
60693 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/time"
60700 "kind": "markdown",
60701 "value": "The code element represents a fragment of computer code. This could be an XML element name, a file name, a computer program, or any other string that a computer would recognize."
60706 "name": "MDN Reference",
60707 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/code"
60714 "kind": "markdown",
60715 "value": "The var element represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or just be a term used as a placeholder in prose."
60720 "name": "MDN Reference",
60721 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/var"
60728 "kind": "markdown",
60729 "value": "The samp element represents sample or quoted output from another program or computing system."
60734 "name": "MDN Reference",
60735 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/samp"
60742 "kind": "markdown",
60743 "value": "The kbd element represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands)."
60748 "name": "MDN Reference",
60749 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/kbd"
60756 "kind": "markdown",
60757 "value": "The sub element represents a subscript."
60762 "name": "MDN Reference",
60763 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/sub"
60770 "kind": "markdown",
60771 "value": "The sup element represents a superscript."
60776 "name": "MDN Reference",
60777 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/sup"
60784 "kind": "markdown",
60785 "value": "The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts."
60790 "name": "MDN Reference",
60791 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/i"
60798 "kind": "markdown",
60799 "value": "The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede."
60804 "name": "MDN Reference",
60805 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/b"
60812 "kind": "markdown",
60813 "value": "The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt."
60818 "name": "MDN Reference",
60819 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/u"
60826 "kind": "markdown",
60827 "value": "The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader's attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user's current activity."
60832 "name": "MDN Reference",
60833 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/mark"
60840 "kind": "markdown",
60841 "value": "The bdi element represents a span of text that is to be isolated from its surroundings for the purposes of bidirectional text formatting. [BIDI]"
60846 "name": "MDN Reference",
60847 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/bdi"
60854 "kind": "markdown",
60855 "value": "The bdo element represents explicit text directionality formatting control for its children. It allows authors to override the Unicode bidirectional algorithm by explicitly specifying a direction override. [BIDI]"
60860 "description": "The direction in which text should be rendered in this element's contents. Possible values are:\n\n* `ltr`: Indicates that the text should go in a left-to-right direction.\n* `rtl`: Indicates that the text should go in a right-to-left direction."
60865 "name": "MDN Reference",
60866 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/bdo"
60873 "kind": "markdown",
60874 "value": "The span element doesn't mean anything on its own, but can be useful when used together with the global attributes, e.g. class, lang, or dir. It represents its children."
60879 "name": "MDN Reference",
60880 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/span"
60887 "kind": "markdown",
60888 "value": "The br element represents a line break."
60893 "description": "Indicates where to begin the next line after the break."
60898 "name": "MDN Reference",
60899 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/br"
60906 "kind": "markdown",
60907 "value": "The wbr element represents a line break opportunity."
60912 "name": "MDN Reference",
60913 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/wbr"
60920 "kind": "markdown",
60921 "value": "The ins element represents an addition to the document."
60926 "description": "This attribute defines the URI of a resource that explains the change, such as a link to meeting minutes or a ticket in a troubleshooting system."
60929 "name": "datetime",
60930 "description": "This attribute indicates the time and date of the change and must be a valid date with an optional time string. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\"). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\")."
60935 "name": "MDN Reference",
60936 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/ins"
60943 "kind": "markdown",
60944 "value": "The del element represents a removal from the document."
60950 "kind": "markdown",
60951 "value": "A URI for a resource that explains the change (for example, meeting minutes)."
60955 "name": "datetime",
60957 "kind": "markdown",
60958 "value": "This attribute indicates the time and date of the change and must be a valid date string with an optional time. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\"). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats \"Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.\")."
60964 "name": "MDN Reference",
60965 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/del"
60972 "kind": "markdown",
60973 "value": "The picture element is a container which provides multiple sources to its contained img element to allow authors to declaratively control or give hints to the user agent about which image resource to use, based on the screen pixel density, viewport size, image format, and other factors. It represents its children."
60978 "name": "MDN Reference",
60979 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/picture"
60986 "kind": "markdown",
60987 "value": "An img element represents an image."
60993 "kind": "markdown",
60994 "value": "This attribute defines an alternative text description of the image.\n\n**Note:** Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with visual impairments), if the user chooses not to display images, or if the browser cannot display the image because it is invalid or an [unsupported type](#Supported_image_formats). In these cases, the browser may replace the image with the text defined in this element's `alt` attribute. You should, for these reasons and others, provide a useful value for `alt` whenever possible.\n\n**Note:** Omitting this attribute altogether indicates that the image is a key part of the content, and no textual equivalent is available. Setting this attribute to an empty string (`alt=\"\"`) indicates that this image is _not_ a key part of the content (decorative), and that non-visual browsers may omit it from rendering."
61000 "kind": "markdown",
61001 "value": "The image URL. This attribute is mandatory for the `<img>` element. On browsers supporting `srcset`, `src` is treated like a candidate image with a pixel density descriptor `1x` unless an image with this pixel density descriptor is already defined in `srcset,` or unless `srcset` contains '`w`' descriptors."
61007 "kind": "markdown",
61008 "value": "A list of one or more strings separated by commas indicating a set of possible image sources for the user agent to use. Each string is composed of:\n\n1. a URL to an image,\n2. optionally, whitespace followed by one of:\n * A width descriptor, or a positive integer directly followed by '`w`'. The width descriptor is divided by the source size given in the `sizes` attribute to calculate the effective pixel density.\n * A pixel density descriptor, which is a positive floating point number directly followed by '`x`'.\n\nIf no descriptor is specified, the source is assigned the default descriptor: `1x`.\n\nIt is incorrect to mix width descriptors and pixel density descriptors in the same `srcset` attribute. Duplicate descriptors (for instance, two sources in the same `srcset` which are both described with '`2x`') are also invalid.\n\nThe user agent selects any one of the available sources at its discretion. This provides them with significant leeway to tailor their selection based on things like user preferences or bandwidth conditions. See our [Responsive images](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) tutorial for an example."
61012 "name": "crossorigin",
61015 "kind": "markdown",
61016 "value": "This enumerated attribute indicates if the fetching of the related image must be done using CORS or not. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being \"[tainted](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image#What_is_a_tainted_canvas).\" The allowed values are:"
61022 "kind": "markdown",
61023 "value": "The partial URL (starting with '#') of an [image map](https://developer.mozilla.org/en-US/docs/HTML/Element/map) associated with the element.\n\n**Note:** You cannot use this attribute if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") element."
61030 "kind": "markdown",
61031 "value": "This Boolean attribute indicates that the image is part of a server-side map. If so, the precise coordinates of a click are sent to the server.\n\n**Note:** This attribute is allowed only if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\") element with a valid [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute."
61037 "kind": "markdown",
61038 "value": "The intrinsic width of the image in pixels."
61044 "kind": "markdown",
61045 "value": "The intrinsic height of the image in pixels."
61049 "name": "decoding",
61050 "description": "Provides an image decoding hint to the browser. The allowed values are:"
61053 "name": "decoding",
61054 "description": "`sync`\n\nDecode the image synchronously for atomic presentation with other content.\n\n`async`\n\nDecode the image asynchronously to reduce delay in presenting other content.\n\n`auto`\n\nDefault mode, which indicates no preference for the decoding mode. The browser decides what is best for the user."
61057 "name": "importance",
61058 "description": "Indicates the relative importance of the resource. Priority hints are delegated using the values:"
61061 "name": "importance",
61062 "description": "`auto`: Indicates **no preference**. The browser may use its own heuristics to decide the priority of the image.\n\n`high`: Indicates to the browser that the image is of **high** priority.\n\n`low`: Indicates to the browser that the image is of **low** priority."
61065 "name": "intrinsicsize",
61066 "description": "This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it’s the size specified in the attribute. Specifically, the image would raster at these dimensions and `naturalWidth`/`naturalHeight` on images would return the values specified in this attribute. [Explainer](https://github.com/ojanvafai/intrinsicsize-attribute), [examples](https://googlechrome.github.io/samples/intrinsic-size/index.html)"
61069 "name": "referrerpolicy",
61070 "description": "A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer:` The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade:` No `Referer` header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent’s default behavior if no policy is otherwise specified.\n* `origin:` The `Referer` header will include the page of origin's scheme, the host, and the port.\n* `origin-when-cross-origin:` Navigating to other origins will limit the included referral data to the scheme, the host and the port, while navigating from the same origin will include the referrer's full path.\n* `unsafe-url:` The `Referer` header will include the origin and the path, but not the fragment, password, or username. This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins."
61074 "description": "A list of one or more strings separated by commas indicating a set of source sizes. Each source size consists of:\n\n1. a media condition. This must be omitted for the last item.\n2. a source size value.\n\nSource size values specify the intended display size of the image. User agents use the current source size to select one of the sources supplied by the `srcset` attribute, when those sources are described using width ('`w`') descriptors. The selected source size affects the intrinsic size of the image (the image’s display size if no CSS styling is applied). If the `srcset` attribute is absent, or contains no values with a width (`w`) descriptor, then the `sizes` attribute has no effect."
61079 "name": "MDN Reference",
61080 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/img"
61087 "kind": "markdown",
61088 "value": "The iframe element represents a nested browsing context."
61094 "kind": "markdown",
61095 "value": "The URL of the page to embed. Use a value of `about:blank` to embed an empty page that conforms to the [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Inherited_origins). Also note that programatically removing an `<iframe>`'s src attribute (e.g. via [`Element.removeAttribute()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute \"The Element method removeAttribute() removes the attribute with the specified name from the element.\")) causes `about:blank` to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS."
61101 "kind": "markdown",
61102 "value": "Inline HTML to embed, overriding the `src` attribute. If a browser does not support the `srcdoc` attribute, it will fall back to the URL in the `src` attribute."
61108 "kind": "markdown",
61109 "value": "A targetable name for the embedded browsing context. This can be used in the `target` attribute of the [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a \"The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.\"), [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\"), or [`<base>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base \"The HTML <base> element specifies the base URL to use for all relative URLs contained within a document. There can be only one <base> element in a document.\") elements; the `formtarget` attribute of the [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") elements; or the `windowName` parameter in the [`window.open()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open \"The Window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name. If the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing context.\") method."
61116 "kind": "markdown",
61117 "value": "Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:\n\n* `allow-forms`: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.\n* `allow-modals`: Lets the resource [open modal windows](https://html.spec.whatwg.org/multipage/origin.html#sandboxed-modals-flag).\n* `allow-orientation-lock`: Lets the resource [lock the screen orientation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation).\n* `allow-pointer-lock`: Lets the resource use the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock).\n* `allow-popups`: Allows popups (such as `window.open()`, `target=\"_blank\"`, or `showModalDialog()`). If this keyword is not used, the popup will silently fail to open.\n* `allow-popups-to-escape-sandbox`: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.\n* `allow-presentation`: Lets the resource start a [presentation session](https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest).\n* `allow-same-origin`: If this token is not used, the resource is treated as being from a special origin that always fails the [same-origin policy](https://developer.mozilla.org/en-US/docs/Glossary/same-origin_policy \"same-origin policy: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\").\n* `allow-scripts`: Lets the resource run scripts (but not create popup windows).\n* `allow-storage-access-by-user-activation` : Lets the resource request access to the parent's storage capabilities with the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).\n* `allow-top-navigation`: Lets the resource navigate the top-level browsing context (the one named `_top`).\n* `allow-top-navigation-by-user-activation`: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.\n\n**Notes about sandboxing:**\n\n* When the embedded document has the same origin as the embedding page, it is **strongly discouraged** to use both `allow-scripts` and `allow-same-origin`, as that lets the embedded document remove the `sandbox` attribute — making it no more secure than not using the `sandbox` attribute at all.\n* Sandboxing is useless if the attacker can display content outside a sandboxed `iframe` — such as if the viewer opens the frame in a new tab. Such content should be also served from a _separate origin_ to limit potential damage.\n* The `sandbox` attribute is unsupported in Internet Explorer 9 and earlier."
61121 "name": "seamless",
61125 "name": "allowfullscreen",
61128 "kind": "markdown",
61129 "value": "Set to `true` if the `<iframe>` can activate fullscreen mode by calling the [`requestFullscreen()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen \"The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed in full-screen mode.\") method."
61135 "kind": "markdown",
61136 "value": "The width of the frame in CSS pixels. Default is `300`."
61142 "kind": "markdown",
61143 "value": "The height of the frame in CSS pixels. Default is `150`."
61148 "description": "Specifies a [feature policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy) for the `<iframe>`."
61151 "name": "allowpaymentrequest",
61152 "description": "Set to `true` if a cross-origin `<iframe>` should be allowed to invoke the [Payment Request API](https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API)."
61155 "name": "allowpaymentrequest",
61156 "description": "This attribute is considered a legacy attribute and redefined as `allow=\"payment\"`."
61160 "description": "A [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) enforced for the embedded resource. See [`HTMLIFrameElement.csp`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/csp \"The csp property of the HTMLIFrameElement interface specifies the Content Security Policy that an embedded document must agree to enforce upon itself.\") for details."
61163 "name": "importance",
61164 "description": "The download priority of the resource in the `<iframe>`'s `src` attribute. Allowed values:\n\n`auto` (default)\n\nNo preference. The browser uses its own heuristics to decide the priority of the resource.\n\n`high`\n\nThe resource should be downloaded before other lower-priority page resources.\n\n`low`\n\nThe resource should be downloaded after other higher-priority page resources."
61167 "name": "referrerpolicy",
61168 "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the frame's resource:\n\n* `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin \"origin: Web content's origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.\")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS \"TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.\") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS \"HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.\")).\n* `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host \"host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails.\"), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port \"port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.\").\n* `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n* `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy \"same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\"), but cross-origin requests will contain no referrer information.\n* `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).\n* `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).\n* `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins."
61173 "name": "MDN Reference",
61174 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/iframe"
61181 "kind": "markdown",
61182 "value": "The embed element provides an integration point for an external (typically non-HTML) application or interactive content."
61188 "kind": "markdown",
61189 "value": "The URL of the resource being embedded."
61195 "kind": "markdown",
61196 "value": "The MIME type to use to select the plug-in to instantiate."
61202 "kind": "markdown",
61203 "value": "The displayed width of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."
61209 "kind": "markdown",
61210 "value": "The displayed height of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."
61216 "name": "MDN Reference",
61217 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/embed"
61224 "kind": "markdown",
61225 "value": "The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin."
61231 "kind": "markdown",
61232 "value": "The address of the resource as a valid URL. At least one of **data** and **type** must be defined."
61238 "kind": "markdown",
61239 "value": "The [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource specified by **data**. At least one of **data** and **type** must be defined."
61243 "name": "typemustmatch",
61246 "kind": "markdown",
61247 "value": "This Boolean attribute indicates if the **type** attribute and the actual [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource must match to be used."
61253 "kind": "markdown",
61254 "value": "The name of valid browsing context (HTML5), or the name of the control (HTML 4)."
61260 "kind": "markdown",
61261 "value": "A hash-name reference to a [`<map>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map \"The HTML <map> element is used with <area> elements to define an image map (a clickable link area).\") element; that is a '#' followed by the value of a [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map#attr-name) of a map element."
61267 "kind": "markdown",
61268 "value": "The form element, if any, that the object element is associated with (its _form owner_). The value of the attribute must be an ID of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document."
61274 "kind": "markdown",
61275 "value": "The width of the display resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"
61281 "kind": "markdown",
61282 "value": "The height of the displayed resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"
61287 "description": "A space-separated list of URIs for archives of resources for the object."
61291 "description": "The width of a border around the control, in pixels."
61295 "description": "The URI of the object's implementation. It can be used together with, or in place of, the **data** attribute."
61298 "name": "codebase",
61299 "description": "The base path used to resolve relative URIs specified by **classid**, **data**, or **archive**. If not specified, the default is the base URI of the current document."
61302 "name": "codetype",
61303 "description": "The content type of the data specified by **classid**."
61307 "description": "The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent `<object>` element. In HTML5, repeat the <object> element completely each that that the resource is reused."
61311 "description": "A message that the browser can show while loading the object's implementation and data."
61314 "name": "tabindex",
61315 "description": "The position of the element in the tabbing navigation order for the current document."
61320 "name": "MDN Reference",
61321 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/object"
61328 "kind": "markdown",
61329 "value": "The param element defines parameters for plugins invoked by object elements. It does not represent anything on its own."
61335 "kind": "markdown",
61336 "value": "Name of the parameter."
61342 "kind": "markdown",
61343 "value": "Specifies the value of the parameter."
61348 "description": "Only used if the `valuetype` is set to \"ref\". Specifies the MIME type of values found at the URI specified by value."
61351 "name": "valuetype",
61352 "description": "Specifies the type of the `value` attribute. Possible values are:\n\n* data: Default value. The value is passed to the object's implementation as a string.\n* ref: The value is a URI to a resource where run-time values are stored.\n* object: An ID of another [`<object>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object \"The HTML <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.\") in the same document."
61357 "name": "MDN Reference",
61358 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/param"
61365 "kind": "markdown",
61366 "value": "A video element is used for playing videos or movies, and audio files with captions."
61373 "name": "crossorigin",
61384 "name": "autoplay",
61387 "kind": "markdown",
61388 "value": "A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data."
61392 "name": "mediagroup"
61403 "name": "controls",
61415 "name": "MDN Reference",
61416 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/video"
61423 "kind": "markdown",
61424 "value": "An audio element represents a sound or audio stream."
61430 "kind": "markdown",
61431 "value": "The URL of the audio to embed. This is subject to [HTTP access controls](https://developer.mozilla.org/en-US/docs/HTTP_access_control). This is optional; you may instead use the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element within the audio block to specify the audio to embed."
61435 "name": "crossorigin",
61438 "kind": "markdown",
61439 "value": "This enumerated attribute indicates whether to use CORS to fetch the related image. [CORS-enabled resources](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") element without being _tainted_. The allowed values are:\n\nanonymous\n\nSends a cross-origin request without a credential. In other words, it sends the `Origin:` HTTP header without a cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the `Access-Control-Allow-Origin:` HTTP header), the image will be _tainted_, and its usage restricted.\n\nuse-credentials\n\nSends a cross-origin request with a credential. In other words, it sends the `Origin:` HTTP header with a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through `Access-Control-Allow-Credentials:` HTTP header), the image will be _tainted_ and its usage restricted.\n\nWhen not present, the resource is fetched without a CORS request (i.e. without sending the `Origin:` HTTP header), preventing its non-tainted used in [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas \"Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.\") elements. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes) for additional information."
61446 "kind": "markdown",
61447 "value": "This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:\n\n* `none`: Indicates that the audio should not be preloaded.\n* `metadata`: Indicates that only audio metadata (e.g. length) is fetched.\n* `auto`: Indicates that the whole audio file can be downloaded, even if the user is not expected to use it.\n* _empty string_: A synonym of the `auto` value.\n\nIf not set, `preload`'s default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to `metadata`.\n\n**Usage notes:**\n\n* The `autoplay` attribute has precedence over `preload`. If `autoplay` is specified, the browser would obviously need to start downloading the audio for playback.\n* The browser is not forced by the specification to follow the value of this attribute; it is a mere hint."
61451 "name": "autoplay",
61454 "kind": "markdown",
61455 "value": "A Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.\n\n**Note**: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control."
61459 "name": "mediagroup"
61465 "kind": "markdown",
61466 "value": "A Boolean attribute: if specified, the audio player will automatically seek back to the start upon reaching the end of the audio."
61473 "kind": "markdown",
61474 "value": "A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is `false`."
61478 "name": "controls",
61481 "kind": "markdown",
61482 "value": "If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback."
61488 "name": "MDN Reference",
61489 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/audio"
61496 "kind": "markdown",
61497 "value": "The source element allows authors to specify multiple alternative media resources for media elements. It does not represent anything on its own."
61503 "kind": "markdown",
61504 "value": "Required for [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio \"The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.\") and [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video \"The HTML Video element (<video>) embeds a media player which supports video playback into the document.\"), address of the media resource. The value of this attribute is ignored when the `<source>` element is placed inside a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
61510 "kind": "markdown",
61511 "value": "The MIME-type of the resource, optionally with a `codecs` parameter. See [RFC 4281](https://tools.ietf.org/html/rfc4281) for information about how to specify codecs."
61516 "description": "Is a list of source sizes that describes the final rendered width of the image represented by the source. Each source size consists of a comma-separated list of media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in [`srcset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset) to use. \nThe `sizes` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
61520 "description": "A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of:\n\n1. one URL to an image,\n2. a width descriptor, that is a positive integer directly followed by `'w'`. The default value, if missing, is the infinity.\n3. a pixel density descriptor, that is a positive floating number directly followed by `'x'`. The default value, if missing, is `1x`.\n\nEach string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor. \nThe browser chooses the most adequate image to display at a given point of time. \nThe `srcset` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
61524 "description": "[Media query](https://developer.mozilla.org/en-US/docs/CSS/Media_queries) of the resource's intended media; this should be used only in a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."
61529 "name": "MDN Reference",
61530 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/source"
61537 "kind": "markdown",
61538 "value": "The track element allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own."
61545 "kind": "markdown",
61546 "value": "This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one `track` element per media element."
61553 "kind": "markdown",
61554 "value": "How the text track is meant to be used. If omitted the default kind is `subtitles`. If the attribute is not present, it will use the `subtitles`. If the attribute contains an invalid value, it will use `metadata`. (Versions of Chrome earlier than 52 treated an invalid value as `subtitles`.) The following keywords are allowed:\n\n* `subtitles`\n * Subtitles provide translation of content that cannot be understood by the viewer. For example dialogue or text that is not English in an English language film.\n * Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene.\n* `captions`\n * Closed captions provide a transcription and possibly a translation of audio.\n * It may include important non-verbal information such as music cues or sound effects. It may indicate the cue's source (e.g. music, text, character).\n * Suitable for users who are deaf or when the sound is muted.\n* `descriptions`\n * Textual description of the video content.\n * Suitable for users who are blind or where the video cannot be seen.\n* `chapters`\n * Chapter titles are intended to be used when the user is navigating the media resource.\n* `metadata`\n * Tracks used by scripts. Not visible to the user."
61560 "kind": "markdown",
61561 "value": "A user-readable title of the text track which is used by the browser when listing available text tracks."
61567 "kind": "markdown",
61568 "value": "Address of the track (`.vtt` file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio \"The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.\") or [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video \"The HTML Video element (<video>) embeds a media player which supports video playback into the document.\") parent element of the `track` element has a [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute."
61574 "kind": "markdown",
61575 "value": "Language of the track text data. It must be a valid [BCP 47](https://r12a.github.io/app-subtags/) language tag. If the `kind` attribute is set to `subtitles,` then `srclang` must be defined."
61581 "name": "MDN Reference",
61582 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/track"
61589 "kind": "markdown",
61590 "value": "The map element, in conjunction with an img element and any area element descendants, defines an image map. The element represents its children."
61596 "kind": "markdown",
61597 "value": "The name attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no space characters. The value of the name attribute must not be a compatibility-caseless match for the value of the name attribute of another map element in the same document. If the id attribute is also specified, both attributes must have the same value."
61603 "name": "MDN Reference",
61604 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/map"
61611 "kind": "markdown",
61612 "value": "The area element represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map."
61647 "name": "accesskey",
61648 "description": "Specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified character selects the form control correlated with that key sequence. Page designers are forewarned to avoid key sequences already bound to browsers. This attribute is global since HTML5."
61653 "name": "MDN Reference",
61654 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/area"
61661 "kind": "markdown",
61662 "value": "The table element represents data with more than one dimension, in the form of a table."
61670 "description": "This enumerated attribute indicates how the table must be aligned inside the containing document. It may have the following values:\n\n* left: the table is displayed on the left side of the document;\n* center: the table is displayed in the center of the document;\n* right: the table is displayed on the right side of the document.\n\n**Usage Note**\n\n* **Do not use this attribute**, as it has been deprecated. The [`<table>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table \"The HTML <table> element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). Set [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left \"The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") and [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right \"The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.\") to `auto` or [`margin`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin \"The margin CSS property sets the margin area on all four sides of an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.\") to `0 auto` to achieve an effect that is similar to the align attribute.\n* Prior to Firefox 4, Firefox also supported the `middle`, `absmiddle`, and `abscenter` values as synonyms of `center`, in quirks mode only."
61675 "name": "MDN Reference",
61676 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/table"
61683 "kind": "markdown",
61684 "value": "The caption element represents the title of the table that is its parent, if it has a parent and that is a table element."
61689 "description": "This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have one of the following values:\n\n`left`\n\nThe caption is displayed to the left of the table.\n\n`top`\n\nThe caption is displayed above the table.\n\n`right`\n\nThe caption is displayed to the right of the table.\n\n`bottom`\n\nThe caption is displayed below the table.\n\n**Usage note:** Do not use this attribute, as it has been deprecated. The [`<caption>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption \"The HTML Table Caption element (<caption>) specifies the caption (or title) of a table, and if used is always the first child of a <table>.\") element should be styled using the [CSS](https://developer.mozilla.org/en-US/docs/CSS) properties [`caption-side`](https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side \"The caption-side CSS property puts the content of a table's <caption> on the specified side. The values are relative to the writing-mode of the table.\") and [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\")."
61694 "name": "MDN Reference",
61695 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/caption"
61700 "name": "colgroup",
61702 "kind": "markdown",
61703 "value": "The colgroup element represents a group of one or more columns in the table that is its parent, if it has a parent and that is a table element."
61711 "description": "This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed. The descendant [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") elements may override this value using their own [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-align) attribute.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n * Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on a selector giving a [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") elements are not descendant of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element, they won't inherit it.\n * If the table doesn't use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use one `td:nth-child(an+b)` CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of this column in the table. Only after this selector the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property can be used.\n * If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
61716 "name": "MDN Reference",
61717 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/colgroup"
61724 "kind": "markdown",
61725 "value": "If a col element has a parent and that is a colgroup element that itself has a parent that is a table element, then the col element represents one or more columns in the column group represented by that colgroup."
61733 "description": "This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, its value is inherited from the [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-align) of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup \"The HTML <colgroup> element defines a group of columns within a table.\") element this `<col>` element belongs too. If there are none, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n * Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on a selector giving a [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") elements are not descendant of the [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col \"The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.\") element, they won't inherit it.\n * If the table doesn't use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use the `td:nth-child(an+b)` CSS selector. Set `a` to zero and `b` to the position of the column in the table, e.g. `td:nth-child(2) { text-align: right; }` to right-align the second column.\n * If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
61738 "name": "MDN Reference",
61739 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/col"
61746 "kind": "markdown",
61747 "value": "The tbody element represents a block of rows that consist of a body of data for the parent table element, if the tbody element has a parent and it is a table."
61752 "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes.\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
61757 "name": "MDN Reference",
61758 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/tbody"
61765 "kind": "markdown",
61766 "value": "The thead element represents the block of rows that consist of the column labels (headers) for the parent table element, if the thead element has a parent and it is a table."
61771 "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
61776 "name": "MDN Reference",
61777 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/thead"
61784 "kind": "markdown",
61785 "value": "The tfoot element represents the block of rows that consist of the column summaries (footers) for the parent table element, if the tfoot element has a parent and it is a table."
61790 "description": "This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property Unimplemented."
61795 "name": "MDN Reference",
61796 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/tfoot"
61803 "kind": "markdown",
61804 "value": "The tr element represents a row of cells in a table."
61809 "description": "A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString \"DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.\") which specifies how the cell's context should be aligned horizontally within the cells in the row; this is shorthand for using `align` on every cell in the row individually. Possible values are:\n\n`left`\n\nAlign the content of each cell at its left edge.\n\n`center`\n\nCenter the contents of each cell between their left and right edges.\n\n`right`\n\nAlign the content of each cell at its right edge.\n\n`justify`\n\nWiden whitespaces within the text of each cell so that the text fills the full width of each cell (full justification).\n\n`char`\n\nAlign each cell in the row on a specific character (such that each row in the column that is configured this way will horizontally align its cells on that character). This uses the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-charoff) to establish the alignment character (typically \".\" or \",\" when aligning numerical data) and the number of characters that should follow the alignment character. This alignment type was never widely supported.\n\nIf no value is expressly set for `align`, the parent node's value is inherited.\n\nInstead of using the obsolete `align` attribute, you should instead use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to establish `left`, `center`, `right`, or `justify` alignment for the row's cells. To apply character-based alignment, set the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the alignment character (such as `\".\"` or `\",\"`)."
61814 "name": "MDN Reference",
61815 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/tr"
61822 "kind": "markdown",
61823 "value": "The td element represents a data cell in a table."
61837 "description": "This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard. Alternatively, you can put the abbreviated description inside the cell and place the long content in the **title** attribute."
61841 "description": "This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:\n\n* `left`: The content is aligned to the left of the cell.\n* `center`: The content is centered in the cell.\n* `right`: The content is aligned to the right of the cell.\n* `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n* `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-charoff) attributes Unimplemented (see [bug 2212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 \"character alignment not implemented (align=char, charoff=, text-align:<string>)\")).\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the element.\n* To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char). Unimplemented in CSS3."
61845 "description": "This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard."
61849 "description": "This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:\n\n \n\n`black` = \"#000000\"\n\n \n\n`green` = \"#008000\"\n\n \n\n`silver` = \"#C0C0C0\"\n\n \n\n`lime` = \"#00FF00\"\n\n \n\n`gray` = \"#808080\"\n\n \n\n`olive` = \"#808000\"\n\n \n\n`white` = \"#FFFFFF\"\n\n \n\n`yellow` = \"#FFFF00\"\n\n \n\n`maroon` = \"#800000\"\n\n \n\n`navy` = \"#000080\"\n\n \n\n`red` = \"#FF0000\"\n\n \n\n`blue` = \"#0000FF\"\n\n \n\n`purple` = \"#800080\"\n\n \n\n`teal` = \"#008080\"\n\n \n\n`fuchsia` = \"#FF00FF\"\n\n \n\n`aqua` = \"#00FFFF\"\n\n**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td \"The HTML <td> element defines a cell of a table that contains data. It participates in the table model.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To create a similar effect use the [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property in [CSS](https://developer.mozilla.org/en-US/docs/CSS) instead."
61854 "name": "MDN Reference",
61855 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/td"
61862 "kind": "markdown",
61863 "value": "The th element represents a header cell in a table."
61885 "kind": "markdown",
61886 "value": "This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself."
61891 "description": "This enumerated attribute specifies how the cell content's horizontal alignment will be handled. Possible values are:\n\n* `left`: The content is aligned to the left of the cell.\n* `center`: The content is centered in the cell.\n* `right`: The content is aligned to the right of the cell.\n* `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n* `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-charoff) attributes.\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property to the element.\n* To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align \"The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.\") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char). Unimplemented in CSS3."
61895 "description": "This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard: use the [`scope`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-scope) attribute instead."
61899 "description": "This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings:\n\n \n\n`black` = \"#000000\"\n\n \n\n`green` = \"#008000\"\n\n \n\n`silver` = \"#C0C0C0\"\n\n \n\n`lime` = \"#00FF00\"\n\n \n\n`gray` = \"#808080\"\n\n \n\n`olive` = \"#808000\"\n\n \n\n`white` = \"#FFFFFF\"\n\n \n\n`yellow` = \"#FFFF00\"\n\n \n\n`maroon` = \"#800000\"\n\n \n\n`navy` = \"#000080\"\n\n \n\n`red` = \"#FF0000\"\n\n \n\n`blue` = \"#0000FF\"\n\n \n\n`purple` = \"#800080\"\n\n \n\n`teal` = \"#008080\"\n\n \n\n`fuchsia` = \"#FF00FF\"\n\n \n\n`aqua` = \"#00FFFF\"\n\n**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [`<th>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th \"The HTML <th> element defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.\") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS). To create a similar effect use the [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color \"The background-color CSS property sets the background color of an element.\") property in [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) instead."
61904 "name": "MDN Reference",
61905 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/th"
61912 "kind": "markdown",
61913 "value": "The form element represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing."
61917 "name": "accept-charset",
61919 "kind": "markdown",
61920 "value": "A space- or comma-delimited list of character encodings that the server accepts. The browser uses them in the order in which they are listed. The default value, the reserved string `\"UNKNOWN\"`, indicates the same encoding as that of the document containing the form element. \nIn previous versions of HTML, the different character encodings could be delimited by spaces or commas. In HTML5, only spaces are allowed as delimiters."
61926 "kind": "markdown",
61927 "value": "The URI of a program that processes the form information. This value can be overridden by a [`formaction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formaction) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
61931 "name": "autocomplete",
61934 "kind": "markdown",
61935 "value": "Indicates whether input elements can by default have their values automatically completed by the browser. This setting can be overridden by an `autocomplete` attribute on an element belonging to the form. Possible values are:\n\n* `off`: The user must explicitly enter a value into each field for every use, or the document provides its own auto-completion method; the browser does not automatically complete entries.\n* `on`: The browser can automatically complete values based on values that the user has previously entered in the form.\n\nFor most modern browsers (including Firefox 38+, Google Chrome 34+, IE 11+) setting the autocomplete attribute will not prevent a browser's password manager from asking the user if they want to store login fields (username and password), if the user permits the storage the browser will autofill the login the next time the user visits the page. See [The autocomplete attribute and login fields](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields)."
61942 "kind": "markdown",
61943 "value": "When the value of the `method` attribute is `post`, enctype is the [MIME type](https://en.wikipedia.org/wiki/Mime_type) of content that is used to submit the form to the server. Possible values are:\n\n* `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n* `multipart/form-data`: The value used for an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element with the `type` attribute set to \"file\".\n* `text/plain`: (HTML5)\n\nThis value can be overridden by a [`formenctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formenctype) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
61950 "kind": "markdown",
61951 "value": "The [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) method that the browser uses to submit the form. Possible values are:\n\n* `post`: Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5) ; form data are included in the body of the form and sent to the server.\n* `get`: Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n* `dialog`: Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog \"The HTML <dialog> element represents a dialog box or other interactive component, such as an inspector or window.\") element to close the dialog when submitted.\n\nThis value can be overridden by a [`formmethod`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formmethod) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
61957 "kind": "markdown",
61958 "value": "The name of the form. In HTML 4, its use is deprecated (`id` should be used instead). It must be unique among the forms in a document and not just an empty string in HTML 5."
61962 "name": "novalidate",
61965 "kind": "markdown",
61966 "value": "This Boolean attribute indicates that the form is not to be validated when submitted. If this attribute is not specified (and therefore the form is validated), this default setting can be overridden by a [`formnovalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formnovalidate) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element belonging to the form."
61972 "kind": "markdown",
61973 "value": "A name or keyword indicating where to display the response that is received after submitting the form. In HTML 4, this is the name/keyword for a frame. In HTML5, it is a name/keyword for a _browsing context_ (for example, tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the response into the same HTML 4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the response into a new unnamed HTML 4 window or HTML5 browsing context.\n* `_parent`: Load the response into the HTML 4 frameset parent of the current frame, or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: HTML 4: Load the response into the full original window, and cancel all other frames. HTML5: Load the response into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n* _iframename_: The response is displayed in a named [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe \"The HTML Inline Frame element (<iframe>) represents a nested browsing context, embedding another HTML page into the current one.\").\n\nHTML5: This value can be overridden by a [`formtarget`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formtarget) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
61978 "description": "A comma-separated list of content types that the server accepts.\n\n**Usage note:** This attribute has been removed in HTML5 and should no longer be used. Instead, use the [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) attribute of the specific [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element."
61981 "name": "autocapitalize",
61982 "description": "This is a nonstandard attribute used by iOS Safari Mobile which controls whether and how the text value for textual form control descendants should be automatically capitalized as it is entered/edited by the user. If the `autocapitalize` attribute is specified on an individual form control descendant, it trumps the form-wide `autocapitalize` setting. The non-deprecated values are available in iOS 5 and later. The default value is `sentences`. Possible values are:\n\n* `none`: Completely disables automatic capitalization\n* `sentences`: Automatically capitalize the first letter of sentences.\n* `words`: Automatically capitalize the first letter of words.\n* `characters`: Automatically capitalize all characters.\n* `on`: Deprecated since iOS 5.\n* `off`: Deprecated since iOS 5."
61987 "name": "MDN Reference",
61988 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/form"
61995 "kind": "markdown",
61996 "value": "The label element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label element's labeled control, either using the for attribute, or by putting the form control inside the label element itself."
62002 "kind": "markdown",
62003 "value": "The [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element with which the label is associated (its _form owner_). If specified, the value of the attribute is the `id` of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document. This lets you place label elements anywhere within a document, not just as descendants of their form elements."
62009 "kind": "markdown",
62010 "value": "The [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-id) of a [labelable](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Form_labelable) form-related element in the same document as the `<label>` element. The first element in the document with an `id` matching the value of the `for` attribute is the _labeled control_ for this label element, if it is a labelable element. If it is not labelable then the `for` attribute has no effect. If there are other elements which also match the `id` value, later in the document, they are not considered.\n\n**Note**: A `<label>` element can have both a `for` attribute and a contained control element, as long as the `for` attribute points to the contained control element."
62016 "name": "MDN Reference",
62017 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/label"
62024 "kind": "markdown",
62025 "value": "The input element represents a typed data field, usually with a form control to allow the user to edit the data."
62035 "name": "autocomplete",
62036 "valueSet": "inputautocomplete"
62039 "name": "autofocus",
62050 "name": "disabled",
62057 "name": "formaction"
62060 "name": "formenctype",
62064 "name": "formmethod",
62068 "name": "formnovalidate",
62072 "name": "formtarget"
62078 "name": "inputmode",
62088 "name": "maxlength"
62094 "name": "minlength"
62097 "name": "multiple",
62107 "name": "placeholder"
62110 "name": "readonly",
62114 "name": "required",
62139 "name": "MDN Reference",
62140 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/input"
62147 "kind": "markdown",
62148 "value": "The button element represents a button labeled by its contents."
62152 "name": "autofocus",
62155 "kind": "markdown",
62156 "value": "This Boolean attribute lets you specify that the button should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified."
62160 "name": "disabled",
62163 "kind": "markdown",
62164 "value": "This Boolean attribute indicates that the user cannot interact with the button. If this attribute is not specified, the button inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset \"The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.\"); if there is no containing element with the **disabled** attribute set, then the button is enabled.\n\nFirefox will, unlike other browsers, by default, [persist the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") across page loads. Use the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-autocomplete) attribute to control this feature."
62170 "kind": "markdown",
62171 "value": "The form element that the button is associated with (its _form owner_). The value of the attribute must be the **id** attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element in the same document. If this attribute is not specified, the `<button>` element will be associated to an ancestor [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element, if one exists. This attribute enables you to associate `<button>` elements to [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") elements anywhere within a document, not just as descendants of [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") elements."
62175 "name": "formaction",
62177 "kind": "markdown",
62178 "value": "The URI of a program that processes the information submitted by the button. If specified, it overrides the [`action`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-action) attribute of the button's form owner."
62182 "name": "formenctype",
62185 "kind": "markdown",
62186 "value": "If the button is a submit button, this attribute specifies the type of content that is used to submit the form to the server. Possible values are:\n\n* `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n* `multipart/form-data`: Use this value if you are using an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") element with the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type) attribute set to `file`.\n* `text/plain`\n\nIf this attribute is specified, it overrides the [`enctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-enctype) attribute of the button's form owner."
62190 "name": "formmethod",
62193 "kind": "markdown",
62194 "value": "If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:\n\n* `post`: The data from the form are included in the body of the form and sent to the server.\n* `get`: The data from the form are appended to the **form** attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n\nIf specified, this attribute overrides the [`method`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method) attribute of the button's form owner."
62198 "name": "formnovalidate",
62201 "kind": "markdown",
62202 "value": "If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the [`novalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-novalidate) attribute of the button's form owner."
62206 "name": "formtarget",
62208 "kind": "markdown",
62209 "value": "If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a _browsing context_ (for example, tab, window, or inline frame). If this attribute is specified, it overrides the [`target`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-target) attribute of the button's form owner. The following keywords have special meanings:\n\n* `_self`: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the response into a new unnamed browsing context.\n* `_parent`: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`."
62215 "kind": "markdown",
62216 "value": "The name of the button, which is submitted with the form data."
62223 "kind": "markdown",
62224 "value": "The type of the button. Possible values are:\n\n* `submit`: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.\n* `reset`: The button resets all the controls to their initial values.\n* `button`: The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur."
62230 "kind": "markdown",
62231 "value": "The initial value of the button. It defines the value associated with the button which is submitted with the form data. This value is passed to the server in params when the form is submitted."
62235 "name": "autocomplete",
62236 "description": "The use of this attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") is nonstandard and Firefox-specific. By default, unlike other browsers, [Firefox persists the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button \"The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.\") across page loads. Setting the value of this attribute to `off` (i.e. `autocomplete=\"off\"`) disables this feature. See [bug 654072](https://bugzilla.mozilla.org/show_bug.cgi?id=654072 \"if disabled state is changed with javascript, the normal state doesn't return after refreshing the page\")."
62241 "name": "MDN Reference",
62242 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/button"
62249 "kind": "markdown",
62250 "value": "The select element represents a control for selecting amongst a set of options."
62254 "name": "autocomplete",
62255 "valueSet": "inputautocomplete",
62257 "kind": "markdown",
62258 "value": "A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString \"DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.\") providing a hint for a [user agent's](https://developer.mozilla.org/en-US/docs/Glossary/user_agent \"user agent's: A user agent is a computer program representing a person, for example, a browser in a Web context.\") autocomplete feature. See [The HTML autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for a complete list of values and details on how to use autocomplete."
62262 "name": "autofocus",
62265 "kind": "markdown",
62266 "value": "This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form element in a document can have the `autofocus` attribute."
62270 "name": "disabled",
62273 "kind": "markdown",
62274 "value": "This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example `fieldset`; if there is no containing element with the `disabled` attribute set, then the control is enabled."
62280 "kind": "markdown",
62281 "value": "This attribute lets you specify the form element to which the select element is associated (that is, its \"form owner\"). If this attribute is specified, its value must be the same as the `id` of a form element in the same document. This enables you to place select elements anywhere within a document, not just as descendants of their form elements."
62285 "name": "multiple",
62288 "kind": "markdown",
62289 "value": "This Boolean attribute indicates that multiple options can be selected in the list. If it is not specified, then only one option can be selected at a time. When `multiple` is specified, most browsers will show a scrolling list box instead of a single line dropdown."
62295 "kind": "markdown",
62296 "value": "This attribute is used to specify the name of the control."
62300 "name": "required",
62303 "kind": "markdown",
62304 "value": "A Boolean attribute indicating that an option with a non-empty string value must be selected."
62310 "kind": "markdown",
62311 "value": "If the control is presented as a scrolling list box (e.g. when `multiple` is specified), this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0.\n\n**Note:** According to the HTML5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so Mozilla has opted to continue to return 0 for the time being with Firefox."
62317 "name": "MDN Reference",
62318 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/select"
62323 "name": "datalist",
62325 "kind": "markdown",
62326 "value": "The datalist element represents a set of option elements that represent predefined options for other controls. In the rendering, the datalist element represents nothing and it, along with its children, should be hidden."
62331 "name": "MDN Reference",
62332 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/datalist"
62337 "name": "optgroup",
62339 "kind": "markdown",
62340 "value": "The optgroup element represents a group of option elements with a common label."
62344 "name": "disabled",
62347 "kind": "markdown",
62348 "value": "If this Boolean attribute is set, none of the items in this option group is selectable. Often browsers grey out such control and it won't receive any browsing events, like mouse clicks or focus-related ones."
62354 "kind": "markdown",
62355 "value": "The name of the group of options, which the browser can use when labeling the options in the user interface. This attribute is mandatory if this element is used."
62361 "name": "MDN Reference",
62362 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/optgroup"
62369 "kind": "markdown",
62370 "value": "The option element represents an option in a select element or as part of a list of suggestions in a datalist element."
62374 "name": "disabled",
62377 "kind": "markdown",
62378 "value": "If this Boolean attribute is set, this option is not checkable. Often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled [`<optgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup \"The HTML <optgroup> element creates a grouping of options within a <select> element.\") element."
62384 "kind": "markdown",
62385 "value": "This attribute is text for the label indicating the meaning of the option. If the `label` attribute isn't defined, its value is that of the element text content."
62389 "name": "selected",
62392 "kind": "markdown",
62393 "value": "If present, this Boolean attribute indicates that the option is initially selected. If the `<option>` element is the descendant of a [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select \"The HTML <select> element represents a control that provides a menu of options\") element whose [`multiple`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple) attribute is not set, only one single `<option>` of this [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select \"The HTML <select> element represents a control that provides a menu of options\") element may have the `selected` attribute."
62399 "kind": "markdown",
62400 "value": "The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element."
62406 "name": "MDN Reference",
62407 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/option"
62412 "name": "textarea",
62414 "kind": "markdown",
62415 "value": "The textarea element represents a multiline plain text edit control for the element's raw value. The contents of the control represent the control's default value."
62419 "name": "autocomplete",
62420 "valueSet": "inputautocomplete",
62422 "kind": "markdown",
62423 "value": "This attribute indicates whether the value of the control can be automatically completed by the browser. Possible values are:\n\n* `off`: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.\n* `on`: The browser can automatically complete the value based on values that the user has entered during previous uses.\n\nIf the `autocomplete` attribute is not specified on a `<textarea>` element, then the browser uses the `autocomplete` attribute value of the `<textarea>` element's form owner. The form owner is either the [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element that this `<textarea>` element is a descendant of or the form element whose `id` is specified by the `form` attribute of the input element. For more information, see the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-autocomplete) attribute in [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\")."
62427 "name": "autofocus",
62430 "kind": "markdown",
62431 "value": "This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form-associated element in a document can have this attribute specified."
62437 "kind": "markdown",
62438 "value": "The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is `20`."
62445 "name": "disabled",
62448 "kind": "markdown",
62449 "value": "This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset \"The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.\"); if there is no containing element when the `disabled` attribute is set, the control is enabled."
62455 "kind": "markdown",
62456 "value": "The form element that the `<textarea>` element is associated with (its \"form owner\"). The value of the attribute must be the `id` of a form element in the same document. If this attribute is not specified, the `<textarea>` element must be a descendant of a form element. This attribute enables you to place `<textarea>` elements anywhere within a document, not just as descendants of form elements."
62460 "name": "inputmode",
62464 "name": "maxlength",
62466 "kind": "markdown",
62467 "value": "The maximum number of characters (unicode code points) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters."
62471 "name": "minlength",
62473 "kind": "markdown",
62474 "value": "The minimum number of characters (unicode code points) required that the user should enter."
62480 "kind": "markdown",
62481 "value": "The name of the control."
62485 "name": "placeholder",
62487 "kind": "markdown",
62488 "value": "A hint to the user of what can be entered in the control. Carriage returns or line-feeds within the placeholder text must be treated as line breaks when rendering the hint.\n\n**Note:** Placeholders should only be used to show an example of the type of data that should be entered into a form; they are _not_ a substitute for a proper [`<label>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label \"The HTML <label> element represents a caption for an item in a user interface.\") element tied to the input. See [Labels and placeholders](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Labels_and_placeholders \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") in [<input>: The Input (Form Input) element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") for a full explanation."
62492 "name": "readonly",
62495 "kind": "markdown",
62496 "value": "This Boolean attribute indicates that the user cannot modify the value of the control. Unlike the `disabled` attribute, the `readonly` attribute does not prevent the user from clicking or selecting in the control. The value of a read-only control is still submitted with the form."
62500 "name": "required",
62503 "kind": "markdown",
62504 "value": "This attribute specifies that the user must fill in a value before submitting a form."
62510 "kind": "markdown",
62511 "value": "The number of visible text lines for the control."
62518 "kind": "markdown",
62519 "value": "Indicates how the control wraps text. Possible values are:\n\n* `hard`: The browser automatically inserts line breaks (CR+LF) so that each line has no more than the width of the control; the `cols` attribute must also be specified for this to take effect.\n* `soft`: The browser ensures that all line breaks in the value consist of a CR+LF pair, but does not insert any additional line breaks.\n* `off` : Like `soft` but changes appearance to `white-space: pre` so line segments exceeding `cols` are not wrapped and the `<textarea>` becomes horizontally scrollable.\n\nIf this attribute is not specified, `soft` is its default value."
62523 "name": "autocapitalize",
62524 "description": "This is a non-standard attribute supported by WebKit on iOS (therefore nearly all browsers running on iOS, including Safari, Firefox, and Chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. The non-deprecated values are available in iOS 5 and later. Possible values are:\n\n* `none`: Completely disables automatic capitalization.\n* `sentences`: Automatically capitalize the first letter of sentences.\n* `words`: Automatically capitalize the first letter of words.\n* `characters`: Automatically capitalize all characters.\n* `on`: Deprecated since iOS 5.\n* `off`: Deprecated since iOS 5."
62527 "name": "spellcheck",
62528 "description": "Specifies whether the `<textarea>` is subject to spell checking by the underlying browser/OS. the value can be:\n\n* `true`: Indicates that the element needs to have its spelling and grammar checked.\n* `default` : Indicates that the element is to act according to a default behavior, possibly based on the parent element's own `spellcheck` value.\n* `false` : Indicates that the element should not be spell checked."
62533 "name": "MDN Reference",
62534 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/textarea"
62541 "kind": "markdown",
62542 "value": "The output element represents the result of a calculation performed by the application, or the result of a user action."
62548 "kind": "markdown",
62549 "value": "A space-separated list of other elements’ [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)s, indicating that those elements contributed input values to (or otherwise affected) the calculation."
62555 "kind": "markdown",
62556 "value": "The [form element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) that this element is associated with (its \"form owner\"). The value of the attribute must be an `id` of a form element in the same document. If this attribute is not specified, the output element must be a descendant of a form element. This attribute enables you to place output elements anywhere within a document, not just as descendants of their form elements."
62562 "kind": "markdown",
62563 "value": "The name of the element, exposed in the [`HTMLFormElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement \"The HTMLFormElement interface represents a <form> element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.\") API."
62569 "name": "MDN Reference",
62570 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/output"
62575 "name": "progress",
62577 "kind": "markdown",
62578 "value": "The progress element represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete (e.g. because the task is waiting for a remote host to respond), or the progress is a number in the range zero to a maximum, giving the fraction of work that has so far been completed."
62584 "kind": "markdown",
62585 "value": "This attribute specifies how much of the task that has been completed. It must be a valid floating point number between 0 and `max`, or between 0 and 1 if `max` is omitted. If there is no `value` attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take."
62591 "kind": "markdown",
62592 "value": "This attribute describes how much work the task indicated by the `progress` element requires. The `max` attribute, if present, must have a value greater than zero and be a valid floating point number. The default value is 1."
62598 "name": "MDN Reference",
62599 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/progress"
62606 "kind": "markdown",
62607 "value": "The meter element represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate."
62613 "kind": "markdown",
62614 "value": "The current numeric value. This must be between the minimum and maximum values (`min` attribute and `max` attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the `min` attribute and `max` attribute, the value is equal to the nearest end of the range.\n\n**Usage note:** Unless the `value` attribute is between `0` and `1` (inclusive), the `min` and `max` attributes should define the range so that the `value` attribute's value is within it."
62620 "kind": "markdown",
62621 "value": "The lower numeric bound of the measured range. This must be less than the maximum value (`max` attribute), if specified. If unspecified, the minimum value is 0."
62627 "kind": "markdown",
62628 "value": "The upper numeric bound of the measured range. This must be greater than the minimum value (`min` attribute), if specified. If unspecified, the maximum value is 1."
62634 "kind": "markdown",
62635 "value": "The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (`min` attribute), and it also must be less than the high value and maximum value (`high` attribute and `max` attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the `low` value is equal to the minimum value."
62641 "kind": "markdown",
62642 "value": "The lower numeric bound of the high end of the measured range. This must be less than the maximum value (`max` attribute), and it also must be greater than the low value and minimum value (`low` attribute and **min** attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the `high` value is equal to the maximum value."
62648 "kind": "markdown",
62649 "value": "This attribute indicates the optimal numeric value. It must be within the range (as defined by the `min` attribute and `max` attribute). When used with the `low` attribute and `high` attribute, it gives an indication where along the range is considered preferable. For example, if it is between the `min` attribute and the `low` attribute, then the lower range is considered preferred."
62654 "description": "This attribute associates the element with a `form` element that has ownership of the `meter` element. For example, a `meter` might be displaying a range corresponding to an `input` element of `type` _number_. This attribute is only used if the `meter` element is being used as a form-associated element; even then, it may be omitted if the element appears as a descendant of a `form` element."
62659 "name": "MDN Reference",
62660 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/meter"
62665 "name": "fieldset",
62667 "kind": "markdown",
62668 "value": "The fieldset element represents a set of form controls optionally grouped under a common name."
62672 "name": "disabled",
62675 "kind": "markdown",
62676 "value": "If this Boolean attribute is set, all form controls that are descendants of the `<fieldset>`, are disabled, meaning they are not editable and won't be submitted along with the `<form>`. They won't receive any browsing events, like mouse clicks or focus-related events. By default browsers display such controls grayed out. Note that form elements inside the [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element won't be disabled."
62682 "kind": "markdown",
62683 "value": "This attribute takes the value of the `id` attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form \"The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.\") element you want the `<fieldset>` to be part of, even if it is not inside the form."
62689 "kind": "markdown",
62690 "value": "The name associated with the group.\n\n**Note**: The caption for the fieldset is given by the first [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element nested inside it."
62696 "name": "MDN Reference",
62697 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/fieldset"
62704 "kind": "markdown",
62705 "value": "The legend element represents a caption for the rest of the contents of the legend element's parent fieldset element, if any."
62710 "name": "MDN Reference",
62711 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/legend"
62718 "kind": "markdown",
62719 "value": "The details element represents a disclosure widget from which the user can obtain additional information or controls."
62726 "kind": "markdown",
62727 "value": "This Boolean attribute indicates whether or not the details — that is, the contents of the `<details>` element — are currently visible. The default, `false`, means the details are not visible."
62733 "name": "MDN Reference",
62734 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/details"
62741 "kind": "markdown",
62742 "value": "The summary element represents a summary, caption, or legend for the rest of the contents of the summary element's parent details element, if any."
62747 "name": "MDN Reference",
62748 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/summary"
62755 "kind": "markdown",
62756 "value": "The dialog element represents a part of an application that a user interacts with to perform a task, for example a dialog box, inspector, or window."
62761 "description": "Indicates that the dialog is active and available for interaction. When the `open` attribute is not set, the dialog shouldn't be shown to the user."
62766 "name": "MDN Reference",
62767 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/dialog"
62774 "kind": "markdown",
62775 "value": "The script element allows authors to include dynamic script and data blocks in their documents. The element does not represent content for the user."
62781 "kind": "markdown",
62782 "value": "This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document.\n\nIf a `script` element has a `src` attribute specified, it should not have a script embedded inside its tags."
62788 "kind": "markdown",
62789 "value": "This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories:\n\n* **Omitted or a JavaScript MIME type:** For HTML5-compliant browsers this indicates the script is JavaScript. HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type. In earlier browsers, this identified the scripting language of the embedded or imported (via the `src` attribute) code. JavaScript MIME types are [listed in the specification](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#JavaScript_types).\n* **`module`:** For HTML5-compliant browsers the code is treated as a JavaScript module. The processing of the script contents is not affected by the `charset` and `defer` attributes. For information on using `module`, see [ES6 in Depth: Modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/). Code may behave differently when the `module` keyword is used.\n* **Any other value:** The embedded content is treated as a data block which won't be processed by the browser. Developers must use a valid MIME type that is not a JavaScript MIME type to denote data blocks. The `src` attribute will be ignored.\n\n**Note:** in Firefox you could specify the version of JavaScript contained in a `<script>` element by including a non-standard `version` parameter inside the `type` attribute — for example `type=\"text/javascript;version=1.8\"`. This has been removed in Firefox 59 (see [bug 1428745](https://bugzilla.mozilla.org/show_bug.cgi?id=1428745 \"FIXED: Remove support for version parameter from script loader\"))."
62799 "kind": "markdown",
62800 "value": "This is a Boolean attribute indicating that the browser should, if possible, load the script asynchronously.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts). If it is included in this case it will have no effect.\n\nBrowsers usually assume the worst case scenario and load scripts synchronously, (i.e. `async=\"false\"`) during HTML parsing.\n\nDynamically inserted scripts (using [`document.createElement()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement \"In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.\")) load asynchronously by default, so to turn on synchronous loading (i.e. scripts load in the order they were inserted) set `async=\"false\"`.\n\nSee [Browser compatibility](#Browser_compatibility) for notes on browser support. See also [Async scripts for asm.js](https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts)."
62807 "kind": "markdown",
62808 "value": "This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded \"/en-US/docs/Web/Events/DOMContentLoaded\").\n\nScripts with the `defer` attribute will prevent the `DOMContentLoaded` event from firing until the script has loaded and finished evaluating.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts), in this case it would have no effect.\n\nTo achieve a similar effect for dynamically inserted scripts use `async=\"false\"` instead. Scripts with the `defer` attribute will execute in the order in which they appear in the document."
62812 "name": "crossorigin",
62815 "kind": "markdown",
62816 "value": "Normal `script` elements pass minimal information to the [`window.onerror`](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror \"The onerror property of the GlobalEventHandlers mixin is an EventHandler that processes error events.\") for scripts which do not pass the standard [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS \"CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.\") checks. To allow error logging for sites which use a separate domain for static media, use this attribute. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for a more descriptive explanation of its valid arguments."
62822 "kind": "markdown",
62823 "value": "A cryptographic nonce (number used once) to whitelist inline scripts in a [script-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial."
62827 "name": "integrity",
62828 "description": "This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)."
62831 "name": "nomodule",
62832 "description": "This Boolean attribute is set to indicate that the script should not be executed in browsers that support [ES2015 modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/) — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code."
62835 "name": "referrerpolicy",
62836 "description": "Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the script, or resources fetched by the script:\n\n* `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin \"origin: Web content's origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.\")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS \"TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.\") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS \"HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.\")).\n* `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host \"host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails.\"), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port \"port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.\").\n* `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n* `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy \"same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.\"), but cross-origin requests will contain no referrer information.\n* `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (e.g. HTTPS→HTTPS), but don't send it to a less secure destination (e.g. HTTPS→HTTP).\n* `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, but only send the origin when the protocol security level stays the same (e.g.HTTPS→HTTPS), and send no header to a less secure destination (e.g. HTTPS→HTTP).\n* `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.\n\n**Note**: An empty string value (`\"\"`) is both the default value, and a fallback value if `referrerpolicy` is not supported. If `referrerpolicy` is not explicitly specified on the `<script>` element, it will adopt a higher-level referrer policy, i.e. one set on the whole document or domain. If a higher-level policy is not available, the empty string is treated as being equivalent to `no-referrer-when-downgrade`."
62840 "description": "Like the `textContent` attribute, this attribute sets the text content of the element. Unlike the `textContent` attribute, however, this attribute is evaluated as executable code after the node is inserted into the DOM."
62845 "name": "MDN Reference",
62846 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/script"
62851 "name": "noscript",
62853 "kind": "markdown",
62854 "value": "The noscript element represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don't support scripting, by affecting how the document is parsed."
62859 "name": "MDN Reference",
62860 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/noscript"
62865 "name": "template",
62867 "kind": "markdown",
62868 "value": "The template element is used to declare fragments of HTML that can be cloned and inserted in the document by script."
62873 "name": "MDN Reference",
62874 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/template"
62881 "kind": "markdown",
62882 "value": "The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly."
62888 "kind": "markdown",
62889 "value": "The width of the coordinate space in CSS pixels. Defaults to 300."
62895 "kind": "markdown",
62896 "value": "The height of the coordinate space in CSS pixels. Defaults to 150."
62900 "name": "moz-opaque",
62901 "description": "Lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported by Mozilla-based browsers; use the standardized [`canvas.getContext('2d', { alpha: false })`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext \"The HTMLCanvasElement.getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\") instead."
62906 "name": "MDN Reference",
62907 "url": "https://developer.mozilla.org/docs/Web/HTML/Element/canvas"
62912 "globalAttributes": [
62914 "name": "accesskey",
62916 "kind": "markdown",
62917 "value": "Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout."
62921 "name": "MDN Reference",
62922 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/accesskey"
62927 "name": "autocapitalize",
62929 "kind": "markdown",
62930 "value": "Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can have the following values:\n\n* `off` or `none`, no autocapitalization is applied (all letters default to lowercase)\n* `on` or `sentences`, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase\n* `words`, the first letter of each word defaults to a capital letter; all other letters default to lowercase\n* `characters`, all letters should default to uppercase"
62934 "name": "MDN Reference",
62935 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/autocapitalize"
62942 "kind": "markdown",
62943 "value": "A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the [class selectors](/en-US/docs/Web/CSS/Class_selectors) or functions like the method [`Document.getElementsByClassName()`](/en-US/docs/Web/API/Document/getElementsByClassName \"returns an array-like object of all child elements which have all of the given class names.\")."
62947 "name": "MDN Reference",
62948 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/class"
62953 "name": "contenteditable",
62955 "kind": "markdown",
62956 "value": "An enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:\n\n* `true` or the _empty string_, which indicates that the element must be editable;\n* `false`, which indicates that the element must not be editable."
62960 "name": "MDN Reference",
62961 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/contenteditable"
62966 "name": "contextmenu",
62968 "kind": "markdown",
62969 "value": "The `[**id**](#attr-id)` of a [`<menu>`](/en-US/docs/Web/HTML/Element/menu \"The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.\") to use as the contextual menu for this element."
62973 "name": "MDN Reference",
62974 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/contextmenu"
62981 "kind": "markdown",
62982 "value": "An enumerated attribute indicating the directionality of the element's text. It can have the following values:\n\n* `ltr`, which means _left to right_ and is to be used for languages that are written from the left to the right (like English);\n* `rtl`, which means _right to left_ and is to be used for languages that are written from the right to the left (like Arabic);\n* `auto`, which lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element."
62987 "name": "MDN Reference",
62988 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/dir"
62993 "name": "draggable",
62995 "kind": "markdown",
62996 "value": "An enumerated attribute indicating whether the element can be dragged, using the [Drag and Drop API](/en-us/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n* `true`, which indicates that the element may be dragged\n* `false`, which indicates that the element may not be dragged."
63001 "name": "MDN Reference",
63002 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/draggable"
63007 "name": "dropzone",
63009 "kind": "markdown",
63010 "value": "An enumerated attribute indicating what types of content can be dropped on an element, using the [Drag and Drop API](/en-US/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n* `copy`, which indicates that dropping will create a copy of the element that was dragged\n* `move`, which indicates that the element that was dragged will be moved to this new location.\n* `link`, will create a link to the dragged data."
63014 "name": "MDN Reference",
63015 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/dropzone"
63020 "name": "exportparts",
63022 "kind": "markdown",
63023 "value": "Used to transitively export shadow parts from a nested shadow tree into a containing light tree."
63027 "name": "MDN Reference",
63028 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/exportparts"
63035 "kind": "markdown",
63036 "value": "A Boolean attribute indicates that the element is not yet, or is no longer, _relevant_. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown."
63041 "name": "MDN Reference",
63042 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/hidden"
63049 "kind": "markdown",
63050 "value": "Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS)."
63054 "name": "MDN Reference",
63055 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/id"
63060 "name": "inputmode",
63062 "kind": "markdown",
63063 "value": "Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on [`<input>`](/en-US/docs/Web/HTML/Element/input \"The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.\") elements, but is usable on any element while in `[contenteditable](/en-US/docs/Web/HTML/Global_attributes#attr-contenteditable)` mode."
63067 "name": "MDN Reference",
63068 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/inputmode"
63075 "kind": "markdown",
63076 "value": "Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see [Using custom elements](/en-US/docs/Web/Web_Components/Using_custom_elements) for more details)."
63080 "name": "MDN Reference",
63081 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/is"
63088 "kind": "markdown",
63089 "value": "The unique, global identifier of an item."
63093 "name": "MDN Reference",
63094 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemid"
63099 "name": "itemprop",
63101 "kind": "markdown",
63102 "value": "Used to add properties to an item. Every HTML element may have an `itemprop` attribute specified, where an `itemprop` consists of a name and value pair."
63106 "name": "MDN Reference",
63107 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemprop"
63114 "kind": "markdown",
63115 "value": "Properties that are not descendants of an element with the `itemscope` attribute can be associated with the item using an `itemref`. It provides a list of element ids (not `itemid`s) with additional properties elsewhere in the document."
63119 "name": "MDN Reference",
63120 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemref"
63125 "name": "itemscope",
63127 "kind": "markdown",
63128 "value": "`itemscope` (usually) works along with `[itemtype](/en-US/docs/Web/HTML/Global_attributes#attr-itemtype)` to specify that the HTML contained in a block is about a particular item. `itemscope` creates the Item and defines the scope of the `itemtype` associated with it. `itemtype` is a valid URL of a vocabulary (such as [schema.org](https://schema.org/)) that describes the item and its properties context."
63133 "name": "MDN Reference",
63134 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemscope"
63139 "name": "itemtype",
63141 "kind": "markdown",
63142 "value": "Specifies the URL of the vocabulary that will be used to define `itemprop`s (item properties) in the data structure. `[itemscope](/en-US/docs/Web/HTML/Global_attributes#attr-itemscope)` is used to set the scope of where in the data structure the vocabulary set by `itemtype` will be active."
63146 "name": "MDN Reference",
63147 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemtype"
63154 "kind": "markdown",
63155 "value": "Helps define the language of an element: the language that non-editable elements are in, or the language that editable elements should be written in by the user. The attribute contains one “language tag” (made of hyphen-separated “language subtags”) in the format defined in [_Tags for Identifying Languages (BCP47)_](https://www.ietf.org/rfc/bcp/bcp47.txt). [**xml:lang**](#attr-xml:lang) has priority over it."
63159 "name": "MDN Reference",
63160 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang"
63167 "kind": "markdown",
63168 "value": "A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the [`::part`](/en-US/docs/Web/CSS/::part \"The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute.\") pseudo-element."
63172 "name": "MDN Reference",
63173 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/part"
63179 "valueSet": "roles"
63184 "kind": "markdown",
63185 "value": "Assigns a slot in a [shadow DOM](/en-US/docs/Web/Web_Components/Shadow_DOM) shadow tree to an element: An element with a `slot` attribute is assigned to the slot created by the [`<slot>`](/en-US/docs/Web/HTML/Element/slot \"The HTML <slot> element—part of the Web Components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.\") element whose `[name](/en-US/docs/Web/HTML/Element/slot#attr-name)` attribute's value matches that `slot` attribute's value."
63189 "name": "MDN Reference",
63190 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/slot"
63195 "name": "spellcheck",
63197 "kind": "markdown",
63198 "value": "An enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values:\n\n* `true`, which indicates that the element should be, if possible, checked for spelling errors;\n* `false`, which indicates that the element should not be checked for spelling errors."
63203 "name": "MDN Reference",
63204 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck"
63211 "kind": "markdown",
63212 "value": "Contains [CSS](/en-US/docs/Web/CSS) styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the [`<style>`](/en-US/docs/Web/HTML/Element/style \"The HTML <style> element contains style information for a document, or part of a document.\") element have mainly the purpose of allowing for quick styling, for example for testing purposes."
63216 "name": "MDN Reference",
63217 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/style"
63222 "name": "tabindex",
63224 "kind": "markdown",
63225 "value": "An integer attribute indicating if the element can take input focus (is _focusable_), if it should participate to sequential keyboard navigation, and if so, at what position. It can take several values:\n\n* a _negative value_ means that the element should be focusable, but should not be reachable via sequential keyboard navigation;\n* `0` means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention;\n* a _positive value_ means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the [**tabindex**](#attr-tabindex). If several elements share the same tabindex, their relative order follows their relative positions in the document."
63229 "name": "MDN Reference",
63230 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/tabindex"
63237 "kind": "markdown",
63238 "value": "Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip."
63242 "name": "MDN Reference",
63243 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/title"
63248 "name": "translate",
63250 "kind": "markdown",
63251 "value": "An enumerated attribute that is used to specify whether an element's attribute values and the values of its [`Text`](/en-US/docs/Web/API/Text \"The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.\") node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:\n\n* empty string and `yes`, which indicates that the element will be translated.\n* `no`, which indicates that the element will not be translated."
63256 "name": "MDN Reference",
63257 "url": "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/translate"
63264 "kind": "markdown",
63265 "value": "The loading of a resource has been aborted."
63271 "kind": "markdown",
63272 "value": "An element has lost focus (does not bubble)."
63276 "name": "oncanplay",
63278 "kind": "markdown",
63279 "value": "The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content."
63283 "name": "oncanplaythrough",
63285 "kind": "markdown",
63286 "value": "The user agent can play the media up to its end without having to stop for further buffering of content."
63290 "name": "onchange",
63292 "kind": "markdown",
63293 "value": "The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user."
63299 "kind": "markdown",
63300 "value": "A pointing device button has been pressed and released on an element."
63304 "name": "oncontextmenu",
63306 "kind": "markdown",
63307 "value": "The right button of the mouse is clicked (before the context menu is displayed)."
63311 "name": "ondblclick",
63313 "kind": "markdown",
63314 "value": "A pointing device button is clicked twice on an element."
63320 "kind": "markdown",
63321 "value": "An element or text selection is being dragged (every 350ms)."
63325 "name": "ondragend",
63327 "kind": "markdown",
63328 "value": "A drag operation is being ended (by releasing a mouse button or hitting the escape key)."
63332 "name": "ondragenter",
63334 "kind": "markdown",
63335 "value": "A dragged element or text selection enters a valid drop target."
63339 "name": "ondragleave",
63341 "kind": "markdown",
63342 "value": "A dragged element or text selection leaves a valid drop target."
63346 "name": "ondragover",
63348 "kind": "markdown",
63349 "value": "An element or text selection is being dragged over a valid drop target (every 350ms)."
63353 "name": "ondragstart",
63355 "kind": "markdown",
63356 "value": "The user starts dragging an element or text selection."
63362 "kind": "markdown",
63363 "value": "An element is dropped on a valid drop target."
63367 "name": "ondurationchange",
63369 "kind": "markdown",
63370 "value": "The duration attribute has been updated."
63374 "name": "onemptied",
63376 "kind": "markdown",
63377 "value": "The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it."
63383 "kind": "markdown",
63384 "value": "Playback has stopped because the end of the media was reached."
63390 "kind": "markdown",
63391 "value": "A resource failed to load."
63397 "kind": "markdown",
63398 "value": "An element has received focus (does not bubble)."
63402 "name": "onformchange"
63405 "name": "onforminput"
63410 "kind": "markdown",
63411 "value": "The value of an element changes or the content of an element with the attribute contenteditable is modified."
63415 "name": "oninvalid",
63417 "kind": "markdown",
63418 "value": "A submittable element has been checked and doesn't satisfy its constraints."
63422 "name": "onkeydown",
63424 "kind": "markdown",
63425 "value": "A key is pressed down."
63429 "name": "onkeypress",
63431 "kind": "markdown",
63432 "value": "A key is pressed down and that key normally produces a character value (use input instead)."
63438 "kind": "markdown",
63439 "value": "A key is released."
63445 "kind": "markdown",
63446 "value": "A resource and its dependent resources have finished loading."
63450 "name": "onloadeddata",
63452 "kind": "markdown",
63453 "value": "The first frame of the media has finished loading."
63457 "name": "onloadedmetadata",
63459 "kind": "markdown",
63460 "value": "The metadata has been loaded."
63464 "name": "onloadstart",
63466 "kind": "markdown",
63467 "value": "Progress has begun."
63471 "name": "onmousedown",
63473 "kind": "markdown",
63474 "value": "A pointing device button (usually a mouse) is pressed on an element."
63478 "name": "onmousemove",
63480 "kind": "markdown",
63481 "value": "A pointing device is moved over an element."
63485 "name": "onmouseout",
63487 "kind": "markdown",
63488 "value": "A pointing device is moved off the element that has the listener attached or off one of its children."
63492 "name": "onmouseover",
63494 "kind": "markdown",
63495 "value": "A pointing device is moved onto the element that has the listener attached or onto one of its children."
63499 "name": "onmouseup",
63501 "kind": "markdown",
63502 "value": "A pointing device button is released over an element."
63506 "name": "onmousewheel"
63511 "kind": "markdown",
63512 "value": "Playback has been paused."
63518 "kind": "markdown",
63519 "value": "Playback has begun."
63523 "name": "onplaying",
63525 "kind": "markdown",
63526 "value": "Playback is ready to start after having been paused or delayed due to lack of data."
63530 "name": "onprogress",
63532 "kind": "markdown",
63533 "value": "In progress."
63537 "name": "onratechange",
63539 "kind": "markdown",
63540 "value": "The playback rate has changed."
63546 "kind": "markdown",
63547 "value": "A form is reset."
63551 "name": "onresize",
63553 "kind": "markdown",
63554 "value": "The document view has been resized."
63558 "name": "onreadystatechange",
63560 "kind": "markdown",
63561 "value": "The readyState attribute of a document has changed."
63565 "name": "onscroll",
63567 "kind": "markdown",
63568 "value": "The document view or an element has been scrolled."
63572 "name": "onseeked",
63574 "kind": "markdown",
63575 "value": "A seek operation completed."
63579 "name": "onseeking",
63581 "kind": "markdown",
63582 "value": "A seek operation began."
63586 "name": "onselect",
63588 "kind": "markdown",
63589 "value": "Some text is being selected."
63595 "kind": "markdown",
63596 "value": "A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute"
63600 "name": "onstalled",
63602 "kind": "markdown",
63603 "value": "The user agent is trying to fetch media data, but data is unexpectedly not forthcoming."
63607 "name": "onsubmit",
63609 "kind": "markdown",
63610 "value": "A form is submitted."
63614 "name": "onsuspend",
63616 "kind": "markdown",
63617 "value": "Media data loading has been suspended."
63621 "name": "ontimeupdate",
63623 "kind": "markdown",
63624 "value": "The time indicated by the currentTime attribute has been updated."
63628 "name": "onvolumechange",
63630 "kind": "markdown",
63631 "value": "The volume has changed."
63635 "name": "onwaiting",
63637 "kind": "markdown",
63638 "value": "Playback has stopped because of a temporary lack of data."
63642 "name": "aria-activedescendant",
63645 "name": "WAI-ARIA Reference",
63646 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-activedescendant"
63650 "kind": "markdown",
63651 "value": "Identifies the currently active element when DOM focus is on a [`composite`](https://www.w3.org/TR/wai-aria-1.1/#composite) widget, [`textbox`](https://www.w3.org/TR/wai-aria-1.1/#textbox), [`group`](https://www.w3.org/TR/wai-aria-1.1/#group), or [`application`](https://www.w3.org/TR/wai-aria-1.1/#application)."
63655 "name": "aria-atomic",
63659 "name": "WAI-ARIA Reference",
63660 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-atomic"
63664 "kind": "markdown",
63665 "value": "Indicates whether [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology) will present all, or only parts of, the changed region based on the change notifications defined by the [`aria-relevant`](https://www.w3.org/TR/wai-aria-1.1/#aria-relevant) attribute."
63669 "name": "aria-autocomplete",
63670 "valueSet": "autocomplete",
63673 "name": "WAI-ARIA Reference",
63674 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete"
63678 "kind": "markdown",
63679 "value": "Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made."
63683 "name": "aria-busy",
63687 "name": "WAI-ARIA Reference",
63688 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-busy"
63692 "kind": "markdown",
63693 "value": "Indicates an element is being modified and that assistive technologies _MAY_ want to wait until the modifications are complete before exposing them to the user."
63697 "name": "aria-checked",
63698 "valueSet": "tristate",
63701 "name": "WAI-ARIA Reference",
63702 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-checked"
63706 "kind": "markdown",
63707 "value": "Indicates the current \"checked\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of checkboxes, radio buttons, and other [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected)."
63711 "name": "aria-colcount",
63714 "name": "WAI-ARIA Reference",
63715 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colcount"
63719 "kind": "markdown",
63720 "value": "Defines the total number of columns in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex)."
63724 "name": "aria-colindex",
63727 "name": "WAI-ARIA Reference",
63728 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colindex"
63732 "kind": "markdown",
63733 "value": "Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) column index or position with respect to the total number of columns within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-colcount) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."
63737 "name": "aria-colspan",
63740 "name": "WAI-ARIA Reference",
63741 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-colspan"
63745 "kind": "markdown",
63746 "value": "Defines the number of columns spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."
63750 "name": "aria-controls",
63753 "name": "WAI-ARIA Reference",
63754 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-controls"
63758 "kind": "markdown",
63759 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) whose contents or presence are controlled by the current element. See related [`aria-owns`](https://www.w3.org/TR/wai-aria-1.1/#aria-owns)."
63763 "name": "aria-current",
63764 "valueSet": "current",
63767 "name": "WAI-ARIA Reference",
63768 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-current"
63772 "kind": "markdown",
63773 "value": "Indicates the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that represents the current item within a container or set of related elements."
63777 "name": "aria-describedat",
63780 "name": "WAI-ARIA Reference",
63781 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-describedat"
63786 "name": "aria-describedby",
63789 "name": "WAI-ARIA Reference",
63790 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-describedby"
63794 "kind": "markdown",
63795 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that describes the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."
63799 "name": "aria-disabled",
63803 "name": "WAI-ARIA Reference",
63804 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-disabled"
63808 "kind": "markdown",
63809 "value": "Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is [perceivable](https://www.w3.org/TR/wai-aria-1.1/#dfn-perceivable) but disabled, so it is not editable or otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.1/#aria-hidden) and [`aria-readonly`](https://www.w3.org/TR/wai-aria-1.1/#aria-readonly)."
63813 "name": "aria-dropeffect",
63814 "valueSet": "dropeffect",
63817 "name": "WAI-ARIA Reference",
63818 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-dropeffect"
63822 "kind": "markdown",
63823 "value": "\\[Deprecated in ARIA 1.1\\] Indicates what functions can be performed when a dragged object is released on the drop target."
63827 "name": "aria-errormessage",
63830 "name": "WAI-ARIA Reference",
63831 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage"
63835 "kind": "markdown",
63836 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides an error message for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-invalid`](https://www.w3.org/TR/wai-aria-1.1/#aria-invalid) and [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
63840 "name": "aria-expanded",
63844 "name": "WAI-ARIA Reference",
63845 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-expanded"
63849 "kind": "markdown",
63850 "value": "Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed."
63854 "name": "aria-flowto",
63857 "name": "WAI-ARIA Reference",
63858 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-flowto"
63862 "kind": "markdown",
63863 "value": "Identifies the next [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order."
63867 "name": "aria-grabbed",
63871 "name": "WAI-ARIA Reference",
63872 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-grabbed"
63876 "kind": "markdown",
63877 "value": "\\[Deprecated in ARIA 1.1\\] Indicates an element's \"grabbed\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) in a drag-and-drop operation."
63881 "name": "aria-haspopup",
63885 "name": "WAI-ARIA Reference",
63886 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup"
63890 "kind": "markdown",
63891 "value": "Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."
63895 "name": "aria-hidden",
63899 "name": "WAI-ARIA Reference",
63900 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-hidden"
63904 "kind": "markdown",
63905 "value": "Indicates whether the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is exposed to an accessibility API. See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."
63909 "name": "aria-invalid",
63910 "valueSet": "invalid",
63913 "name": "WAI-ARIA Reference",
63914 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-invalid"
63918 "kind": "markdown",
63919 "value": "Indicates the entered value does not conform to the format expected by the application. See related [`aria-errormessage`](https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage)."
63923 "name": "aria-kbdshortcuts",
63926 "name": "WAI-ARIA Reference",
63927 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-kbdshortcuts"
63932 "name": "aria-label",
63935 "name": "WAI-ARIA Reference",
63936 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-label"
63940 "kind": "markdown",
63941 "value": "Defines a string value that labels the current element. See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."
63945 "name": "aria-labelledby",
63948 "name": "WAI-ARIA Reference",
63949 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby"
63953 "kind": "markdown",
63954 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that labels the current element. See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
63958 "name": "aria-level",
63961 "name": "WAI-ARIA Reference",
63962 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-level"
63966 "kind": "markdown",
63967 "value": "Defines the hierarchical level of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) within a structure."
63971 "name": "aria-live",
63972 "valueSet": "live",
63975 "name": "WAI-ARIA Reference",
63976 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-live"
63980 "kind": "markdown",
63981 "value": "Indicates that an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) will be updated, and describes the types of updates the [user agents](https://www.w3.org/TR/wai-aria-1.1/#dfn-user-agent), [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology), and user can expect from the [live region](https://www.w3.org/TR/wai-aria-1.1/#dfn-live-region)."
63985 "name": "aria-modal",
63989 "name": "WAI-ARIA Reference",
63990 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-modal"
63994 "kind": "markdown",
63995 "value": "Indicates whether an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is modal when displayed."
63999 "name": "aria-multiline",
64003 "name": "WAI-ARIA Reference",
64004 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-multiline"
64008 "kind": "markdown",
64009 "value": "Indicates whether a text box accepts multiple lines of input or only a single line."
64013 "name": "aria-multiselectable",
64017 "name": "WAI-ARIA Reference",
64018 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable"
64022 "kind": "markdown",
64023 "value": "Indicates that the user may select more than one item from the current selectable descendants."
64027 "name": "aria-orientation",
64028 "valueSet": "orientation",
64031 "name": "WAI-ARIA Reference",
64032 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-orientation"
64036 "kind": "markdown",
64037 "value": "Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous."
64041 "name": "aria-owns",
64044 "name": "WAI-ARIA Reference",
64045 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-owns"
64049 "kind": "markdown",
64050 "value": "Identifies an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in order to define a visual, functional, or contextual parent/child [relationship](https://www.w3.org/TR/wai-aria-1.1/#dfn-relationship) between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related [`aria-controls`](https://www.w3.org/TR/wai-aria-1.1/#aria-controls)."
64054 "name": "aria-placeholder",
64057 "name": "WAI-ARIA Reference",
64058 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-placeholder"
64062 "kind": "markdown",
64063 "value": "Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format."
64067 "name": "aria-posinset",
64070 "name": "WAI-ARIA Reference",
64071 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-posinset"
64075 "kind": "markdown",
64076 "value": "Defines an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)'s number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-setsize`](https://www.w3.org/TR/wai-aria-1.1/#aria-setsize)."
64080 "name": "aria-pressed",
64081 "valueSet": "tristate",
64084 "name": "WAI-ARIA Reference",
64085 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-pressed"
64089 "kind": "markdown",
64090 "value": "Indicates the current \"pressed\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of toggle buttons. See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected)."
64094 "name": "aria-readonly",
64098 "name": "WAI-ARIA Reference",
64099 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-readonly"
64103 "kind": "markdown",
64104 "value": "Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is not editable, but is otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."
64108 "name": "aria-relevant",
64109 "valueSet": "relevant",
64112 "name": "WAI-ARIA Reference",
64113 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-relevant"
64117 "kind": "markdown",
64118 "value": "Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related [`aria-atomic`](https://www.w3.org/TR/wai-aria-1.1/#aria-atomic)."
64122 "name": "aria-required",
64126 "name": "WAI-ARIA Reference",
64127 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-required"
64131 "kind": "markdown",
64132 "value": "Indicates that user input is required on the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) before a form may be submitted."
64136 "name": "aria-roledescription",
64139 "name": "WAI-ARIA Reference",
64140 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription"
64144 "kind": "markdown",
64145 "value": "Defines a human-readable, author-localized description for the [role](https://www.w3.org/TR/wai-aria-1.1/#dfn-role) of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."
64149 "name": "aria-rowcount",
64152 "name": "WAI-ARIA Reference",
64153 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount"
64157 "kind": "markdown",
64158 "value": "Defines the total number of rows in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex)."
64162 "name": "aria-rowindex",
64165 "name": "WAI-ARIA Reference",
64166 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex"
64170 "kind": "markdown",
64171 "value": "Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) row index or position with respect to the total number of rows within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."
64175 "name": "aria-rowspan",
64178 "name": "WAI-ARIA Reference",
64179 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan"
64183 "kind": "markdown",
64184 "value": "Defines the number of rows spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."
64188 "name": "aria-selected",
64192 "name": "WAI-ARIA Reference",
64193 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-selected"
64197 "kind": "markdown",
64198 "value": "Indicates the current \"selected\" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of various [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed)."
64202 "name": "aria-setsize",
64205 "name": "WAI-ARIA Reference",
64206 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-setsize"
64210 "kind": "markdown",
64211 "value": "Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-posinset`](https://www.w3.org/TR/wai-aria-1.1/#aria-posinset)."
64215 "name": "aria-sort",
64216 "valueSet": "sort",
64219 "name": "WAI-ARIA Reference",
64220 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-sort"
64224 "kind": "markdown",
64225 "value": "Indicates if items in a table or grid are sorted in ascending or descending order."
64229 "name": "aria-valuemax",
64232 "name": "WAI-ARIA Reference",
64233 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuemax"
64237 "kind": "markdown",
64238 "value": "Defines the maximum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
64242 "name": "aria-valuemin",
64245 "name": "WAI-ARIA Reference",
64246 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuemin"
64250 "kind": "markdown",
64251 "value": "Defines the minimum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
64255 "name": "aria-valuenow",
64258 "name": "WAI-ARIA Reference",
64259 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow"
64263 "kind": "markdown",
64264 "value": "Defines the current value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-valuetext`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext)."
64268 "name": "aria-valuetext",
64271 "name": "WAI-ARIA Reference",
64272 "url": "https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext"
64276 "kind": "markdown",
64277 "value": "Defines the human readable text alternative of [`aria-valuenow`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow) for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."
64281 "name": "aria-details",
64283 "kind": "markdown",
64284 "value": "Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides a detailed, extended description for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."
64288 "name": "aria-keyshortcuts",
64290 "kind": "markdown",
64291 "value": "Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element."
64317 "name": "undefined"
64374 "kind": "markdown",
64375 "value": "Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters."
64381 "kind": "markdown",
64382 "value": "Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5); form data are included in the body of the form and sent to the server."
64388 "kind": "markdown",
64389 "value": "Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element to close the dialog when submitted."
64462 "name": "datetime-local"
64506 "name": "latin-name"
64509 "name": "latin-prose"
64512 "name": "full-width-latin"
64518 "name": "kana-name"
64603 "name": "application/x-www-form-urlencoded"
64606 "name": "multipart/form-data"
64609 "name": "text/plain"
64617 "name": "subtitles"
64623 "name": "descriptions"
64668 "name": "anonymous"
64671 "name": "use-credentials"
64679 "name": "allow-forms"
64682 "name": "allow-modals"
64685 "name": "allow-pointer-lock"
64688 "name": "allow-popups"
64691 "name": "allow-popups-to-escape-sandbox"
64694 "name": "allow-same-origin"
64697 "name": "allow-scripts"
64700 "name": "allow-top-navigation"
64705 "name": "tristate",
64717 "name": "undefined"
64722 "name": "inputautocomplete",
64725 "name": "additional-name"
64728 "name": "address-level1"
64731 "name": "address-level2"
64734 "name": "address-level3"
64737 "name": "address-level4"
64740 "name": "address-line1"
64743 "name": "address-line2"
64746 "name": "address-line3"
64752 "name": "bday-year"
64758 "name": "bday-month"
64764 "name": "cc-additional-name"
64773 "name": "cc-exp-month"
64776 "name": "cc-exp-year"
64779 "name": "cc-family-name"
64782 "name": "cc-given-name"
64788 "name": "cc-number"
64797 "name": "country-name"
64800 "name": "current-password"
64806 "name": "family-name"
64812 "name": "given-name"
64818 "name": "honorific-prefix"
64821 "name": "honorific-suffix"
64836 "name": "new-password"
64842 "name": "organization"
64845 "name": "organization-title"
64854 "name": "postal-code"
64863 "name": "street-address"
64866 "name": "tel-area-code"
64872 "name": "tel-country-code"
64875 "name": "tel-extension"
64878 "name": "tel-local"
64881 "name": "tel-local-prefix"
64884 "name": "tel-local-suffix"
64887 "name": "tel-national"
64890 "name": "transaction-amount"
64893 "name": "transaction-currency"
64907 "name": "autocomplete",
64950 "name": "dropeffect",
64999 "name": "assertive"
65004 "name": "orientation",
65010 "name": "horizontal"
65013 "name": "undefined"
65018 "name": "relevant",
65021 "name": "additions"
65033 "name": "additions text"
65041 "name": "ascending"
65044 "name": "descending"
65061 "name": "alertdialog"
65088 "name": "menuitemcheckbox"
65091 "name": "menuitemradio"
65097 "name": "progressbar"
65103 "name": "scrollbar"
65106 "name": "searchbox"
65112 "name": "spinbutton"
65154 "name": "radiogroup"
65166 "name": "application"
65175 "name": "columnheader"
65178 "name": "definition"
65181 "name": "directory"
65217 "name": "presentation"
65229 "name": "rowheader"
65232 "name": "separator"
65250 "name": "complementary"
65253 "name": "contentinfo"
65262 "name": "navigation"
65271 "name": "doc-abstract"
65274 "name": "doc-acknowledgments"
65277 "name": "doc-afterword"
65280 "name": "doc-appendix"
65283 "name": "doc-backlink"
65286 "name": "doc-biblioentry"
65289 "name": "doc-bibliography"
65292 "name": "doc-biblioref"
65295 "name": "doc-chapter"
65298 "name": "doc-colophon"
65301 "name": "doc-conclusion"
65304 "name": "doc-cover"
65307 "name": "doc-credit"
65310 "name": "doc-credits"
65313 "name": "doc-dedication"
65316 "name": "doc-endnote"
65319 "name": "doc-endnotes"
65322 "name": "doc-epigraph"
65325 "name": "doc-epilogue"
65328 "name": "doc-errata"
65331 "name": "doc-example"
65334 "name": "doc-footnote"
65337 "name": "doc-foreword"
65340 "name": "doc-glossary"
65343 "name": "doc-glossref"
65346 "name": "doc-index"
65349 "name": "doc-introduction"
65352 "name": "doc-noteref"
65355 "name": "doc-notice"
65358 "name": "doc-pagebreak"
65361 "name": "doc-pagelist"
65367 "name": "doc-preface"
65370 "name": "doc-prologue"
65373 "name": "doc-pullquote"
65379 "name": "doc-subtitle"
65390 "name": "metanames",
65393 "name": "application-name"
65399 "name": "description"
65402 "name": "format-detection"
65405 "name": "generator"
65411 "name": "publisher"
65420 "name": "theme-color"
65433 /***/ ((__unused_webpack_module, exports) => {
65436 /*---------------------------------------------------------------------------------------------
65437 * Copyright (c) Microsoft Corporation. All rights reserved.
65438 * Licensed under the MIT License. See License.txt in the project root for license information.
65439 *--------------------------------------------------------------------------------------------*/
65440 Object.defineProperty(exports, "__esModule", ({ value: true }));
65441 exports.getLanguageModelCache = void 0;
65442 function getLanguageModelCache(maxEntries, cleanupIntervalTimeInSec, parse) {
65443 let languageModels = {};
65445 let cleanupInterval = undefined;
65446 if (cleanupIntervalTimeInSec > 0) {
65447 cleanupInterval = setInterval(() => {
65448 const cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000;
65449 const uris = Object.keys(languageModels);
65450 for (const uri of uris) {
65451 const languageModelInfo = languageModels[uri];
65452 if (languageModelInfo.cTime < cutoffTime) {
65453 delete languageModels[uri];
65457 }, cleanupIntervalTimeInSec * 1000);
65461 const version = document.version;
65462 const languageId = document.languageId;
65463 const languageModelInfo = languageModels[document.uri];
65464 if (languageModelInfo && languageModelInfo.version === version && languageModelInfo.languageId === languageId) {
65465 languageModelInfo.cTime = Date.now();
65466 return languageModelInfo.languageModel;
65468 const languageModel = parse(document);
65469 languageModels[document.uri] = { languageModel, version, languageId, cTime: Date.now() };
65470 if (!languageModelInfo) {
65473 if (nModels === maxEntries) {
65474 let oldestTime = Number.MAX_VALUE;
65475 let oldestUri = null;
65476 for (const uri in languageModels) {
65477 const languageModelInfo = languageModels[uri];
65478 if (languageModelInfo.cTime < oldestTime) {
65480 oldestTime = languageModelInfo.cTime;
65484 delete languageModels[oldestUri];
65488 return languageModel;
65490 onDocumentRemoved(document) {
65491 const uri = document.uri;
65492 if (languageModels[uri]) {
65493 delete languageModels[uri];
65498 if (typeof cleanupInterval !== 'undefined') {
65499 clearInterval(cleanupInterval);
65500 cleanupInterval = undefined;
65501 languageModels = {};
65507 exports.getLanguageModelCache = getLanguageModelCache;
65512 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
65515 /*---------------------------------------------------------------------------------------------
65516 * Copyright (c) Microsoft Corporation. All rights reserved.
65517 * Licensed under the MIT License. See License.txt in the project root for license information.
65518 *--------------------------------------------------------------------------------------------*/
65519 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
65520 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
65521 return new (P || (P = Promise))(function (resolve, reject) {
65522 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
65523 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
65524 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
65525 step((generator = generator.apply(thisArg, _arguments || [])).next());
65528 Object.defineProperty(exports, "__esModule", ({ value: true }));
65529 exports.getCSSMode = void 0;
65530 const languageModelCache_1 = __webpack_require__(145);
65531 const languageModes_1 = __webpack_require__(70);
65532 const embeddedSupport_1 = __webpack_require__(147);
65533 function getCSSMode(cssLanguageService, documentRegions, workspace) {
65534 let embeddedCSSDocuments = languageModelCache_1.getLanguageModelCache(10, 60, document => documentRegions.get(document).getEmbeddedDocument('css'));
65535 let cssStylesheets = languageModelCache_1.getLanguageModelCache(10, 60, document => cssLanguageService.parseStylesheet(document));
65540 doValidation(document, settings = workspace.settings) {
65541 return __awaiter(this, void 0, void 0, function* () {
65542 let embedded = embeddedCSSDocuments.get(document);
65543 return cssLanguageService.doValidation(embedded, cssStylesheets.get(embedded), settings && settings.css);
65546 doComplete(document, position, documentContext, _settings = workspace.settings) {
65547 return __awaiter(this, void 0, void 0, function* () {
65548 let embedded = embeddedCSSDocuments.get(document);
65549 const stylesheet = cssStylesheets.get(embedded);
65550 return cssLanguageService.doComplete2(embedded, position, stylesheet, documentContext) || languageModes_1.CompletionList.create();
65553 doHover(document, position, settings) {
65555 return __awaiter(this, void 0, void 0, function* () {
65556 let embedded = embeddedCSSDocuments.get(document);
65557 return cssLanguageService.doHover(embedded, position, cssStylesheets.get(embedded), (_a = settings === null || settings === void 0 ? void 0 : settings.html) === null || _a === void 0 ? void 0 : _a.hover);
65560 findDocumentHighlight(document, position) {
65561 return __awaiter(this, void 0, void 0, function* () {
65562 let embedded = embeddedCSSDocuments.get(document);
65563 return cssLanguageService.findDocumentHighlights(embedded, position, cssStylesheets.get(embedded));
65566 findDocumentSymbols(document) {
65567 return __awaiter(this, void 0, void 0, function* () {
65568 let embedded = embeddedCSSDocuments.get(document);
65569 return cssLanguageService.findDocumentSymbols(embedded, cssStylesheets.get(embedded)).filter(s => s.name !== embeddedSupport_1.CSS_STYLE_RULE);
65572 findDefinition(document, position) {
65573 return __awaiter(this, void 0, void 0, function* () {
65574 let embedded = embeddedCSSDocuments.get(document);
65575 return cssLanguageService.findDefinition(embedded, position, cssStylesheets.get(embedded));
65578 findReferences(document, position) {
65579 return __awaiter(this, void 0, void 0, function* () {
65580 let embedded = embeddedCSSDocuments.get(document);
65581 return cssLanguageService.findReferences(embedded, position, cssStylesheets.get(embedded));
65584 findDocumentColors(document) {
65585 return __awaiter(this, void 0, void 0, function* () {
65586 let embedded = embeddedCSSDocuments.get(document);
65587 return cssLanguageService.findDocumentColors(embedded, cssStylesheets.get(embedded));
65590 getColorPresentations(document, color, range) {
65591 return __awaiter(this, void 0, void 0, function* () {
65592 let embedded = embeddedCSSDocuments.get(document);
65593 return cssLanguageService.getColorPresentations(embedded, cssStylesheets.get(embedded), color, range);
65596 getFoldingRanges(document) {
65597 return __awaiter(this, void 0, void 0, function* () {
65598 let embedded = embeddedCSSDocuments.get(document);
65599 return cssLanguageService.getFoldingRanges(embedded, {});
65602 getSelectionRange(document, position) {
65603 return __awaiter(this, void 0, void 0, function* () {
65604 let embedded = embeddedCSSDocuments.get(document);
65605 return cssLanguageService.getSelectionRanges(embedded, [position], cssStylesheets.get(embedded))[0];
65608 onDocumentRemoved(document) {
65609 embeddedCSSDocuments.onDocumentRemoved(document);
65610 cssStylesheets.onDocumentRemoved(document);
65613 embeddedCSSDocuments.dispose();
65614 cssStylesheets.dispose();
65618 exports.getCSSMode = getCSSMode;
65623 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
65626 /*---------------------------------------------------------------------------------------------
65627 * Copyright (c) Microsoft Corporation. All rights reserved.
65628 * Licensed under the MIT License. See License.txt in the project root for license information.
65629 *--------------------------------------------------------------------------------------------*/
65630 Object.defineProperty(exports, "__esModule", ({ value: true }));
65631 exports.getDocumentRegions = exports.CSS_STYLE_RULE = void 0;
65632 const languageModes_1 = __webpack_require__(70);
65633 const vscode_languageserver_1 = __webpack_require__(49);
65634 exports.CSS_STYLE_RULE = '__';
65635 function getDocumentRegions(languageService, document) {
65637 let scanner = languageService.createScanner(document.getText());
65638 let lastTagName = '';
65639 let lastAttributeName = null;
65640 let languageIdFromType = undefined;
65641 let importedScripts = [];
65642 let token = scanner.scan();
65643 while (token !== languageModes_1.TokenType.EOS) {
65645 case languageModes_1.TokenType.StartTag:
65646 lastTagName = scanner.getTokenText();
65647 lastAttributeName = null;
65648 languageIdFromType = 'javascript';
65650 case languageModes_1.TokenType.Styles:
65651 regions.push({ languageId: 'css', start: scanner.getTokenOffset(), end: scanner.getTokenEnd() });
65653 case languageModes_1.TokenType.Script:
65654 regions.push({ languageId: languageIdFromType, start: scanner.getTokenOffset(), end: scanner.getTokenEnd() });
65656 case languageModes_1.TokenType.AttributeName:
65657 lastAttributeName = scanner.getTokenText();
65659 case languageModes_1.TokenType.AttributeValue:
65660 if (lastAttributeName === 'src' && lastTagName.toLowerCase() === 'script') {
65661 let value = scanner.getTokenText();
65662 if (value[0] === '\'' || value[0] === '"') {
65663 value = value.substr(1, value.length - 1);
65665 importedScripts.push(value);
65667 else if (lastAttributeName === 'type' && lastTagName.toLowerCase() === 'script') {
65668 if (/["'](module|(text|application)\/(java|ecma)script|text\/babel)["']/.test(scanner.getTokenText())) {
65669 languageIdFromType = 'javascript';
65671 else if (/["']text\/typescript["']/.test(scanner.getTokenText())) {
65672 languageIdFromType = 'typescript';
65675 languageIdFromType = undefined;
65679 let attributeLanguageId = getAttributeLanguage(lastAttributeName);
65680 if (attributeLanguageId) {
65681 let start = scanner.getTokenOffset();
65682 let end = scanner.getTokenEnd();
65683 let firstChar = document.getText()[start];
65684 if (firstChar === '\'' || firstChar === '"') {
65688 regions.push({ languageId: attributeLanguageId, start, end, attributeValue: true });
65691 lastAttributeName = null;
65694 token = scanner.scan();
65697 getLanguageRanges: (range) => getLanguageRanges(document, regions, range),
65698 getEmbeddedDocument: (languageId, ignoreAttributeValues) => getEmbeddedDocument(document, regions, languageId, ignoreAttributeValues),
65699 getLanguageAtPosition: (position) => getLanguageAtPosition(document, regions, position),
65700 getLanguagesInDocument: () => getLanguagesInDocument(document, regions),
65701 getImportedScripts: () => importedScripts
65704 exports.getDocumentRegions = getDocumentRegions;
65705 function getLanguageRanges(document, regions, range) {
65707 let currentPos = range ? range.start : vscode_languageserver_1.Position.create(0, 0);
65708 let currentOffset = range ? document.offsetAt(range.start) : 0;
65709 let endOffset = range ? document.offsetAt(range.end) : document.getText().length;
65710 for (let region of regions) {
65711 if (region.end > currentOffset && region.start < endOffset) {
65712 let start = Math.max(region.start, currentOffset);
65713 let startPos = document.positionAt(start);
65714 if (currentOffset < region.start) {
65721 let end = Math.min(region.end, endOffset);
65722 let endPos = document.positionAt(end);
65723 if (end > region.start) {
65727 languageId: region.languageId,
65728 attributeValue: region.attributeValue
65731 currentOffset = end;
65732 currentPos = endPos;
65735 if (currentOffset < endOffset) {
65736 let endPos = range ? range.end : document.positionAt(endOffset);
65745 function getLanguagesInDocument(_document, regions) {
65747 for (let region of regions) {
65748 if (region.languageId && result.indexOf(region.languageId) === -1) {
65749 result.push(region.languageId);
65750 if (result.length === 3) {
65755 result.push('html');
65758 function getLanguageAtPosition(document, regions, position) {
65759 let offset = document.offsetAt(position);
65760 for (let region of regions) {
65761 if (region.start <= offset) {
65762 if (offset <= region.end) {
65763 return region.languageId;
65772 function getEmbeddedDocument(document, contents, languageId, ignoreAttributeValues) {
65773 let currentPos = 0;
65774 let oldContent = document.getText();
65776 let lastSuffix = '';
65777 for (let c of contents) {
65778 if (c.languageId === languageId && (!ignoreAttributeValues || !c.attributeValue)) {
65779 result = substituteWithWhitespace(result, currentPos, c.start, oldContent, lastSuffix, getPrefix(c));
65780 result += oldContent.substring(c.start, c.end);
65781 currentPos = c.end;
65782 lastSuffix = getSuffix(c);
65785 result = substituteWithWhitespace(result, currentPos, oldContent.length, oldContent, lastSuffix, '');
65786 return languageModes_1.TextDocument.create(document.uri, languageId, document.version, result);
65788 function getPrefix(c) {
65789 if (c.attributeValue) {
65790 switch (c.languageId) {
65791 case 'css': return exports.CSS_STYLE_RULE + '{';
65796 function getSuffix(c) {
65797 if (c.attributeValue) {
65798 switch (c.languageId) {
65799 case 'css': return '}';
65800 case 'javascript': return ';';
65805 function substituteWithWhitespace(result, start, end, oldContent, before, after) {
65806 let accumulatedWS = 0;
65808 for (let i = start + before.length; i < end; i++) {
65809 let ch = oldContent[i];
65810 if (ch === '\n' || ch === '\r') {
65811 // only write new lines, skip the whitespace
65819 result = append(result, ' ', accumulatedWS - after.length);
65823 function append(result, str, n) {
65833 function getAttributeLanguage(attributeName) {
65834 let match = attributeName.match(/^(style)$|^(on\w+)$/i);
65838 return match[1] ? 'css' : 'javascript';
65844 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
65847 /*---------------------------------------------------------------------------------------------
65848 * Copyright (c) Microsoft Corporation. All rights reserved.
65849 * Licensed under the MIT License. See License.txt in the project root for license information.
65850 *--------------------------------------------------------------------------------------------*/
65851 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
65852 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
65853 return new (P || (P = Promise))(function (resolve, reject) {
65854 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
65855 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
65856 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
65857 step((generator = generator.apply(thisArg, _arguments || [])).next());
65860 Object.defineProperty(exports, "__esModule", ({ value: true }));
65861 exports.getHTMLMode = void 0;
65862 const languageModelCache_1 = __webpack_require__(145);
65863 function getHTMLMode(htmlLanguageService, workspace) {
65864 let htmlDocuments = languageModelCache_1.getLanguageModelCache(10, 60, document => htmlLanguageService.parseHTMLDocument(document));
65869 getSelectionRange(document, position) {
65870 return __awaiter(this, void 0, void 0, function* () {
65871 return htmlLanguageService.getSelectionRanges(document, [position])[0];
65874 doComplete(document, position, documentContext, settings = workspace.settings) {
65875 let options = settings && settings.html && settings.html.suggest;
65876 let doAutoComplete = settings && settings.html && settings.html.autoClosingTags;
65877 if (doAutoComplete) {
65878 options.hideAutoCompleteProposals = true;
65880 const htmlDocument = htmlDocuments.get(document);
65881 let completionList = htmlLanguageService.doComplete2(document, position, htmlDocument, documentContext, options);
65882 return completionList;
65884 doHover(document, position, settings) {
65886 return __awaiter(this, void 0, void 0, function* () {
65887 return htmlLanguageService.doHover(document, position, htmlDocuments.get(document), (_a = settings === null || settings === void 0 ? void 0 : settings.html) === null || _a === void 0 ? void 0 : _a.hover);
65890 findDocumentHighlight(document, position) {
65891 return __awaiter(this, void 0, void 0, function* () {
65892 return htmlLanguageService.findDocumentHighlights(document, position, htmlDocuments.get(document));
65895 findDocumentLinks(document, documentContext) {
65896 return __awaiter(this, void 0, void 0, function* () {
65897 return htmlLanguageService.findDocumentLinks(document, documentContext);
65900 findDocumentSymbols(document) {
65901 return __awaiter(this, void 0, void 0, function* () {
65902 return htmlLanguageService.findDocumentSymbols(document, htmlDocuments.get(document));
65905 format(document, range, formatParams, settings = workspace.settings) {
65906 return __awaiter(this, void 0, void 0, function* () {
65907 let formatSettings = settings && settings.html && settings.html.format;
65908 if (formatSettings) {
65909 formatSettings = merge(formatSettings, {});
65912 formatSettings = {};
65914 if (formatSettings.contentUnformatted) {
65915 formatSettings.contentUnformatted = formatSettings.contentUnformatted + ',script';
65918 formatSettings.contentUnformatted = 'script';
65920 formatSettings = merge(formatParams, formatSettings);
65921 return htmlLanguageService.format(document, range, formatSettings);
65924 getFoldingRanges(document) {
65925 return __awaiter(this, void 0, void 0, function* () {
65926 return htmlLanguageService.getFoldingRanges(document);
65929 doAutoClose(document, position) {
65930 return __awaiter(this, void 0, void 0, function* () {
65931 let offset = document.offsetAt(position);
65932 let text = document.getText();
65933 if (offset > 0 && text.charAt(offset - 1).match(/[>\/]/g)) {
65934 return htmlLanguageService.doTagComplete(document, position, htmlDocuments.get(document));
65939 doRename(document, position, newName) {
65940 return __awaiter(this, void 0, void 0, function* () {
65941 const htmlDocument = htmlDocuments.get(document);
65942 return htmlLanguageService.doRename(document, position, newName, htmlDocument);
65945 onDocumentRemoved(document) {
65946 return __awaiter(this, void 0, void 0, function* () {
65947 htmlDocuments.onDocumentRemoved(document);
65950 findMatchingTagPosition(document, position) {
65951 return __awaiter(this, void 0, void 0, function* () {
65952 const htmlDocument = htmlDocuments.get(document);
65953 return htmlLanguageService.findMatchingTagPosition(document, position, htmlDocument);
65956 doLinkedEditing(document, position) {
65957 return __awaiter(this, void 0, void 0, function* () {
65958 const htmlDocument = htmlDocuments.get(document);
65959 return htmlLanguageService.findLinkedEditingRanges(document, position, htmlDocument);
65963 htmlDocuments.dispose();
65967 exports.getHTMLMode = getHTMLMode;
65968 function merge(src, dst) {
65969 for (const key in src) {
65970 if (src.hasOwnProperty(key)) {
65971 dst[key] = src[key];
65980 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
65983 /*---------------------------------------------------------------------------------------------
65984 * Copyright (c) Microsoft Corporation. All rights reserved.
65985 * Licensed under the MIT License. See License.txt in the project root for license information.
65986 *--------------------------------------------------------------------------------------------*/
65987 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
65988 if (k2 === undefined) k2 = k;
65989 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
65990 }) : (function(o, m, k, k2) {
65991 if (k2 === undefined) k2 = k;
65994 var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
65995 Object.defineProperty(o, "default", { enumerable: true, value: v });
65996 }) : function(o, v) {
65999 var __importStar = (this && this.__importStar) || function (mod) {
66000 if (mod && mod.__esModule) return mod;
66002 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
66003 __setModuleDefault(result, mod);
66006 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
66007 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
66008 return new (P || (P = Promise))(function (resolve, reject) {
66009 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
66010 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
66011 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
66012 step((generator = generator.apply(thisArg, _arguments || [])).next());
66015 Object.defineProperty(exports, "__esModule", ({ value: true }));
66016 exports.getJavaScriptMode = void 0;
66017 const languageModelCache_1 = __webpack_require__(145);
66018 const languageModes_1 = __webpack_require__(70);
66019 const strings_1 = __webpack_require__(150);
66020 const ts = __importStar(__webpack_require__(151));
66021 const javascriptSemanticTokens_1 = __webpack_require__(152);
66022 const JS_WORD_REGEX = /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g;
66023 function getLanguageServiceHost(scriptKind) {
66024 const compilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic, experimentalDecorators: false };
66025 let currentTextDocument = languageModes_1.TextDocument.create('init', 'javascript', 1, '');
66026 const jsLanguageService = Promise.resolve().then(() => __importStar(__webpack_require__(/* webpackChunkName: "javascriptLibs" */ 153))).then(libs => {
66028 getCompilationSettings: () => compilerOptions,
66029 getScriptFileNames: () => [currentTextDocument.uri, 'jquery'],
66030 getScriptKind: (fileName) => {
66031 if (fileName === currentTextDocument.uri) {
66034 return fileName.substr(fileName.length - 2) === 'ts' ? ts.ScriptKind.TS : ts.ScriptKind.JS;
66036 getScriptVersion: (fileName) => {
66037 if (fileName === currentTextDocument.uri) {
66038 return String(currentTextDocument.version);
66040 return '1'; // default lib an jquery.d.ts are static
66042 getScriptSnapshot: (fileName) => {
66044 if (fileName === currentTextDocument.uri) {
66045 text = currentTextDocument.getText();
66048 text = libs.loadLibrary(fileName);
66051 getText: (start, end) => text.substring(start, end),
66052 getLength: () => text.length,
66053 getChangeRange: () => undefined
66056 getCurrentDirectory: () => '',
66057 getDefaultLibFileName: (_options) => 'es6'
66059 return ts.createLanguageService(host);
66062 getLanguageService(jsDocument) {
66063 return __awaiter(this, void 0, void 0, function* () {
66064 currentTextDocument = jsDocument;
66065 return jsLanguageService;
66068 getCompilationSettings() {
66069 return compilerOptions;
66072 if (jsLanguageService) {
66073 jsLanguageService.then(s => s.dispose());
66078 function getJavaScriptMode(documentRegions, languageId, workspace) {
66079 let jsDocuments = languageModelCache_1.getLanguageModelCache(10, 60, document => documentRegions.get(document).getEmbeddedDocument(languageId));
66080 const host = getLanguageServiceHost(languageId === 'javascript' ? ts.ScriptKind.JS : ts.ScriptKind.TS);
66081 let globalSettings = {};
66086 doValidation(document, settings = workspace.settings) {
66087 return __awaiter(this, void 0, void 0, function* () {
66088 host.getCompilationSettings()['experimentalDecorators'] = settings && settings.javascript && settings.javascript.implicitProjectConfig.experimentalDecorators;
66089 const jsDocument = jsDocuments.get(document);
66090 const languageService = yield host.getLanguageService(jsDocument);
66091 const syntaxDiagnostics = languageService.getSyntacticDiagnostics(jsDocument.uri);
66092 const semanticDiagnostics = languageService.getSemanticDiagnostics(jsDocument.uri);
66093 return syntaxDiagnostics.concat(semanticDiagnostics).map((diag) => {
66095 range: convertRange(jsDocument, diag),
66096 severity: languageModes_1.DiagnosticSeverity.Error,
66097 source: languageId,
66098 message: ts.flattenDiagnosticMessageText(diag.messageText, '\n')
66103 doComplete(document, position, _documentContext) {
66104 return __awaiter(this, void 0, void 0, function* () {
66105 const jsDocument = jsDocuments.get(document);
66106 const jsLanguageService = yield host.getLanguageService(jsDocument);
66107 let offset = jsDocument.offsetAt(position);
66108 let completions = jsLanguageService.getCompletionsAtPosition(jsDocument.uri, offset, { includeExternalModuleExports: false, includeInsertTextCompletions: false });
66109 if (!completions) {
66110 return { isIncomplete: false, items: [] };
66112 let replaceRange = convertRange(jsDocument, strings_1.getWordAtText(jsDocument.getText(), offset, JS_WORD_REGEX));
66114 isIncomplete: false,
66115 items: completions.entries.map(entry => {
66118 position: position,
66120 sortText: entry.sortText,
66121 kind: convertKind(entry.kind),
66122 textEdit: languageModes_1.TextEdit.replace(replaceRange, entry.name),
66133 doResolve(document, item) {
66134 return __awaiter(this, void 0, void 0, function* () {
66135 const jsDocument = jsDocuments.get(document);
66136 const jsLanguageService = yield host.getLanguageService(jsDocument);
66137 let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined);
66139 item.detail = ts.displayPartsToString(details.displayParts);
66140 item.documentation = ts.displayPartsToString(details.documentation);
66146 doHover(document, position) {
66147 return __awaiter(this, void 0, void 0, function* () {
66148 const jsDocument = jsDocuments.get(document);
66149 const jsLanguageService = yield host.getLanguageService(jsDocument);
66150 let info = jsLanguageService.getQuickInfoAtPosition(jsDocument.uri, jsDocument.offsetAt(position));
66152 const contents = ts.displayPartsToString(info.displayParts);
66154 range: convertRange(jsDocument, info.textSpan),
66155 contents: ['```typescript', contents, '```'].join('\n')
66161 doSignatureHelp(document, position) {
66162 return __awaiter(this, void 0, void 0, function* () {
66163 const jsDocument = jsDocuments.get(document);
66164 const jsLanguageService = yield host.getLanguageService(jsDocument);
66165 let signHelp = jsLanguageService.getSignatureHelpItems(jsDocument.uri, jsDocument.offsetAt(position), undefined);
66168 activeSignature: signHelp.selectedItemIndex,
66169 activeParameter: signHelp.argumentIndex,
66172 signHelp.items.forEach(item => {
66175 documentation: undefined,
66178 signature.label += ts.displayPartsToString(item.prefixDisplayParts);
66179 item.parameters.forEach((p, i, a) => {
66180 let label = ts.displayPartsToString(p.displayParts);
66183 documentation: ts.displayPartsToString(p.documentation)
66185 signature.label += label;
66186 signature.parameters.push(parameter);
66187 if (i < a.length - 1) {
66188 signature.label += ts.displayPartsToString(item.separatorDisplayParts);
66191 signature.label += ts.displayPartsToString(item.suffixDisplayParts);
66192 ret.signatures.push(signature);
66199 doRename(document, position, newName) {
66200 return __awaiter(this, void 0, void 0, function* () {
66201 const jsDocument = jsDocuments.get(document);
66202 const jsLanguageService = yield host.getLanguageService(jsDocument);
66203 const jsDocumentPosition = jsDocument.offsetAt(position);
66204 const { canRename } = jsLanguageService.getRenameInfo(jsDocument.uri, jsDocumentPosition);
66208 const renameInfos = jsLanguageService.findRenameLocations(jsDocument.uri, jsDocumentPosition, false, false);
66210 renameInfos === null || renameInfos === void 0 ? void 0 : renameInfos.map(renameInfo => {
66212 range: convertRange(jsDocument, renameInfo.textSpan),
66217 changes: { [document.uri]: edits },
66221 findDocumentHighlight(document, position) {
66222 return __awaiter(this, void 0, void 0, function* () {
66223 const jsDocument = jsDocuments.get(document);
66224 const jsLanguageService = yield host.getLanguageService(jsDocument);
66225 const highlights = jsLanguageService.getDocumentHighlights(jsDocument.uri, jsDocument.offsetAt(position), [jsDocument.uri]);
66227 for (const entry of highlights || []) {
66228 for (const highlight of entry.highlightSpans) {
66230 range: convertRange(jsDocument, highlight.textSpan),
66231 kind: highlight.kind === 'writtenReference' ? languageModes_1.DocumentHighlightKind.Write : languageModes_1.DocumentHighlightKind.Text
66238 findDocumentSymbols(document) {
66239 return __awaiter(this, void 0, void 0, function* () {
66240 const jsDocument = jsDocuments.get(document);
66241 const jsLanguageService = yield host.getLanguageService(jsDocument);
66242 let items = jsLanguageService.getNavigationBarItems(jsDocument.uri);
66245 let existing = Object.create(null);
66246 let collectSymbols = (item, containerLabel) => {
66247 let sig = item.text + item.kind + item.spans[0].start;
66248 if (item.kind !== 'script' && !existing[sig]) {
66251 kind: convertSymbolKind(item.kind),
66254 range: convertRange(jsDocument, item.spans[0])
66256 containerName: containerLabel
66258 existing[sig] = true;
66259 result.push(symbol);
66260 containerLabel = item.text;
66262 if (item.childItems && item.childItems.length > 0) {
66263 for (let child of item.childItems) {
66264 collectSymbols(child, containerLabel);
66268 items.forEach(item => collectSymbols(item));
66274 findDefinition(document, position) {
66275 return __awaiter(this, void 0, void 0, function* () {
66276 const jsDocument = jsDocuments.get(document);
66277 const jsLanguageService = yield host.getLanguageService(jsDocument);
66278 let definition = jsLanguageService.getDefinitionAtPosition(jsDocument.uri, jsDocument.offsetAt(position));
66280 return definition.filter(d => d.fileName === jsDocument.uri).map(d => {
66283 range: convertRange(jsDocument, d.textSpan)
66290 findReferences(document, position) {
66291 return __awaiter(this, void 0, void 0, function* () {
66292 const jsDocument = jsDocuments.get(document);
66293 const jsLanguageService = yield host.getLanguageService(jsDocument);
66294 let references = jsLanguageService.getReferencesAtPosition(jsDocument.uri, jsDocument.offsetAt(position));
66296 return references.filter(d => d.fileName === jsDocument.uri).map(d => {
66299 range: convertRange(jsDocument, d.textSpan)
66306 getSelectionRange(document, position) {
66307 return __awaiter(this, void 0, void 0, function* () {
66308 const jsDocument = jsDocuments.get(document);
66309 const jsLanguageService = yield host.getLanguageService(jsDocument);
66310 function convertSelectionRange(selectionRange) {
66311 const parent = selectionRange.parent ? convertSelectionRange(selectionRange.parent) : undefined;
66312 return languageModes_1.SelectionRange.create(convertRange(jsDocument, selectionRange.textSpan), parent);
66314 const range = jsLanguageService.getSmartSelectionRange(jsDocument.uri, jsDocument.offsetAt(position));
66315 return convertSelectionRange(range);
66318 format(document, range, formatParams, settings = globalSettings) {
66319 return __awaiter(this, void 0, void 0, function* () {
66320 const jsDocument = documentRegions.get(document).getEmbeddedDocument('javascript', true);
66321 const jsLanguageService = yield host.getLanguageService(jsDocument);
66322 let formatterSettings = settings && settings.javascript && settings.javascript.format;
66323 let initialIndentLevel = computeInitialIndent(document, range, formatParams);
66324 let formatSettings = convertOptions(formatParams, formatterSettings, initialIndentLevel + 1);
66325 let start = jsDocument.offsetAt(range.start);
66326 let end = jsDocument.offsetAt(range.end);
66327 let lastLineRange = null;
66328 if (range.end.line > range.start.line && (range.end.character === 0 || strings_1.isWhitespaceOnly(jsDocument.getText().substr(end - range.end.character, range.end.character)))) {
66329 end -= range.end.character;
66330 lastLineRange = languageModes_1.Range.create(languageModes_1.Position.create(range.end.line, 0), range.end);
66332 let edits = jsLanguageService.getFormattingEditsForRange(jsDocument.uri, start, end, formatSettings);
66335 for (let edit of edits) {
66336 if (edit.span.start >= start && edit.span.start + edit.span.length <= end) {
66338 range: convertRange(jsDocument, edit.span),
66339 newText: edit.newText
66343 if (lastLineRange) {
66345 range: lastLineRange,
66346 newText: generateIndent(initialIndentLevel, formatParams)
66354 getFoldingRanges(document) {
66355 return __awaiter(this, void 0, void 0, function* () {
66356 const jsDocument = jsDocuments.get(document);
66357 const jsLanguageService = yield host.getLanguageService(jsDocument);
66358 let spans = jsLanguageService.getOutliningSpans(jsDocument.uri);
66360 for (let span of spans) {
66361 let curr = convertRange(jsDocument, span.textSpan);
66362 let startLine = curr.start.line;
66363 let endLine = curr.end.line;
66364 if (startLine < endLine) {
66365 let foldingRange = { startLine, endLine };
66366 let match = document.getText(curr).match(/^\s*\/(?:(\/\s*#(?:end)?region\b)|(\*|\/))/);
66368 foldingRange.kind = match[1] ? languageModes_1.FoldingRangeKind.Region : languageModes_1.FoldingRangeKind.Comment;
66370 ranges.push(foldingRange);
66376 onDocumentRemoved(document) {
66377 jsDocuments.onDocumentRemoved(document);
66379 getSemanticTokens(document) {
66380 return __awaiter(this, void 0, void 0, function* () {
66381 const jsDocument = jsDocuments.get(document);
66382 const jsLanguageService = yield host.getLanguageService(jsDocument);
66383 return javascriptSemanticTokens_1.getSemanticTokens(jsLanguageService, jsDocument, jsDocument.uri);
66386 getSemanticTokenLegend() {
66387 return javascriptSemanticTokens_1.getSemanticTokenLegend();
66391 jsDocuments.dispose();
66395 exports.getJavaScriptMode = getJavaScriptMode;
66396 function convertRange(document, span) {
66397 if (typeof span.start === 'undefined') {
66398 const pos = document.positionAt(0);
66399 return languageModes_1.Range.create(pos, pos);
66401 const startPosition = document.positionAt(span.start);
66402 const endPosition = document.positionAt(span.start + (span.length || 0));
66403 return languageModes_1.Range.create(startPosition, endPosition);
66405 function convertKind(kind) {
66407 case 'primitive type':
66409 return languageModes_1.CompletionItemKind.Keyword;
66412 return languageModes_1.CompletionItemKind.Variable;
66416 return languageModes_1.CompletionItemKind.Field;
66422 return languageModes_1.CompletionItemKind.Function;
66424 return languageModes_1.CompletionItemKind.Enum;
66426 return languageModes_1.CompletionItemKind.Module;
66428 return languageModes_1.CompletionItemKind.Class;
66430 return languageModes_1.CompletionItemKind.Interface;
66432 return languageModes_1.CompletionItemKind.File;
66434 return languageModes_1.CompletionItemKind.Property;
66436 function convertSymbolKind(kind) {
66441 return languageModes_1.SymbolKind.Variable;
66443 case 'local function':
66444 return languageModes_1.SymbolKind.Function;
66446 return languageModes_1.SymbolKind.Enum;
66448 return languageModes_1.SymbolKind.Module;
66450 return languageModes_1.SymbolKind.Class;
66452 return languageModes_1.SymbolKind.Interface;
66454 return languageModes_1.SymbolKind.Method;
66458 return languageModes_1.SymbolKind.Property;
66460 return languageModes_1.SymbolKind.Variable;
66462 function convertOptions(options, formatSettings, initialIndentLevel) {
66464 ConvertTabsToSpaces: options.insertSpaces,
66465 TabSize: options.tabSize,
66466 IndentSize: options.tabSize,
66467 IndentStyle: ts.IndentStyle.Smart,
66468 NewLineCharacter: '\n',
66469 BaseIndentSize: options.tabSize * initialIndentLevel,
66470 InsertSpaceAfterCommaDelimiter: Boolean(!formatSettings || formatSettings.insertSpaceAfterCommaDelimiter),
66471 InsertSpaceAfterSemicolonInForStatements: Boolean(!formatSettings || formatSettings.insertSpaceAfterSemicolonInForStatements),
66472 InsertSpaceBeforeAndAfterBinaryOperators: Boolean(!formatSettings || formatSettings.insertSpaceBeforeAndAfterBinaryOperators),
66473 InsertSpaceAfterKeywordsInControlFlowStatements: Boolean(!formatSettings || formatSettings.insertSpaceAfterKeywordsInControlFlowStatements),
66474 InsertSpaceAfterFunctionKeywordForAnonymousFunctions: Boolean(!formatSettings || formatSettings.insertSpaceAfterFunctionKeywordForAnonymousFunctions),
66475 InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: Boolean(formatSettings && formatSettings.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis),
66476 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: Boolean(formatSettings && formatSettings.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets),
66477 InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: Boolean(formatSettings && formatSettings.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces),
66478 InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: Boolean(formatSettings && formatSettings.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces),
66479 PlaceOpenBraceOnNewLineForControlBlocks: Boolean(formatSettings && formatSettings.placeOpenBraceOnNewLineForFunctions),
66480 PlaceOpenBraceOnNewLineForFunctions: Boolean(formatSettings && formatSettings.placeOpenBraceOnNewLineForControlBlocks)
66483 function computeInitialIndent(document, range, options) {
66484 let lineStart = document.offsetAt(languageModes_1.Position.create(range.start.line, 0));
66485 let content = document.getText();
66488 let tabSize = options.tabSize || 4;
66489 while (i < content.length) {
66490 let ch = content.charAt(i);
66494 else if (ch === '\t') {
66502 return Math.floor(nChars / tabSize);
66504 function generateIndent(level, options) {
66505 if (options.insertSpaces) {
66506 return strings_1.repeat(' ', level * options.tabSize);
66509 return strings_1.repeat('\t', level);
66516 /***/ ((__unused_webpack_module, exports) => {
66519 /*---------------------------------------------------------------------------------------------
66520 * Copyright (c) Microsoft Corporation. All rights reserved.
66521 * Licensed under the MIT License. See License.txt in the project root for license information.
66522 *--------------------------------------------------------------------------------------------*/
66523 Object.defineProperty(exports, "__esModule", ({ value: true }));
66524 exports.isNewlineCharacter = exports.isEOL = exports.isWhitespaceOnly = exports.repeat = exports.endsWith = exports.startsWith = exports.getWordAtText = void 0;
66525 function getWordAtText(text, offset, wordDefinition) {
66526 let lineStart = offset;
66527 while (lineStart > 0 && !isNewlineCharacter(text.charCodeAt(lineStart - 1))) {
66530 let offsetInLine = offset - lineStart;
66531 let lineText = text.substr(lineStart);
66532 // make a copy of the regex as to not keep the state
66533 let flags = wordDefinition.ignoreCase ? 'gi' : 'g';
66534 wordDefinition = new RegExp(wordDefinition.source, flags);
66535 let match = wordDefinition.exec(lineText);
66536 while (match && match.index + match[0].length < offsetInLine) {
66537 match = wordDefinition.exec(lineText);
66539 if (match && match.index <= offsetInLine) {
66540 return { start: match.index + lineStart, length: match[0].length };
66542 return { start: offset, length: 0 };
66544 exports.getWordAtText = getWordAtText;
66545 function startsWith(haystack, needle) {
66546 if (haystack.length < needle.length) {
66549 for (let i = 0; i < needle.length; i++) {
66550 if (haystack[i] !== needle[i]) {
66556 exports.startsWith = startsWith;
66557 function endsWith(haystack, needle) {
66558 let diff = haystack.length - needle.length;
66560 return haystack.indexOf(needle, diff) === diff;
66562 else if (diff === 0) {
66563 return haystack === needle;
66569 exports.endsWith = endsWith;
66570 function repeat(value, count) {
66572 while (count > 0) {
66573 if ((count & 1) === 1) {
66577 count = count >>> 1;
66581 exports.repeat = repeat;
66582 function isWhitespaceOnly(str) {
66583 return /^\s*$/.test(str);
66585 exports.isWhitespaceOnly = isWhitespaceOnly;
66586 function isEOL(content, offset) {
66587 return isNewlineCharacter(content.charCodeAt(offset));
66589 exports.isEOL = isEOL;
66590 const CR = '\r'.charCodeAt(0);
66591 const NL = '\n'.charCodeAt(0);
66592 function isNewlineCharacter(charCode) {
66593 return charCode === CR || charCode === NL;
66595 exports.isNewlineCharacter = isNewlineCharacter;
66600 /***/ ((module) => {
66602 module.exports = require("typescript");;
66606 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
66609 /*---------------------------------------------------------------------------------------------
66610 * Copyright (c) Microsoft Corporation. All rights reserved.
66611 * Licensed under the MIT License. See License.txt in the project root for license information.
66612 *--------------------------------------------------------------------------------------------*/
66613 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
66614 if (k2 === undefined) k2 = k;
66615 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
66616 }) : (function(o, m, k, k2) {
66617 if (k2 === undefined) k2 = k;
66620 var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
66621 Object.defineProperty(o, "default", { enumerable: true, value: v });
66622 }) : function(o, v) {
66625 var __importStar = (this && this.__importStar) || function (mod) {
66626 if (mod && mod.__esModule) return mod;
66628 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
66629 __setModuleDefault(result, mod);
66632 Object.defineProperty(exports, "__esModule", ({ value: true }));
66633 exports.getSemanticTokens = exports.getSemanticTokenLegend = void 0;
66634 const ts = __importStar(__webpack_require__(151));
66635 function getSemanticTokenLegend() {
66636 if (tokenTypes.length !== 11 /* _ */) {
66637 console.warn('TokenType has added new entries.');
66639 if (tokenModifiers.length !== 4 /* _ */) {
66640 console.warn('TokenModifier has added new entries.');
66642 return { types: tokenTypes, modifiers: tokenModifiers };
66644 exports.getSemanticTokenLegend = getSemanticTokenLegend;
66645 function getSemanticTokens(jsLanguageService, currentTextDocument, fileName) {
66646 //https://ts-ast-viewer.com/#code/AQ0g2CmAuwGbALzAJwG4BQZQGNwEMBnQ4AQQEYBmYAb2C22zgEtJwATJVTRxgcwD27AQAp8AGmAAjAJS0A9POB8+7NQ168oscAJz5wANXwAnLug2bsJmAFcTAO2XAA1MHyvgu-UdOeWbOw8ViAAvpagocBAA
66647 let resultTokens = [];
66648 const collector = (node, typeIdx, modifierSet) => {
66649 resultTokens.push({ start: currentTextDocument.positionAt(node.getStart()), length: node.getWidth(), typeIdx, modifierSet });
66651 collectTokens(jsLanguageService, fileName, { start: 0, length: currentTextDocument.getText().length }, collector);
66652 return resultTokens;
66654 exports.getSemanticTokens = getSemanticTokens;
66655 function collectTokens(jsLanguageService, fileName, span, collector) {
66656 const program = jsLanguageService.getProgram();
66658 const typeChecker = program.getTypeChecker();
66659 function visit(node) {
66660 if (!node || !ts.textSpanIntersectsWith(span, node.pos, node.getFullWidth())) {
66663 if (ts.isIdentifier(node)) {
66664 let symbol = typeChecker.getSymbolAtLocation(node);
66666 if (symbol.flags & ts.SymbolFlags.Alias) {
66667 symbol = typeChecker.getAliasedSymbol(symbol);
66669 let typeIdx = classifySymbol(symbol);
66670 if (typeIdx !== undefined) {
66671 let modifierSet = 0;
66673 const parentTypeIdx = tokenFromDeclarationMapping[node.parent.kind];
66674 if (parentTypeIdx === typeIdx && node.parent.name === node) {
66675 modifierSet = 1 << 0 /* declaration */;
66678 const decl = symbol.valueDeclaration;
66679 const modifiers = decl ? ts.getCombinedModifierFlags(decl) : 0;
66680 const nodeFlags = decl ? ts.getCombinedNodeFlags(decl) : 0;
66681 if (modifiers & ts.ModifierFlags.Static) {
66682 modifierSet |= 1 << 1 /* static */;
66684 if (modifiers & ts.ModifierFlags.Async) {
66685 modifierSet |= 1 << 2 /* async */;
66687 if ((modifiers & ts.ModifierFlags.Readonly) || (nodeFlags & ts.NodeFlags.Const) || (symbol.getFlags() & ts.SymbolFlags.EnumMember)) {
66688 modifierSet |= 1 << 3 /* readonly */;
66690 collector(node, typeIdx, modifierSet);
66694 ts.forEachChild(node, visit);
66696 const sourceFile = program.getSourceFile(fileName);
66702 function classifySymbol(symbol) {
66703 const flags = symbol.getFlags();
66704 if (flags & ts.SymbolFlags.Class) {
66705 return 0 /* class */;
66707 else if (flags & ts.SymbolFlags.Enum) {
66708 return 1 /* enum */;
66710 else if (flags & ts.SymbolFlags.TypeAlias) {
66711 return 5 /* type */;
66713 else if (flags & ts.SymbolFlags.Type) {
66714 if (flags & ts.SymbolFlags.Interface) {
66715 return 2 /* interface */;
66717 if (flags & ts.SymbolFlags.TypeParameter) {
66718 return 4 /* typeParameter */;
66721 const decl = symbol.valueDeclaration || symbol.declarations && symbol.declarations[0];
66722 return decl && tokenFromDeclarationMapping[decl.kind];
66724 const tokenTypes = [];
66725 tokenTypes[0 /* class */] = 'class';
66726 tokenTypes[1 /* enum */] = 'enum';
66727 tokenTypes[2 /* interface */] = 'interface';
66728 tokenTypes[3 /* namespace */] = 'namespace';
66729 tokenTypes[4 /* typeParameter */] = 'typeParameter';
66730 tokenTypes[5 /* type */] = 'type';
66731 tokenTypes[6 /* parameter */] = 'parameter';
66732 tokenTypes[7 /* variable */] = 'variable';
66733 tokenTypes[8 /* property */] = 'property';
66734 tokenTypes[9 /* function */] = 'function';
66735 tokenTypes[10 /* method */] = 'method';
66736 const tokenModifiers = [];
66737 tokenModifiers[2 /* async */] = 'async';
66738 tokenModifiers[0 /* declaration */] = 'declaration';
66739 tokenModifiers[3 /* readonly */] = 'readonly';
66740 tokenModifiers[1 /* static */] = 'static';
66741 const tokenFromDeclarationMapping = {
66742 [ts.SyntaxKind.VariableDeclaration]: 7 /* variable */,
66743 [ts.SyntaxKind.Parameter]: 6 /* parameter */,
66744 [ts.SyntaxKind.PropertyDeclaration]: 8 /* property */,
66745 [ts.SyntaxKind.ModuleDeclaration]: 3 /* namespace */,
66746 [ts.SyntaxKind.EnumDeclaration]: 1 /* enum */,
66747 [ts.SyntaxKind.EnumMember]: 8 /* property */,
66748 [ts.SyntaxKind.ClassDeclaration]: 0 /* class */,
66749 [ts.SyntaxKind.MethodDeclaration]: 10 /* method */,
66750 [ts.SyntaxKind.FunctionDeclaration]: 9 /* function */,
66751 [ts.SyntaxKind.MethodSignature]: 10 /* method */,
66752 [ts.SyntaxKind.GetAccessor]: 8 /* property */,
66753 [ts.SyntaxKind.PropertySignature]: 8 /* property */,
66754 [ts.SyntaxKind.InterfaceDeclaration]: 2 /* interface */,
66755 [ts.SyntaxKind.TypeAliasDeclaration]: 5 /* type */,
66756 [ts.SyntaxKind.TypeParameter]: 4 /* typeParameter */
66762 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
66765 /*---------------------------------------------------------------------------------------------
66766 * Copyright (c) Microsoft Corporation. All rights reserved.
66767 * Licensed under the MIT License. See License.txt in the project root for license information.
66768 *--------------------------------------------------------------------------------------------*/
66769 Object.defineProperty(exports, "__esModule", ({ value: true }));
66770 exports.loadLibrary = void 0;
66771 const path_1 = __webpack_require__(3);
66772 const fs_1 = __webpack_require__(64);
66773 const contents = {};
66774 const extensionFolder = path_1.dirname(__dirname);
66775 const TYPESCRIPT_LIB_SOURCE = path_1.join(extensionFolder, 'node_modules/typescript/lib');
66776 const JQUERY_PATH = path_1.join(extensionFolder, 'jquery.d.ts');
66777 function loadLibrary(name) {
66778 let content = contents[name];
66779 if (typeof content !== 'string') {
66781 if (name === 'jquery') {
66782 libPath = JQUERY_PATH;
66785 libPath = path_1.join(TYPESCRIPT_LIB_SOURCE, name); // from source
66788 content = fs_1.readFileSync(libPath).toString();
66791 console.log(`Unable to load library ${name} at ${libPath}: ${e.message}`);
66794 contents[name] = content;
66798 exports.loadLibrary = loadLibrary;
66803 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
66806 /*---------------------------------------------------------------------------------------------
66807 * Copyright (c) Microsoft Corporation. All rights reserved.
66808 * Licensed under the MIT License. See License.txt in the project root for license information.
66809 *--------------------------------------------------------------------------------------------*/
66810 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
66811 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
66812 return new (P || (P = Promise))(function (resolve, reject) {
66813 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
66814 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
66815 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
66816 step((generator = generator.apply(thisArg, _arguments || [])).next());
66819 Object.defineProperty(exports, "__esModule", ({ value: true }));
66820 exports.format = void 0;
66821 const languageModes_1 = __webpack_require__(70);
66822 const arrays_1 = __webpack_require__(155);
66823 const strings_1 = __webpack_require__(150);
66824 function format(languageModes, document, formatRange, formattingOptions, settings, enabledModes) {
66825 return __awaiter(this, void 0, void 0, function* () {
66827 let endPos = formatRange.end;
66828 let endOffset = document.offsetAt(endPos);
66829 let content = document.getText();
66830 if (endPos.character === 0 && endPos.line > 0 && endOffset !== content.length) {
66831 // if selection ends after a new line, exclude that new line
66832 let prevLineStart = document.offsetAt(languageModes_1.Position.create(endPos.line - 1, 0));
66833 while (strings_1.isEOL(content, endOffset - 1) && endOffset > prevLineStart) {
66836 formatRange = languageModes_1.Range.create(formatRange.start, document.positionAt(endOffset));
66838 // run the html formatter on the full range and pass the result content to the embedded formatters.
66839 // from the final content create a single edit
66840 // advantages of this approach are
66841 // - correct indents in the html document
66842 // - correct initial indent for embedded formatters
66843 // - no worrying of overlapping edits
66844 // make sure we start in html
66845 let allRanges = languageModes.getModesInRange(document, formatRange);
66847 let startPos = formatRange.start;
66848 let isHTML = (range) => range.mode && range.mode.getId() === 'html';
66849 while (i < allRanges.length && !isHTML(allRanges[i])) {
66850 let range = allRanges[i];
66851 if (!range.attributeValue && range.mode && range.mode.format) {
66852 let edits = yield range.mode.format(document, languageModes_1.Range.create(startPos, range.end), formattingOptions, settings);
66853 arrays_1.pushAll(result, edits);
66855 startPos = range.end;
66858 if (i === allRanges.length) {
66861 // modify the range
66862 formatRange = languageModes_1.Range.create(startPos, formatRange.end);
66863 // perform a html format and apply changes to a new document
66864 let htmlMode = languageModes.getMode('html');
66865 let htmlEdits = yield htmlMode.format(document, formatRange, formattingOptions, settings);
66866 let htmlFormattedContent = languageModes_1.TextDocument.applyEdits(document, htmlEdits);
66867 let newDocument = languageModes_1.TextDocument.create(document.uri + '.tmp', document.languageId, document.version, htmlFormattedContent);
66869 // run embedded formatters on html formatted content: - formatters see correct initial indent
66870 let afterFormatRangeLength = document.getText().length - document.offsetAt(formatRange.end); // length of unchanged content after replace range
66871 let newFormatRange = languageModes_1.Range.create(formatRange.start, newDocument.positionAt(htmlFormattedContent.length - afterFormatRangeLength));
66872 let embeddedRanges = languageModes.getModesInRange(newDocument, newFormatRange);
66873 let embeddedEdits = [];
66874 for (let r of embeddedRanges) {
66876 if (mode && mode.format && enabledModes[mode.getId()] && !r.attributeValue) {
66877 let edits = yield mode.format(newDocument, r, formattingOptions, settings);
66878 for (let edit of edits) {
66879 embeddedEdits.push(edit);
66883 if (embeddedEdits.length === 0) {
66884 arrays_1.pushAll(result, htmlEdits);
66887 // apply all embedded format edits and create a single edit for all changes
66888 let resultContent = languageModes_1.TextDocument.applyEdits(newDocument, embeddedEdits);
66889 let resultReplaceText = resultContent.substring(document.offsetAt(formatRange.start), resultContent.length - afterFormatRangeLength);
66890 result.push(languageModes_1.TextEdit.replace(formatRange, resultReplaceText));
66894 languageModes.onDocumentRemoved(newDocument);
66898 exports.format = format;
66903 /***/ ((__unused_webpack_module, exports) => {
66906 /*---------------------------------------------------------------------------------------------
66907 * Copyright (c) Microsoft Corporation. All rights reserved.
66908 * Licensed under the MIT License. See License.txt in the project root for license information.
66909 *--------------------------------------------------------------------------------------------*/
66910 Object.defineProperty(exports, "__esModule", ({ value: true }));
66911 exports.binarySearch = exports.mergeSort = exports.contains = exports.pushAll = void 0;
66912 function pushAll(to, from) {
66914 for (const e of from) {
66919 exports.pushAll = pushAll;
66920 function contains(arr, val) {
66921 return arr.indexOf(val) !== -1;
66923 exports.contains = contains;
66925 * Like `Array#sort` but always stable. Usually runs a little slower `than Array#sort`
66926 * so only use this when actually needing stable sort.
66928 function mergeSort(data, compare) {
66929 _divideAndMerge(data, compare);
66932 exports.mergeSort = mergeSort;
66933 function _divideAndMerge(data, compare) {
66934 if (data.length <= 1) {
66938 const p = (data.length / 2) | 0;
66939 const left = data.slice(0, p);
66940 const right = data.slice(p);
66941 _divideAndMerge(left, compare);
66942 _divideAndMerge(right, compare);
66946 while (leftIdx < left.length && rightIdx < right.length) {
66947 let ret = compare(left[leftIdx], right[rightIdx]);
66949 // smaller_equal -> take left to preserve order
66950 data[i++] = left[leftIdx++];
66953 // greater -> take right
66954 data[i++] = right[rightIdx++];
66957 while (leftIdx < left.length) {
66958 data[i++] = left[leftIdx++];
66960 while (rightIdx < right.length) {
66961 data[i++] = right[rightIdx++];
66964 function binarySearch(array, key, comparator) {
66965 let low = 0, high = array.length - 1;
66966 while (low <= high) {
66967 let mid = ((low + high) / 2) | 0;
66968 let comp = comparator(array[mid], key);
66972 else if (comp > 0) {
66981 exports.binarySearch = binarySearch;
66986 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
66989 /*---------------------------------------------------------------------------------------------
66990 * Copyright (c) Microsoft Corporation. All rights reserved.
66991 * Licensed under the MIT License. See License.txt in the project root for license information.
66992 *--------------------------------------------------------------------------------------------*/
66993 Object.defineProperty(exports, "__esModule", ({ value: true }));
66994 exports.getDocumentContext = void 0;
66995 const strings_1 = __webpack_require__(150);
66996 const requests_1 = __webpack_require__(157);
66997 function getDocumentContext(documentUri, workspaceFolders) {
66998 function getRootFolder() {
66999 for (let folder of workspaceFolders) {
67000 let folderURI = folder.uri;
67001 if (!strings_1.endsWith(folderURI, '/')) {
67002 folderURI = folderURI + '/';
67004 if (strings_1.startsWith(documentUri, folderURI)) {
67011 resolveReference: (ref, base = documentUri) => {
67012 if (ref[0] === '/') { // resolve absolute path against the current workspace folder
67013 let folderUri = getRootFolder();
67015 return folderUri + ref.substr(1);
67018 base = base.substr(0, base.lastIndexOf('/') + 1);
67019 return requests_1.resolvePath(base, ref);
67023 exports.getDocumentContext = getDocumentContext;
67028 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
67031 /*---------------------------------------------------------------------------------------------
67032 * Copyright (c) Microsoft Corporation. All rights reserved.
67033 * Licensed under the MIT License. See License.txt in the project root for license information.
67034 *--------------------------------------------------------------------------------------------*/
67035 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
67036 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67037 return new (P || (P = Promise))(function (resolve, reject) {
67038 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67039 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67040 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
67041 step((generator = generator.apply(thisArg, _arguments || [])).next());
67044 Object.defineProperty(exports, "__esModule", ({ value: true }));
67045 exports.joinPath = exports.normalizePath = exports.resolvePath = exports.isAbsolutePath = exports.extname = exports.basename = exports.dirname = exports.getScheme = exports.getRequestService = exports.FileType = exports.FsReadDirRequest = exports.FsStatRequest = exports.FsContentRequest = void 0;
67046 const vscode_uri_1 = __webpack_require__(135);
67047 const vscode_languageserver_1 = __webpack_require__(49);
67048 var FsContentRequest;
67049 (function (FsContentRequest) {
67050 FsContentRequest.type = new vscode_languageserver_1.RequestType('fs/content');
67051 })(FsContentRequest = exports.FsContentRequest || (exports.FsContentRequest = {}));
67053 (function (FsStatRequest) {
67054 FsStatRequest.type = new vscode_languageserver_1.RequestType('fs/stat');
67055 })(FsStatRequest = exports.FsStatRequest || (exports.FsStatRequest = {}));
67056 var FsReadDirRequest;
67057 (function (FsReadDirRequest) {
67058 FsReadDirRequest.type = new vscode_languageserver_1.RequestType('fs/readDir');
67059 })(FsReadDirRequest = exports.FsReadDirRequest || (exports.FsReadDirRequest = {}));
67061 (function (FileType) {
67063 * The file type is unknown.
67065 FileType[FileType["Unknown"] = 0] = "Unknown";
67069 FileType[FileType["File"] = 1] = "File";
67073 FileType[FileType["Directory"] = 2] = "Directory";
67075 * A symbolic link to a file.
67077 FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
67078 })(FileType = exports.FileType || (exports.FileType = {}));
67079 function getRequestService(handledSchemas, connection, runtime) {
67080 const builtInHandlers = {};
67081 for (let protocol of handledSchemas) {
67082 if (protocol === 'file') {
67083 builtInHandlers[protocol] = runtime.file;
67085 else if (protocol === 'http' || protocol === 'https') {
67086 builtInHandlers[protocol] = runtime.http;
67091 return __awaiter(this, void 0, void 0, function* () {
67092 const handler = builtInHandlers[getScheme(uri)];
67094 return handler.stat(uri);
67096 const res = yield connection.sendRequest(FsStatRequest.type, uri.toString());
67100 readDirectory(uri) {
67101 const handler = builtInHandlers[getScheme(uri)];
67103 return handler.readDirectory(uri);
67105 return connection.sendRequest(FsReadDirRequest.type, uri.toString());
67107 getContent(uri, encoding) {
67108 const handler = builtInHandlers[getScheme(uri)];
67110 return handler.getContent(uri, encoding);
67112 return connection.sendRequest(FsContentRequest.type, { uri: uri.toString(), encoding });
67116 exports.getRequestService = getRequestService;
67117 function getScheme(uri) {
67118 return uri.substr(0, uri.indexOf(':'));
67120 exports.getScheme = getScheme;
67121 function dirname(uri) {
67122 const lastIndexOfSlash = uri.lastIndexOf('/');
67123 return lastIndexOfSlash !== -1 ? uri.substr(0, lastIndexOfSlash) : '';
67125 exports.dirname = dirname;
67126 function basename(uri) {
67127 const lastIndexOfSlash = uri.lastIndexOf('/');
67128 return uri.substr(lastIndexOfSlash + 1);
67130 exports.basename = basename;
67131 const Slash = '/'.charCodeAt(0);
67132 const Dot = '.'.charCodeAt(0);
67133 function extname(uri) {
67134 for (let i = uri.length - 1; i >= 0; i--) {
67135 const ch = uri.charCodeAt(i);
67137 if (i > 0 && uri.charCodeAt(i - 1) !== Slash) {
67138 return uri.substr(i);
67144 else if (ch === Slash) {
67150 exports.extname = extname;
67151 function isAbsolutePath(path) {
67152 return path.charCodeAt(0) === Slash;
67154 exports.isAbsolutePath = isAbsolutePath;
67155 function resolvePath(uriString, path) {
67156 if (isAbsolutePath(path)) {
67157 const uri = vscode_uri_1.URI.parse(uriString);
67158 const parts = path.split('/');
67159 return uri.with({ path: normalizePath(parts) }).toString();
67161 return joinPath(uriString, path);
67163 exports.resolvePath = resolvePath;
67164 function normalizePath(parts) {
67165 const newParts = [];
67166 for (const part of parts) {
67167 if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) {
67170 else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {
67174 newParts.push(part);
67177 if (parts.length > 1 && parts[parts.length - 1].length === 0) {
67180 let res = newParts.join('/');
67181 if (parts[0].length === 0) {
67186 exports.normalizePath = normalizePath;
67187 function joinPath(uriString, ...paths) {
67188 const uri = vscode_uri_1.URI.parse(uriString);
67189 const parts = uri.path.split('/');
67190 for (let path of paths) {
67191 parts.push(...path.split('/'));
67193 return uri.with({ path: normalizePath(parts) }).toString();
67195 exports.joinPath = joinPath;
67200 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
67203 /*---------------------------------------------------------------------------------------------
67204 * Copyright (c) Microsoft Corporation. All rights reserved.
67205 * Licensed under the MIT License. See License.txt in the project root for license information.
67206 *--------------------------------------------------------------------------------------------*/
67207 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
67208 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67209 return new (P || (P = Promise))(function (resolve, reject) {
67210 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67211 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67212 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
67213 step((generator = generator.apply(thisArg, _arguments || [])).next());
67216 Object.defineProperty(exports, "__esModule", ({ value: true }));
67217 exports.getFoldingRanges = void 0;
67218 const languageModes_1 = __webpack_require__(70);
67219 function getFoldingRanges(languageModes, document, maxRanges, _cancellationToken) {
67220 return __awaiter(this, void 0, void 0, function* () {
67221 let htmlMode = languageModes.getMode('html');
67222 let range = languageModes_1.Range.create(languageModes_1.Position.create(0, 0), languageModes_1.Position.create(document.lineCount, 0));
67224 if (htmlMode && htmlMode.getFoldingRanges) {
67225 result.push(...yield htmlMode.getFoldingRanges(document));
67227 // cache folding ranges per mode
67228 let rangesPerMode = Object.create(null);
67229 let getRangesForMode = (mode) => __awaiter(this, void 0, void 0, function* () {
67230 if (mode.getFoldingRanges) {
67231 let ranges = rangesPerMode[mode.getId()];
67232 if (!Array.isArray(ranges)) {
67233 ranges = (yield mode.getFoldingRanges(document)) || [];
67234 rangesPerMode[mode.getId()] = ranges;
67240 let modeRanges = languageModes.getModesInRange(document, range);
67241 for (let modeRange of modeRanges) {
67242 let mode = modeRange.mode;
67243 if (mode && mode !== htmlMode && !modeRange.attributeValue) {
67244 const ranges = yield getRangesForMode(mode);
67245 result.push(...ranges.filter(r => r.startLine >= modeRange.start.line && r.endLine < modeRange.end.line));
67248 if (maxRanges && result.length > maxRanges) {
67249 result = limitRanges(result, maxRanges);
67254 exports.getFoldingRanges = getFoldingRanges;
67255 function limitRanges(ranges, maxRanges) {
67256 ranges = ranges.sort((r1, r2) => {
67257 let diff = r1.startLine - r2.startLine;
67259 diff = r1.endLine - r2.endLine;
67263 // compute each range's nesting level in 'nestingLevels'.
67264 // count the number of ranges for each level in 'nestingLevelCounts'
67265 let top = undefined;
67267 let nestingLevels = [];
67268 let nestingLevelCounts = [];
67269 let setNestingLevel = (index, level) => {
67270 nestingLevels[index] = level;
67272 nestingLevelCounts[level] = (nestingLevelCounts[level] || 0) + 1;
67275 // compute nesting levels and sanitize
67276 for (let i = 0; i < ranges.length; i++) {
67277 let entry = ranges[i];
67280 setNestingLevel(i, 0);
67283 if (entry.startLine > top.startLine) {
67284 if (entry.endLine <= top.endLine) {
67285 previous.push(top);
67287 setNestingLevel(i, previous.length);
67289 else if (entry.startLine > top.endLine) {
67291 top = previous.pop();
67292 } while (top && entry.startLine > top.endLine);
67294 previous.push(top);
67297 setNestingLevel(i, previous.length);
67304 for (let i = 0; i < nestingLevelCounts.length; i++) {
67305 let n = nestingLevelCounts[i];
67307 if (n + entries > maxRanges) {
67315 for (let i = 0; i < ranges.length; i++) {
67316 let level = nestingLevels[i];
67317 if (typeof level === 'number') {
67318 if (level < maxLevel || (level === maxLevel && entries++ < maxRanges)) {
67319 result.push(ranges[i]);
67329 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
67332 /*---------------------------------------------------------------------------------------------
67333 * Copyright (c) Microsoft Corporation. All rights reserved.
67334 * Licensed under the MIT License. See License.txt in the project root for license information.
67335 *--------------------------------------------------------------------------------------------*/
67336 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
67337 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67338 return new (P || (P = Promise))(function (resolve, reject) {
67339 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67340 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67341 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
67342 step((generator = generator.apply(thisArg, _arguments || [])).next());
67345 Object.defineProperty(exports, "__esModule", ({ value: true }));
67346 exports.fetchHTMLDataProviders = void 0;
67347 const vscode_html_languageservice_1 = __webpack_require__(115);
67348 function fetchHTMLDataProviders(dataPaths, requestService) {
67349 const providers = dataPaths.map((p) => __awaiter(this, void 0, void 0, function* () {
67351 const content = yield requestService.getContent(p);
67352 return parseHTMLData(p, content);
67355 return vscode_html_languageservice_1.newHTMLDataProvider(p, { version: 1 });
67358 return Promise.all(providers);
67360 exports.fetchHTMLDataProviders = fetchHTMLDataProviders;
67361 function parseHTMLData(id, source) {
67364 rawData = JSON.parse(source);
67367 return vscode_html_languageservice_1.newHTMLDataProvider(id, { version: 1 });
67369 return vscode_html_languageservice_1.newHTMLDataProvider(id, {
67370 version: rawData.version || 1,
67371 tags: rawData.tags || [],
67372 globalAttributes: rawData.globalAttributes || [],
67373 valueSets: rawData.valueSets || []
67380 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
67383 /*---------------------------------------------------------------------------------------------
67384 * Copyright (c) Microsoft Corporation. All rights reserved.
67385 * Licensed under the MIT License. See License.txt in the project root for license information.
67386 *--------------------------------------------------------------------------------------------*/
67387 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
67388 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67389 return new (P || (P = Promise))(function (resolve, reject) {
67390 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67391 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67392 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
67393 step((generator = generator.apply(thisArg, _arguments || [])).next());
67396 Object.defineProperty(exports, "__esModule", ({ value: true }));
67397 exports.getSelectionRanges = void 0;
67398 const languageModes_1 = __webpack_require__(70);
67399 const positions_1 = __webpack_require__(161);
67400 function getSelectionRanges(languageModes, document, positions) {
67401 return __awaiter(this, void 0, void 0, function* () {
67402 const htmlMode = languageModes.getMode('html');
67403 return Promise.all(positions.map((position) => __awaiter(this, void 0, void 0, function* () {
67404 const htmlRange = yield htmlMode.getSelectionRange(document, position);
67405 const mode = languageModes.getModeAtPosition(document, position);
67406 if (mode && mode.getSelectionRange) {
67407 let range = yield mode.getSelectionRange(document, position);
67409 while (top.parent && positions_1.insideRangeButNotSame(htmlRange.range, top.parent.range)) {
67412 top.parent = htmlRange;
67415 return htmlRange || languageModes_1.SelectionRange.create(languageModes_1.Range.create(position, position));
67419 exports.getSelectionRanges = getSelectionRanges;
67424 /***/ ((__unused_webpack_module, exports) => {
67427 /*---------------------------------------------------------------------------------------------
67428 * Copyright (c) Microsoft Corporation. All rights reserved.
67429 * Licensed under the MIT License. See License.txt in the project root for license information.
67430 *--------------------------------------------------------------------------------------------*/
67431 Object.defineProperty(exports, "__esModule", ({ value: true }));
67432 exports.equalRange = exports.insideRangeButNotSame = exports.beforeOrSame = void 0;
67433 function beforeOrSame(p1, p2) {
67434 return p1.line < p2.line || p1.line === p2.line && p1.character <= p2.character;
67436 exports.beforeOrSame = beforeOrSame;
67437 function insideRangeButNotSame(r1, r2) {
67438 return beforeOrSame(r1.start, r2.start) && beforeOrSame(r2.end, r1.end) && !equalRange(r1, r2);
67440 exports.insideRangeButNotSame = insideRangeButNotSame;
67441 function equalRange(r1, r2) {
67442 return r1.start.line === r2.start.line && r1.start.character === r2.start.character && r1.end.line === r2.end.line && r1.end.character === r2.end.character;
67444 exports.equalRange = equalRange;
67449 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
67452 /*---------------------------------------------------------------------------------------------
67453 * Copyright (c) Microsoft Corporation. All rights reserved.
67454 * Licensed under the MIT License. See License.txt in the project root for license information.
67455 *--------------------------------------------------------------------------------------------*/
67456 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
67457 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
67458 return new (P || (P = Promise))(function (resolve, reject) {
67459 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
67460 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
67461 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
67462 step((generator = generator.apply(thisArg, _arguments || [])).next());
67465 Object.defineProperty(exports, "__esModule", ({ value: true }));
67466 exports.newSemanticTokenProvider = void 0;
67467 const languageModes_1 = __webpack_require__(70);
67468 const positions_1 = __webpack_require__(161);
67469 function newSemanticTokenProvider(languageModes) {
67470 // combined legend across modes
67471 const legend = { types: [], modifiers: [] };
67472 const legendMappings = {};
67473 for (let mode of languageModes.getAllModes()) {
67474 if (mode.getSemanticTokenLegend && mode.getSemanticTokens) {
67475 const modeLegend = mode.getSemanticTokenLegend();
67476 legendMappings[mode.getId()] = { types: createMapping(modeLegend.types, legend.types), modifiers: createMapping(modeLegend.modifiers, legend.modifiers) };
67481 getSemanticTokens(document, ranges) {
67482 return __awaiter(this, void 0, void 0, function* () {
67483 const allTokens = [];
67484 for (let mode of languageModes.getAllModesInDocument(document)) {
67485 if (mode.getSemanticTokens) {
67486 const mapping = legendMappings[mode.getId()];
67487 const tokens = yield mode.getSemanticTokens(document);
67488 applyTypesMapping(tokens, mapping.types);
67489 applyModifiersMapping(tokens, mapping.modifiers);
67490 for (let token of tokens) {
67491 allTokens.push(token);
67495 return encodeTokens(allTokens, ranges, document);
67500 exports.newSemanticTokenProvider = newSemanticTokenProvider;
67501 function createMapping(origLegend, newLegend) {
67502 const mapping = [];
67503 let needsMapping = false;
67504 for (let origIndex = 0; origIndex < origLegend.length; origIndex++) {
67505 const entry = origLegend[origIndex];
67506 let newIndex = newLegend.indexOf(entry);
67507 if (newIndex === -1) {
67508 newIndex = newLegend.length;
67509 newLegend.push(entry);
67511 mapping.push(newIndex);
67512 needsMapping = needsMapping || (newIndex !== origIndex);
67514 return needsMapping ? mapping : undefined;
67516 function applyTypesMapping(tokens, typesMapping) {
67517 if (typesMapping) {
67518 for (let token of tokens) {
67519 token.typeIdx = typesMapping[token.typeIdx];
67523 function applyModifiersMapping(tokens, modifiersMapping) {
67524 if (modifiersMapping) {
67525 for (let token of tokens) {
67526 let modifierSet = token.modifierSet;
67530 while (modifierSet > 0) {
67531 if ((modifierSet & 1) !== 0) {
67532 result = result + (1 << modifiersMapping[index]);
67535 modifierSet = modifierSet >> 1;
67537 token.modifierSet = result;
67542 function encodeTokens(tokens, ranges, document) {
67543 const resultTokens = tokens.sort((d1, d2) => d1.start.line - d2.start.line || d1.start.character - d2.start.character);
67545 ranges = ranges.sort((d1, d2) => d1.start.line - d2.start.line || d1.start.character - d2.start.character);
67548 ranges = [languageModes_1.Range.create(languageModes_1.Position.create(0, 0), languageModes_1.Position.create(document.lineCount, 0))];
67550 let rangeIndex = 0;
67551 let currRange = ranges[rangeIndex++];
67554 let encodedResult = [];
67555 for (let k = 0; k < resultTokens.length && currRange; k++) {
67556 const curr = resultTokens[k];
67557 const start = curr.start;
67558 while (currRange && positions_1.beforeOrSame(currRange.end, start)) {
67559 currRange = ranges[rangeIndex++];
67561 if (currRange && positions_1.beforeOrSame(currRange.start, start) && positions_1.beforeOrSame({ line: start.line, character: start.character + curr.length }, currRange.end)) {
67562 // token inside a range
67563 if (prefLine !== start.line) {
67566 encodedResult.push(start.line - prefLine); // line delta
67567 encodedResult.push(start.character - prevChar); // line delta
67568 encodedResult.push(curr.length); // length
67569 encodedResult.push(curr.typeIdx); // tokenType
67570 encodedResult.push(curr.modifierSet); // tokenModifier
67571 prefLine = start.line;
67572 prevChar = start.character;
67575 return encodedResult;
67581 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
67584 /*---------------------------------------------------------------------------------------------
67585 * Copyright (c) Microsoft Corporation. All rights reserved.
67586 * Licensed under the MIT License. See License.txt in the project root for license information.
67587 *--------------------------------------------------------------------------------------------*/
67588 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
67589 if (k2 === undefined) k2 = k;
67590 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
67591 }) : (function(o, m, k, k2) {
67592 if (k2 === undefined) k2 = k;
67595 var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
67596 Object.defineProperty(o, "default", { enumerable: true, value: v });
67597 }) : function(o, v) {
67600 var __importStar = (this && this.__importStar) || function (mod) {
67601 if (mod && mod.__esModule) return mod;
67603 if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
67604 __setModuleDefault(result, mod);
67607 Object.defineProperty(exports, "__esModule", ({ value: true }));
67608 exports.getNodeFSRequestService = void 0;
67609 const requests_1 = __webpack_require__(157);
67610 const vscode_uri_1 = __webpack_require__(135);
67611 const fs = __importStar(__webpack_require__(64));
67612 const vscode_css_languageservice_1 = __webpack_require__(71);
67613 function getNodeFSRequestService() {
67614 function ensureFileUri(location) {
67615 if (requests_1.getScheme(location) !== 'file') {
67616 throw new Error('fileRequestService can only handle file URLs');
67620 getContent(location, encoding) {
67621 ensureFileUri(location);
67622 return new Promise((c, e) => {
67623 const uri = vscode_uri_1.URI.parse(location);
67624 fs.readFile(uri.fsPath, encoding, (err, buf) => {
67633 ensureFileUri(location);
67634 return new Promise((c, e) => {
67635 const uri = vscode_uri_1.URI.parse(location);
67636 fs.stat(uri.fsPath, (err, stats) => {
67638 if (err.code === 'ENOENT') {
67639 return c({ type: vscode_css_languageservice_1.FileType.Unknown, ctime: -1, mtime: -1, size: -1 });
67645 let type = vscode_css_languageservice_1.FileType.Unknown;
67646 if (stats.isFile()) {
67647 type = vscode_css_languageservice_1.FileType.File;
67649 else if (stats.isDirectory()) {
67650 type = vscode_css_languageservice_1.FileType.Directory;
67652 else if (stats.isSymbolicLink()) {
67653 type = vscode_css_languageservice_1.FileType.SymbolicLink;
67657 ctime: stats.ctime.getTime(),
67658 mtime: stats.mtime.getTime(),
67664 readDirectory(location) {
67665 ensureFileUri(location);
67666 return new Promise((c, e) => {
67667 const path = vscode_uri_1.URI.parse(location).fsPath;
67668 fs.readdir(path, { withFileTypes: true }, (err, children) => {
67672 c(children.map(stat => {
67673 if (stat.isSymbolicLink()) {
67674 return [stat.name, vscode_css_languageservice_1.FileType.SymbolicLink];
67676 else if (stat.isDirectory()) {
67677 return [stat.name, vscode_css_languageservice_1.FileType.Directory];
67679 else if (stat.isFile()) {
67680 return [stat.name, vscode_css_languageservice_1.FileType.File];
67683 return [stat.name, vscode_css_languageservice_1.FileType.Unknown];
67691 exports.getNodeFSRequestService = getNodeFSRequestService;
67696 /************************************************************************/
67697 /******/ // The module cache
67698 /******/ var __webpack_module_cache__ = {};
67700 /******/ // The require function
67701 /******/ function __webpack_require__(moduleId) {
67702 /******/ // Check if module is in cache
67703 /******/ if(__webpack_module_cache__[moduleId]) {
67704 /******/ return __webpack_module_cache__[moduleId].exports;
67706 /******/ // Create a new module (and put it into the cache)
67707 /******/ var module = __webpack_module_cache__[moduleId] = {
67708 /******/ // no module.id needed
67709 /******/ // no module.loaded needed
67710 /******/ exports: {}
67713 /******/ // Execute the module function
67714 /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
67716 /******/ // Return the exports of the module
67717 /******/ return module.exports;
67720 /************************************************************************/
67721 /******/ /* webpack/runtime/define property getters */
67723 /******/ // define getter functions for harmony exports
67724 /******/ __webpack_require__.d = (exports, definition) => {
67725 /******/ for(var key in definition) {
67726 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
67727 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
67733 /******/ /* webpack/runtime/hasOwnProperty shorthand */
67735 /******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
67738 /******/ /* webpack/runtime/make namespace object */
67740 /******/ // define __esModule on exports
67741 /******/ __webpack_require__.r = (exports) => {
67742 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
67743 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
67745 /******/ Object.defineProperty(exports, '__esModule', { value: true });
67749 /************************************************************************/
67750 /******/ // module exports must be returned from runtime so entry inlining is disabled
67751 /******/ // startup
67752 /******/ // Load entry module and return exports
67753 /******/ return __webpack_require__(47);