UNPKG

1.32 MBJavaScriptView Raw
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
3/******/ var __webpack_modules__ = ([
4/* 0 */,
5/* 1 */,
6/* 2 */
7/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8
9"use strict";
10/* --------------------------------------------------------------------------------------------
11 * Copyright (c) Microsoft Corporation. All rights reserved.
12 * Licensed under the MIT License. See License.txt in the project root for license information.
13 * ------------------------------------------------------------------------------------------ */
14/// <reference path="../typings/thenable.d.ts" />
15
16function __export(m) {
17 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
18}
19Object.defineProperty(exports, "__esModule", ({ value: true }));
20const vscode_languageserver_protocol_1 = __webpack_require__(3);
21exports.Event = vscode_languageserver_protocol_1.Event;
22const configuration_1 = __webpack_require__(33);
23const workspaceFolders_1 = __webpack_require__(35);
24const progress_1 = __webpack_require__(36);
25const Is = __webpack_require__(34);
26const UUID = __webpack_require__(37);
27// ------------- Reexport the API surface of the language worker API ----------------------
28__export(__webpack_require__(3));
29const fm = __webpack_require__(38);
30var Files;
31(function (Files) {
32 Files.uriToFilePath = fm.uriToFilePath;
33 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
34 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
35 Files.resolve = fm.resolve;
36 Files.resolveModulePath = fm.resolveModulePath;
37})(Files = exports.Files || (exports.Files = {}));
38let shutdownReceived = false;
39let exitTimer = undefined;
40function setupExitTimer() {
41 const argName = '--clientProcessId';
42 function runTimer(value) {
43 try {
44 let processId = parseInt(value);
45 if (!isNaN(processId)) {
46 exitTimer = setInterval(() => {
47 try {
48 process.kill(processId, 0);
49 }
50 catch (ex) {
51 // Parent process doesn't exist anymore. Exit the server.
52 process.exit(shutdownReceived ? 0 : 1);
53 }
54 }, 3000);
55 }
56 }
57 catch (e) {
58 // Ignore errors;
59 }
60 }
61 for (let i = 2; i < process.argv.length; i++) {
62 let arg = process.argv[i];
63 if (arg === argName && i + 1 < process.argv.length) {
64 runTimer(process.argv[i + 1]);
65 return;
66 }
67 else {
68 let args = arg.split('=');
69 if (args[0] === argName) {
70 runTimer(args[1]);
71 }
72 }
73 }
74}
75setupExitTimer();
76function null2Undefined(value) {
77 if (value === null) {
78 return void 0;
79 }
80 return value;
81}
82/**
83 * A manager for simple text documents
84 */
85class TextDocuments {
86 /**
87 * Create a new text document manager.
88 */
89 constructor(configuration) {
90 this._documents = Object.create(null);
91 this._configuration = configuration;
92 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
93 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
94 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
95 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
96 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
97 }
98 /**
99 * An event that fires when a text document managed by this manager
100 * has been opened or the content changes.
101 */
102 get onDidChangeContent() {
103 return this._onDidChangeContent.event;
104 }
105 /**
106 * An event that fires when a text document managed by this manager
107 * has been opened.
108 */
109 get onDidOpen() {
110 return this._onDidOpen.event;
111 }
112 /**
113 * An event that fires when a text document managed by this manager
114 * will be saved.
115 */
116 get onWillSave() {
117 return this._onWillSave.event;
118 }
119 /**
120 * Sets a handler that will be called if a participant wants to provide
121 * edits during a text document save.
122 */
123 onWillSaveWaitUntil(handler) {
124 this._willSaveWaitUntil = handler;
125 }
126 /**
127 * An event that fires when a text document managed by this manager
128 * has been saved.
129 */
130 get onDidSave() {
131 return this._onDidSave.event;
132 }
133 /**
134 * An event that fires when a text document managed by this manager
135 * has been closed.
136 */
137 get onDidClose() {
138 return this._onDidClose.event;
139 }
140 /**
141 * Returns the document for the given URI. Returns undefined if
142 * the document is not mananged by this instance.
143 *
144 * @param uri The text document's URI to retrieve.
145 * @return the text document or `undefined`.
146 */
147 get(uri) {
148 return this._documents[uri];
149 }
150 /**
151 * Returns all text documents managed by this instance.
152 *
153 * @return all text documents.
154 */
155 all() {
156 return Object.keys(this._documents).map(key => this._documents[key]);
157 }
158 /**
159 * Returns the URIs of all text documents managed by this instance.
160 *
161 * @return the URI's of all text documents.
162 */
163 keys() {
164 return Object.keys(this._documents);
165 }
166 /**
167 * Listens for `low level` notification on the given connection to
168 * update the text documents managed by this instance.
169 *
170 * @param connection The connection to listen on.
171 */
172 listen(connection) {
173 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
174 connection.onDidOpenTextDocument((event) => {
175 let td = event.textDocument;
176 let document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
177 this._documents[td.uri] = document;
178 let toFire = Object.freeze({ document });
179 this._onDidOpen.fire(toFire);
180 this._onDidChangeContent.fire(toFire);
181 });
182 connection.onDidChangeTextDocument((event) => {
183 let td = event.textDocument;
184 let changes = event.contentChanges;
185 if (changes.length === 0) {
186 return;
187 }
188 let document = this._documents[td.uri];
189 const { version } = td;
190 if (version === null || version === void 0) {
191 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
192 }
193 document = this._configuration.update(document, changes, version);
194 this._documents[td.uri] = document;
195 this._onDidChangeContent.fire(Object.freeze({ document }));
196 });
197 connection.onDidCloseTextDocument((event) => {
198 let document = this._documents[event.textDocument.uri];
199 if (document) {
200 delete this._documents[event.textDocument.uri];
201 this._onDidClose.fire(Object.freeze({ document }));
202 }
203 });
204 connection.onWillSaveTextDocument((event) => {
205 let document = this._documents[event.textDocument.uri];
206 if (document) {
207 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
208 }
209 });
210 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
211 let document = this._documents[event.textDocument.uri];
212 if (document && this._willSaveWaitUntil) {
213 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
214 }
215 else {
216 return [];
217 }
218 });
219 connection.onDidSaveTextDocument((event) => {
220 let document = this._documents[event.textDocument.uri];
221 if (document) {
222 this._onDidSave.fire(Object.freeze({ document }));
223 }
224 });
225 }
226}
227exports.TextDocuments = TextDocuments;
228/**
229 * Helps tracking error message. Equal occurences of the same
230 * message are only stored once. This class is for example
231 * useful if text documents are validated in a loop and equal
232 * error message should be folded into one.
233 */
234class ErrorMessageTracker {
235 constructor() {
236 this._messages = Object.create(null);
237 }
238 /**
239 * Add a message to the tracker.
240 *
241 * @param message The message to add.
242 */
243 add(message) {
244 let count = this._messages[message];
245 if (!count) {
246 count = 0;
247 }
248 count++;
249 this._messages[message] = count;
250 }
251 /**
252 * Send all tracked messages to the connection's window.
253 *
254 * @param connection The connection established between client and server.
255 */
256 sendErrors(connection) {
257 Object.keys(this._messages).forEach(message => {
258 connection.window.showErrorMessage(message);
259 });
260 }
261}
262exports.ErrorMessageTracker = ErrorMessageTracker;
263class RemoteConsoleImpl {
264 constructor() {
265 }
266 rawAttach(connection) {
267 this._rawConnection = connection;
268 }
269 attach(connection) {
270 this._connection = connection;
271 }
272 get connection() {
273 if (!this._connection) {
274 throw new Error('Remote is not attached to a connection yet.');
275 }
276 return this._connection;
277 }
278 fillServerCapabilities(_capabilities) {
279 }
280 initialize(_capabilities) {
281 }
282 error(message) {
283 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
284 }
285 warn(message) {
286 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
287 }
288 info(message) {
289 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
290 }
291 log(message) {
292 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
293 }
294 send(type, message) {
295 if (this._rawConnection) {
296 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
297 }
298 }
299}
300class _RemoteWindowImpl {
301 constructor() {
302 }
303 attach(connection) {
304 this._connection = connection;
305 }
306 get connection() {
307 if (!this._connection) {
308 throw new Error('Remote is not attached to a connection yet.');
309 }
310 return this._connection;
311 }
312 initialize(_capabilities) {
313 }
314 fillServerCapabilities(_capabilities) {
315 }
316 showErrorMessage(message, ...actions) {
317 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
318 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
319 }
320 showWarningMessage(message, ...actions) {
321 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
322 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
323 }
324 showInformationMessage(message, ...actions) {
325 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
326 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
327 }
328}
329const RemoteWindowImpl = progress_1.ProgressFeature(_RemoteWindowImpl);
330var BulkRegistration;
331(function (BulkRegistration) {
332 /**
333 * Creates a new bulk registration.
334 * @return an empty bulk registration.
335 */
336 function create() {
337 return new BulkRegistrationImpl();
338 }
339 BulkRegistration.create = create;
340})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
341class BulkRegistrationImpl {
342 constructor() {
343 this._registrations = [];
344 this._registered = new Set();
345 }
346 add(type, registerOptions) {
347 const method = Is.string(type) ? type : type.method;
348 if (this._registered.has(method)) {
349 throw new Error(`${method} is already added to this registration`);
350 }
351 const id = UUID.generateUuid();
352 this._registrations.push({
353 id: id,
354 method: method,
355 registerOptions: registerOptions || {}
356 });
357 this._registered.add(method);
358 }
359 asRegistrationParams() {
360 return {
361 registrations: this._registrations
362 };
363 }
364}
365var BulkUnregistration;
366(function (BulkUnregistration) {
367 function create() {
368 return new BulkUnregistrationImpl(undefined, []);
369 }
370 BulkUnregistration.create = create;
371})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
372class BulkUnregistrationImpl {
373 constructor(_connection, unregistrations) {
374 this._connection = _connection;
375 this._unregistrations = new Map();
376 unregistrations.forEach(unregistration => {
377 this._unregistrations.set(unregistration.method, unregistration);
378 });
379 }
380 get isAttached() {
381 return !!this._connection;
382 }
383 attach(connection) {
384 this._connection = connection;
385 }
386 add(unregistration) {
387 this._unregistrations.set(unregistration.method, unregistration);
388 }
389 dispose() {
390 let unregistrations = [];
391 for (let unregistration of this._unregistrations.values()) {
392 unregistrations.push(unregistration);
393 }
394 let params = {
395 unregisterations: unregistrations
396 };
397 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
398 this._connection.console.info(`Bulk unregistration failed.`);
399 });
400 }
401 disposeSingle(arg) {
402 const method = Is.string(arg) ? arg : arg.method;
403 const unregistration = this._unregistrations.get(method);
404 if (!unregistration) {
405 return false;
406 }
407 let params = {
408 unregisterations: [unregistration]
409 };
410 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
411 this._unregistrations.delete(method);
412 }, (_error) => {
413 this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
414 });
415 return true;
416 }
417}
418class RemoteClientImpl {
419 attach(connection) {
420 this._connection = connection;
421 }
422 get connection() {
423 if (!this._connection) {
424 throw new Error('Remote is not attached to a connection yet.');
425 }
426 return this._connection;
427 }
428 initialize(_capabilities) {
429 }
430 fillServerCapabilities(_capabilities) {
431 }
432 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
433 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
434 return this.registerMany(typeOrRegistrations);
435 }
436 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
437 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
438 }
439 else {
440 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
441 }
442 }
443 registerSingle1(unregistration, type, registerOptions) {
444 const method = Is.string(type) ? type : type.method;
445 const id = UUID.generateUuid();
446 let params = {
447 registrations: [{ id, method, registerOptions: registerOptions || {} }]
448 };
449 if (!unregistration.isAttached) {
450 unregistration.attach(this._connection);
451 }
452 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
453 unregistration.add({ id: id, method: method });
454 return unregistration;
455 }, (_error) => {
456 this.connection.console.info(`Registering request handler for ${method} failed.`);
457 return Promise.reject(_error);
458 });
459 }
460 registerSingle2(type, registerOptions) {
461 const method = Is.string(type) ? type : type.method;
462 const id = UUID.generateUuid();
463 let params = {
464 registrations: [{ id, method, registerOptions: registerOptions || {} }]
465 };
466 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
467 return vscode_languageserver_protocol_1.Disposable.create(() => {
468 this.unregisterSingle(id, method);
469 });
470 }, (_error) => {
471 this.connection.console.info(`Registering request handler for ${method} failed.`);
472 return Promise.reject(_error);
473 });
474 }
475 unregisterSingle(id, method) {
476 let params = {
477 unregisterations: [{ id, method }]
478 };
479 return this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
480 this.connection.console.info(`Unregistering request handler for ${id} failed.`);
481 });
482 }
483 registerMany(registrations) {
484 let params = registrations.asRegistrationParams();
485 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
486 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
487 }, (_error) => {
488 this.connection.console.info(`Bulk registration failed.`);
489 return Promise.reject(_error);
490 });
491 }
492}
493class _RemoteWorkspaceImpl {
494 constructor() {
495 }
496 attach(connection) {
497 this._connection = connection;
498 }
499 get connection() {
500 if (!this._connection) {
501 throw new Error('Remote is not attached to a connection yet.');
502 }
503 return this._connection;
504 }
505 initialize(_capabilities) {
506 }
507 fillServerCapabilities(_capabilities) {
508 }
509 applyEdit(paramOrEdit) {
510 function isApplyWorkspaceEditParams(value) {
511 return value && !!value.edit;
512 }
513 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
514 return this._connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
515 }
516}
517const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
518class TelemetryImpl {
519 constructor() {
520 }
521 attach(connection) {
522 this._connection = connection;
523 }
524 get connection() {
525 if (!this._connection) {
526 throw new Error('Remote is not attached to a connection yet.');
527 }
528 return this._connection;
529 }
530 initialize(_capabilities) {
531 }
532 fillServerCapabilities(_capabilities) {
533 }
534 logEvent(data) {
535 this._connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
536 }
537}
538class TracerImpl {
539 constructor() {
540 this._trace = vscode_languageserver_protocol_1.Trace.Off;
541 }
542 attach(connection) {
543 this._connection = connection;
544 }
545 get connection() {
546 if (!this._connection) {
547 throw new Error('Remote is not attached to a connection yet.');
548 }
549 return this._connection;
550 }
551 initialize(_capabilities) {
552 }
553 fillServerCapabilities(_capabilities) {
554 }
555 set trace(value) {
556 this._trace = value;
557 }
558 log(message, verbose) {
559 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
560 return;
561 }
562 this._connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
563 message: message,
564 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
565 });
566 }
567}
568class LanguagesImpl {
569 constructor() {
570 }
571 attach(connection) {
572 this._connection = connection;
573 }
574 get connection() {
575 if (!this._connection) {
576 throw new Error('Remote is not attached to a connection yet.');
577 }
578 return this._connection;
579 }
580 initialize(_capabilities) {
581 }
582 fillServerCapabilities(_capabilities) {
583 }
584 attachWorkDoneProgress(params) {
585 return progress_1.attachWorkDone(this.connection, params);
586 }
587 attachPartialResultProgress(_type, params) {
588 return progress_1.attachPartialResult(this.connection, params);
589 }
590}
591exports.LanguagesImpl = LanguagesImpl;
592function combineConsoleFeatures(one, two) {
593 return function (Base) {
594 return two(one(Base));
595 };
596}
597exports.combineConsoleFeatures = combineConsoleFeatures;
598function combineTelemetryFeatures(one, two) {
599 return function (Base) {
600 return two(one(Base));
601 };
602}
603exports.combineTelemetryFeatures = combineTelemetryFeatures;
604function combineTracerFeatures(one, two) {
605 return function (Base) {
606 return two(one(Base));
607 };
608}
609exports.combineTracerFeatures = combineTracerFeatures;
610function combineClientFeatures(one, two) {
611 return function (Base) {
612 return two(one(Base));
613 };
614}
615exports.combineClientFeatures = combineClientFeatures;
616function combineWindowFeatures(one, two) {
617 return function (Base) {
618 return two(one(Base));
619 };
620}
621exports.combineWindowFeatures = combineWindowFeatures;
622function combineWorkspaceFeatures(one, two) {
623 return function (Base) {
624 return two(one(Base));
625 };
626}
627exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
628function combineLanguagesFeatures(one, two) {
629 return function (Base) {
630 return two(one(Base));
631 };
632}
633exports.combineLanguagesFeatures = combineLanguagesFeatures;
634function combineFeatures(one, two) {
635 function combine(one, two, func) {
636 if (one && two) {
637 return func(one, two);
638 }
639 else if (one) {
640 return one;
641 }
642 else {
643 return two;
644 }
645 }
646 let result = {
647 __brand: 'features',
648 console: combine(one.console, two.console, combineConsoleFeatures),
649 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
650 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
651 client: combine(one.client, two.client, combineClientFeatures),
652 window: combine(one.window, two.window, combineWindowFeatures),
653 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
654 };
655 return result;
656}
657exports.combineFeatures = combineFeatures;
658function createConnection(arg1, arg2, arg3, arg4) {
659 let factories;
660 let input;
661 let output;
662 let strategy;
663 if (arg1 !== void 0 && arg1.__brand === 'features') {
664 factories = arg1;
665 arg1 = arg2;
666 arg2 = arg3;
667 arg3 = arg4;
668 }
669 if (vscode_languageserver_protocol_1.ConnectionStrategy.is(arg1)) {
670 strategy = arg1;
671 }
672 else {
673 input = arg1;
674 output = arg2;
675 strategy = arg3;
676 }
677 return _createConnection(input, output, strategy, factories);
678}
679exports.createConnection = createConnection;
680function _createConnection(input, output, strategy, factories) {
681 if (!input && !output && process.argv.length > 2) {
682 let port = void 0;
683 let pipeName = void 0;
684 let argv = process.argv.slice(2);
685 for (let i = 0; i < argv.length; i++) {
686 let arg = argv[i];
687 if (arg === '--node-ipc') {
688 input = new vscode_languageserver_protocol_1.IPCMessageReader(process);
689 output = new vscode_languageserver_protocol_1.IPCMessageWriter(process);
690 break;
691 }
692 else if (arg === '--stdio') {
693 input = process.stdin;
694 output = process.stdout;
695 break;
696 }
697 else if (arg === '--socket') {
698 port = parseInt(argv[i + 1]);
699 break;
700 }
701 else if (arg === '--pipe') {
702 pipeName = argv[i + 1];
703 break;
704 }
705 else {
706 var args = arg.split('=');
707 if (args[0] === '--socket') {
708 port = parseInt(args[1]);
709 break;
710 }
711 else if (args[0] === '--pipe') {
712 pipeName = args[1];
713 break;
714 }
715 }
716 }
717 if (port) {
718 let transport = vscode_languageserver_protocol_1.createServerSocketTransport(port);
719 input = transport[0];
720 output = transport[1];
721 }
722 else if (pipeName) {
723 let transport = vscode_languageserver_protocol_1.createServerPipeTransport(pipeName);
724 input = transport[0];
725 output = transport[1];
726 }
727 }
728 var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
729 if (!input) {
730 throw new Error('Connection input stream is not set. ' + commandLineMessage);
731 }
732 if (!output) {
733 throw new Error('Connection output stream is not set. ' + commandLineMessage);
734 }
735 // Backwards compatibility
736 if (Is.func(input.read) && Is.func(input.on)) {
737 let inputStream = input;
738 inputStream.on('end', () => {
739 process.exit(shutdownReceived ? 0 : 1);
740 });
741 inputStream.on('close', () => {
742 process.exit(shutdownReceived ? 0 : 1);
743 });
744 }
745 const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
746 const connection = vscode_languageserver_protocol_1.createProtocolConnection(input, output, logger, strategy);
747 logger.rawAttach(connection);
748 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
749 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
750 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
751 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
752 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
753 const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
754 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages];
755 function asPromise(value) {
756 if (value instanceof Promise) {
757 return value;
758 }
759 else if (Is.thenable(value)) {
760 return new Promise((resolve, reject) => {
761 value.then((resolved) => resolve(resolved), (error) => reject(error));
762 });
763 }
764 else {
765 return Promise.resolve(value);
766 }
767 }
768 let shutdownHandler = undefined;
769 let initializeHandler = undefined;
770 let exitHandler = undefined;
771 let protocolConnection = {
772 listen: () => connection.listen(),
773 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
774 onRequest: (type, handler) => connection.onRequest(type, handler),
775 sendNotification: (type, param) => {
776 const method = Is.string(type) ? type : type.method;
777 if (arguments.length === 1) {
778 connection.sendNotification(method);
779 }
780 else {
781 connection.sendNotification(method, param);
782 }
783 },
784 onNotification: (type, handler) => connection.onNotification(type, handler),
785 onProgress: connection.onProgress,
786 sendProgress: connection.sendProgress,
787 onInitialize: (handler) => initializeHandler = handler,
788 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
789 onShutdown: (handler) => shutdownHandler = handler,
790 onExit: (handler) => exitHandler = handler,
791 get console() { return logger; },
792 get telemetry() { return telemetry; },
793 get tracer() { return tracer; },
794 get client() { return client; },
795 get window() { return remoteWindow; },
796 get workspace() { return workspace; },
797 get languages() { return languages; },
798 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
799 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
800 __textDocumentSync: undefined,
801 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
802 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
803 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
804 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
805 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
806 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
807 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
808 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
809 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
810 }),
811 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
812 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
813 }),
814 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
815 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
816 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
817 }),
818 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
819 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
820 }),
821 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
822 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
823 }),
824 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
825 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
826 }),
827 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
828 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
829 }),
830 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
831 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
832 }),
833 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
834 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
835 }),
836 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
837 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
838 }),
839 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
840 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
841 }),
842 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
843 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
844 }),
845 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
846 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
847 }),
848 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
849 return handler(params, cancel);
850 }),
851 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
852 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
853 }),
854 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
855 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
856 }),
857 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
858 return handler(params, cancel);
859 }),
860 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
861 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
862 }),
863 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
864 return handler(params, cancel);
865 }),
866 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
867 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
868 }),
869 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
870 return handler(params, cancel);
871 }),
872 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
873 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
874 }),
875 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
876 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
877 }),
878 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
879 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
880 }),
881 onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
882 return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
883 }),
884 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
885 return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
886 }),
887 dispose: () => connection.dispose()
888 };
889 for (let remote of allRemotes) {
890 remote.attach(protocolConnection);
891 }
892 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
893 const processId = params.processId;
894 if (Is.number(processId) && exitTimer === void 0) {
895 // We received a parent process id. Set up a timer to periodically check
896 // if the parent is still alive.
897 setInterval(() => {
898 try {
899 process.kill(processId, 0);
900 }
901 catch (ex) {
902 // Parent process doesn't exist anymore. Exit the server.
903 process.exit(shutdownReceived ? 0 : 1);
904 }
905 }, 3000);
906 }
907 if (Is.string(params.trace)) {
908 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
909 }
910 for (let remote of allRemotes) {
911 remote.initialize(params.capabilities);
912 }
913 if (initializeHandler) {
914 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined);
915 return asPromise(result).then((value) => {
916 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
917 return value;
918 }
919 let result = value;
920 if (!result) {
921 result = { capabilities: {} };
922 }
923 let capabilities = result.capabilities;
924 if (!capabilities) {
925 capabilities = {};
926 result.capabilities = capabilities;
927 }
928 if (capabilities.textDocumentSync === void 0 || capabilities.textDocumentSync === null) {
929 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
930 }
931 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
932 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
933 }
934 for (let remote of allRemotes) {
935 remote.fillServerCapabilities(capabilities);
936 }
937 return result;
938 });
939 }
940 else {
941 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
942 for (let remote of allRemotes) {
943 remote.fillServerCapabilities(result.capabilities);
944 }
945 return result;
946 }
947 });
948 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
949 shutdownReceived = true;
950 if (shutdownHandler) {
951 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
952 }
953 else {
954 return undefined;
955 }
956 });
957 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
958 try {
959 if (exitHandler) {
960 exitHandler();
961 }
962 }
963 finally {
964 if (shutdownReceived) {
965 process.exit(0);
966 }
967 else {
968 process.exit(1);
969 }
970 }
971 });
972 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
973 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
974 });
975 return protocolConnection;
976}
977// Export the protocol currently in proposed state.
978const callHierarchy_proposed_1 = __webpack_require__(42);
979const st = __webpack_require__(43);
980var ProposedFeatures;
981(function (ProposedFeatures) {
982 ProposedFeatures.all = {
983 __brand: 'features',
984 languages: combineLanguagesFeatures(callHierarchy_proposed_1.CallHierarchyFeature, st.SemanticTokensFeature)
985 };
986 ProposedFeatures.SemanticTokensBuilder = st.SemanticTokensBuilder;
987})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
988//# sourceMappingURL=main.js.map
989
990/***/ }),
991/* 3 */
992/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
993
994"use strict";
995/* --------------------------------------------------------------------------------------------
996 * Copyright (c) Microsoft Corporation. All rights reserved.
997 * Licensed under the MIT License. See License.txt in the project root for license information.
998 * ------------------------------------------------------------------------------------------ */
999
1000function __export(m) {
1001 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1002}
1003Object.defineProperty(exports, "__esModule", ({ value: true }));
1004const vscode_jsonrpc_1 = __webpack_require__(4);
1005exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
1006exports.ResponseError = vscode_jsonrpc_1.ResponseError;
1007exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
1008exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
1009exports.Disposable = vscode_jsonrpc_1.Disposable;
1010exports.Event = vscode_jsonrpc_1.Event;
1011exports.Emitter = vscode_jsonrpc_1.Emitter;
1012exports.Trace = vscode_jsonrpc_1.Trace;
1013exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
1014exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
1015exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
1016exports.RequestType = vscode_jsonrpc_1.RequestType;
1017exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
1018exports.NotificationType = vscode_jsonrpc_1.NotificationType;
1019exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
1020exports.MessageReader = vscode_jsonrpc_1.MessageReader;
1021exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
1022exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
1023exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
1024exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
1025exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
1026exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
1027exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
1028exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
1029exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
1030exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
1031exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
1032exports.ProgressType = vscode_jsonrpc_1.ProgressType;
1033__export(__webpack_require__(18));
1034__export(__webpack_require__(19));
1035const callHierarchy = __webpack_require__(31);
1036const st = __webpack_require__(32);
1037var Proposed;
1038(function (Proposed) {
1039 let CallHierarchyPrepareRequest;
1040 (function (CallHierarchyPrepareRequest) {
1041 CallHierarchyPrepareRequest.method = callHierarchy.CallHierarchyPrepareRequest.method;
1042 CallHierarchyPrepareRequest.type = callHierarchy.CallHierarchyPrepareRequest.type;
1043 })(CallHierarchyPrepareRequest = Proposed.CallHierarchyPrepareRequest || (Proposed.CallHierarchyPrepareRequest = {}));
1044 let CallHierarchyIncomingCallsRequest;
1045 (function (CallHierarchyIncomingCallsRequest) {
1046 CallHierarchyIncomingCallsRequest.method = callHierarchy.CallHierarchyIncomingCallsRequest.method;
1047 CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest.type;
1048 })(CallHierarchyIncomingCallsRequest = Proposed.CallHierarchyIncomingCallsRequest || (Proposed.CallHierarchyIncomingCallsRequest = {}));
1049 let CallHierarchyOutgoingCallsRequest;
1050 (function (CallHierarchyOutgoingCallsRequest) {
1051 CallHierarchyOutgoingCallsRequest.method = callHierarchy.CallHierarchyOutgoingCallsRequest.method;
1052 CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest.type;
1053 })(CallHierarchyOutgoingCallsRequest = Proposed.CallHierarchyOutgoingCallsRequest || (Proposed.CallHierarchyOutgoingCallsRequest = {}));
1054 Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
1055 Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
1056 Proposed.SemanticTokens = st.SemanticTokens;
1057 let SemanticTokensRequest;
1058 (function (SemanticTokensRequest) {
1059 SemanticTokensRequest.method = st.SemanticTokensRequest.method;
1060 SemanticTokensRequest.type = st.SemanticTokensRequest.type;
1061 })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
1062 let SemanticTokensEditsRequest;
1063 (function (SemanticTokensEditsRequest) {
1064 SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
1065 SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
1066 })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
1067 let SemanticTokensRangeRequest;
1068 (function (SemanticTokensRangeRequest) {
1069 SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
1070 SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
1071 })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
1072})(Proposed = exports.Proposed || (exports.Proposed = {}));
1073function createProtocolConnection(reader, writer, logger, strategy) {
1074 return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
1075}
1076exports.createProtocolConnection = createProtocolConnection;
1077
1078
1079/***/ }),
1080/* 4 */
1081/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1082
1083"use strict";
1084/* --------------------------------------------------------------------------------------------
1085 * Copyright (c) Microsoft Corporation. All rights reserved.
1086 * Licensed under the MIT License. See License.txt in the project root for license information.
1087 * ------------------------------------------------------------------------------------------ */
1088/// <reference path="../typings/thenable.d.ts" />
1089
1090function __export(m) {
1091 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1092}
1093Object.defineProperty(exports, "__esModule", ({ value: true }));
1094const Is = __webpack_require__(5);
1095const messages_1 = __webpack_require__(6);
1096exports.RequestType = messages_1.RequestType;
1097exports.RequestType0 = messages_1.RequestType0;
1098exports.RequestType1 = messages_1.RequestType1;
1099exports.RequestType2 = messages_1.RequestType2;
1100exports.RequestType3 = messages_1.RequestType3;
1101exports.RequestType4 = messages_1.RequestType4;
1102exports.RequestType5 = messages_1.RequestType5;
1103exports.RequestType6 = messages_1.RequestType6;
1104exports.RequestType7 = messages_1.RequestType7;
1105exports.RequestType8 = messages_1.RequestType8;
1106exports.RequestType9 = messages_1.RequestType9;
1107exports.ResponseError = messages_1.ResponseError;
1108exports.ErrorCodes = messages_1.ErrorCodes;
1109exports.NotificationType = messages_1.NotificationType;
1110exports.NotificationType0 = messages_1.NotificationType0;
1111exports.NotificationType1 = messages_1.NotificationType1;
1112exports.NotificationType2 = messages_1.NotificationType2;
1113exports.NotificationType3 = messages_1.NotificationType3;
1114exports.NotificationType4 = messages_1.NotificationType4;
1115exports.NotificationType5 = messages_1.NotificationType5;
1116exports.NotificationType6 = messages_1.NotificationType6;
1117exports.NotificationType7 = messages_1.NotificationType7;
1118exports.NotificationType8 = messages_1.NotificationType8;
1119exports.NotificationType9 = messages_1.NotificationType9;
1120const messageReader_1 = __webpack_require__(7);
1121exports.MessageReader = messageReader_1.MessageReader;
1122exports.StreamMessageReader = messageReader_1.StreamMessageReader;
1123exports.IPCMessageReader = messageReader_1.IPCMessageReader;
1124exports.SocketMessageReader = messageReader_1.SocketMessageReader;
1125const messageWriter_1 = __webpack_require__(9);
1126exports.MessageWriter = messageWriter_1.MessageWriter;
1127exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;
1128exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;
1129exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;
1130const events_1 = __webpack_require__(8);
1131exports.Disposable = events_1.Disposable;
1132exports.Event = events_1.Event;
1133exports.Emitter = events_1.Emitter;
1134const cancellation_1 = __webpack_require__(10);
1135exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
1136exports.CancellationToken = cancellation_1.CancellationToken;
1137const linkedMap_1 = __webpack_require__(11);
1138__export(__webpack_require__(12));
1139__export(__webpack_require__(17));
1140var CancelNotification;
1141(function (CancelNotification) {
1142 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
1143})(CancelNotification || (CancelNotification = {}));
1144var ProgressNotification;
1145(function (ProgressNotification) {
1146 ProgressNotification.type = new messages_1.NotificationType('$/progress');
1147})(ProgressNotification || (ProgressNotification = {}));
1148class ProgressType {
1149 constructor() {
1150 }
1151}
1152exports.ProgressType = ProgressType;
1153exports.NullLogger = Object.freeze({
1154 error: () => { },
1155 warn: () => { },
1156 info: () => { },
1157 log: () => { }
1158});
1159var Trace;
1160(function (Trace) {
1161 Trace[Trace["Off"] = 0] = "Off";
1162 Trace[Trace["Messages"] = 1] = "Messages";
1163 Trace[Trace["Verbose"] = 2] = "Verbose";
1164})(Trace = exports.Trace || (exports.Trace = {}));
1165(function (Trace) {
1166 function fromString(value) {
1167 if (!Is.string(value)) {
1168 return Trace.Off;
1169 }
1170 value = value.toLowerCase();
1171 switch (value) {
1172 case 'off':
1173 return Trace.Off;
1174 case 'messages':
1175 return Trace.Messages;
1176 case 'verbose':
1177 return Trace.Verbose;
1178 default:
1179 return Trace.Off;
1180 }
1181 }
1182 Trace.fromString = fromString;
1183 function toString(value) {
1184 switch (value) {
1185 case Trace.Off:
1186 return 'off';
1187 case Trace.Messages:
1188 return 'messages';
1189 case Trace.Verbose:
1190 return 'verbose';
1191 default:
1192 return 'off';
1193 }
1194 }
1195 Trace.toString = toString;
1196})(Trace = exports.Trace || (exports.Trace = {}));
1197var TraceFormat;
1198(function (TraceFormat) {
1199 TraceFormat["Text"] = "text";
1200 TraceFormat["JSON"] = "json";
1201})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1202(function (TraceFormat) {
1203 function fromString(value) {
1204 value = value.toLowerCase();
1205 if (value === 'json') {
1206 return TraceFormat.JSON;
1207 }
1208 else {
1209 return TraceFormat.Text;
1210 }
1211 }
1212 TraceFormat.fromString = fromString;
1213})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1214var SetTraceNotification;
1215(function (SetTraceNotification) {
1216 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
1217})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
1218var LogTraceNotification;
1219(function (LogTraceNotification) {
1220 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
1221})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
1222var ConnectionErrors;
1223(function (ConnectionErrors) {
1224 /**
1225 * The connection is closed.
1226 */
1227 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
1228 /**
1229 * The connection got disposed.
1230 */
1231 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
1232 /**
1233 * The connection is already in listening mode.
1234 */
1235 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
1236})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
1237class ConnectionError extends Error {
1238 constructor(code, message) {
1239 super(message);
1240 this.code = code;
1241 Object.setPrototypeOf(this, ConnectionError.prototype);
1242 }
1243}
1244exports.ConnectionError = ConnectionError;
1245var ConnectionStrategy;
1246(function (ConnectionStrategy) {
1247 function is(value) {
1248 let candidate = value;
1249 return candidate && Is.func(candidate.cancelUndispatched);
1250 }
1251 ConnectionStrategy.is = is;
1252})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
1253var ConnectionState;
1254(function (ConnectionState) {
1255 ConnectionState[ConnectionState["New"] = 1] = "New";
1256 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
1257 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
1258 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
1259})(ConnectionState || (ConnectionState = {}));
1260function _createMessageConnection(messageReader, messageWriter, logger, strategy) {
1261 let sequenceNumber = 0;
1262 let notificationSquenceNumber = 0;
1263 let unknownResponseSquenceNumber = 0;
1264 const version = '2.0';
1265 let starRequestHandler = undefined;
1266 let requestHandlers = Object.create(null);
1267 let starNotificationHandler = undefined;
1268 let notificationHandlers = Object.create(null);
1269 let progressHandlers = new Map();
1270 let timer;
1271 let messageQueue = new linkedMap_1.LinkedMap();
1272 let responsePromises = Object.create(null);
1273 let requestTokens = Object.create(null);
1274 let trace = Trace.Off;
1275 let traceFormat = TraceFormat.Text;
1276 let tracer;
1277 let state = ConnectionState.New;
1278 let errorEmitter = new events_1.Emitter();
1279 let closeEmitter = new events_1.Emitter();
1280 let unhandledNotificationEmitter = new events_1.Emitter();
1281 let unhandledProgressEmitter = new events_1.Emitter();
1282 let disposeEmitter = new events_1.Emitter();
1283 function createRequestQueueKey(id) {
1284 return 'req-' + id.toString();
1285 }
1286 function createResponseQueueKey(id) {
1287 if (id === null) {
1288 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
1289 }
1290 else {
1291 return 'res-' + id.toString();
1292 }
1293 }
1294 function createNotificationQueueKey() {
1295 return 'not-' + (++notificationSquenceNumber).toString();
1296 }
1297 function addMessageToQueue(queue, message) {
1298 if (messages_1.isRequestMessage(message)) {
1299 queue.set(createRequestQueueKey(message.id), message);
1300 }
1301 else if (messages_1.isResponseMessage(message)) {
1302 queue.set(createResponseQueueKey(message.id), message);
1303 }
1304 else {
1305 queue.set(createNotificationQueueKey(), message);
1306 }
1307 }
1308 function cancelUndispatched(_message) {
1309 return undefined;
1310 }
1311 function isListening() {
1312 return state === ConnectionState.Listening;
1313 }
1314 function isClosed() {
1315 return state === ConnectionState.Closed;
1316 }
1317 function isDisposed() {
1318 return state === ConnectionState.Disposed;
1319 }
1320 function closeHandler() {
1321 if (state === ConnectionState.New || state === ConnectionState.Listening) {
1322 state = ConnectionState.Closed;
1323 closeEmitter.fire(undefined);
1324 }
1325 // If the connection is disposed don't sent close events.
1326 }
1327 function readErrorHandler(error) {
1328 errorEmitter.fire([error, undefined, undefined]);
1329 }
1330 function writeErrorHandler(data) {
1331 errorEmitter.fire(data);
1332 }
1333 messageReader.onClose(closeHandler);
1334 messageReader.onError(readErrorHandler);
1335 messageWriter.onClose(closeHandler);
1336 messageWriter.onError(writeErrorHandler);
1337 function triggerMessageQueue() {
1338 if (timer || messageQueue.size === 0) {
1339 return;
1340 }
1341 timer = setImmediate(() => {
1342 timer = undefined;
1343 processMessageQueue();
1344 });
1345 }
1346 function processMessageQueue() {
1347 if (messageQueue.size === 0) {
1348 return;
1349 }
1350 let message = messageQueue.shift();
1351 try {
1352 if (messages_1.isRequestMessage(message)) {
1353 handleRequest(message);
1354 }
1355 else if (messages_1.isNotificationMessage(message)) {
1356 handleNotification(message);
1357 }
1358 else if (messages_1.isResponseMessage(message)) {
1359 handleResponse(message);
1360 }
1361 else {
1362 handleInvalidMessage(message);
1363 }
1364 }
1365 finally {
1366 triggerMessageQueue();
1367 }
1368 }
1369 let callback = (message) => {
1370 try {
1371 // We have received a cancellation message. Check if the message is still in the queue
1372 // and cancel it if allowed to do so.
1373 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
1374 let key = createRequestQueueKey(message.params.id);
1375 let toCancel = messageQueue.get(key);
1376 if (messages_1.isRequestMessage(toCancel)) {
1377 let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
1378 if (response && (response.error !== void 0 || response.result !== void 0)) {
1379 messageQueue.delete(key);
1380 response.id = toCancel.id;
1381 traceSendingResponse(response, message.method, Date.now());
1382 messageWriter.write(response);
1383 return;
1384 }
1385 }
1386 }
1387 addMessageToQueue(messageQueue, message);
1388 }
1389 finally {
1390 triggerMessageQueue();
1391 }
1392 };
1393 function handleRequest(requestMessage) {
1394 if (isDisposed()) {
1395 // we return here silently since we fired an event when the
1396 // connection got disposed.
1397 return;
1398 }
1399 function reply(resultOrError, method, startTime) {
1400 let message = {
1401 jsonrpc: version,
1402 id: requestMessage.id
1403 };
1404 if (resultOrError instanceof messages_1.ResponseError) {
1405 message.error = resultOrError.toJson();
1406 }
1407 else {
1408 message.result = resultOrError === void 0 ? null : resultOrError;
1409 }
1410 traceSendingResponse(message, method, startTime);
1411 messageWriter.write(message);
1412 }
1413 function replyError(error, method, startTime) {
1414 let message = {
1415 jsonrpc: version,
1416 id: requestMessage.id,
1417 error: error.toJson()
1418 };
1419 traceSendingResponse(message, method, startTime);
1420 messageWriter.write(message);
1421 }
1422 function replySuccess(result, method, startTime) {
1423 // The JSON RPC defines that a response must either have a result or an error
1424 // So we can't treat undefined as a valid response result.
1425 if (result === void 0) {
1426 result = null;
1427 }
1428 let message = {
1429 jsonrpc: version,
1430 id: requestMessage.id,
1431 result: result
1432 };
1433 traceSendingResponse(message, method, startTime);
1434 messageWriter.write(message);
1435 }
1436 traceReceivedRequest(requestMessage);
1437 let element = requestHandlers[requestMessage.method];
1438 let type;
1439 let requestHandler;
1440 if (element) {
1441 type = element.type;
1442 requestHandler = element.handler;
1443 }
1444 let startTime = Date.now();
1445 if (requestHandler || starRequestHandler) {
1446 let cancellationSource = new cancellation_1.CancellationTokenSource();
1447 let tokenKey = String(requestMessage.id);
1448 requestTokens[tokenKey] = cancellationSource;
1449 try {
1450 let handlerResult;
1451 if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1452 handlerResult = requestHandler
1453 ? requestHandler(cancellationSource.token)
1454 : starRequestHandler(requestMessage.method, cancellationSource.token);
1455 }
1456 else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {
1457 handlerResult = requestHandler
1458 ? requestHandler(...requestMessage.params, cancellationSource.token)
1459 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
1460 }
1461 else {
1462 handlerResult = requestHandler
1463 ? requestHandler(requestMessage.params, cancellationSource.token)
1464 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
1465 }
1466 let promise = handlerResult;
1467 if (!handlerResult) {
1468 delete requestTokens[tokenKey];
1469 replySuccess(handlerResult, requestMessage.method, startTime);
1470 }
1471 else if (promise.then) {
1472 promise.then((resultOrError) => {
1473 delete requestTokens[tokenKey];
1474 reply(resultOrError, requestMessage.method, startTime);
1475 }, error => {
1476 delete requestTokens[tokenKey];
1477 if (error instanceof messages_1.ResponseError) {
1478 replyError(error, requestMessage.method, startTime);
1479 }
1480 else if (error && Is.string(error.message)) {
1481 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1482 }
1483 else {
1484 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1485 }
1486 });
1487 }
1488 else {
1489 delete requestTokens[tokenKey];
1490 reply(handlerResult, requestMessage.method, startTime);
1491 }
1492 }
1493 catch (error) {
1494 delete requestTokens[tokenKey];
1495 if (error instanceof messages_1.ResponseError) {
1496 reply(error, requestMessage.method, startTime);
1497 }
1498 else if (error && Is.string(error.message)) {
1499 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1500 }
1501 else {
1502 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1503 }
1504 }
1505 }
1506 else {
1507 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
1508 }
1509 }
1510 function handleResponse(responseMessage) {
1511 if (isDisposed()) {
1512 // See handle request.
1513 return;
1514 }
1515 if (responseMessage.id === null) {
1516 if (responseMessage.error) {
1517 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
1518 }
1519 else {
1520 logger.error(`Received response message without id. No further error information provided.`);
1521 }
1522 }
1523 else {
1524 let key = String(responseMessage.id);
1525 let responsePromise = responsePromises[key];
1526 traceReceivedResponse(responseMessage, responsePromise);
1527 if (responsePromise) {
1528 delete responsePromises[key];
1529 try {
1530 if (responseMessage.error) {
1531 let error = responseMessage.error;
1532 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
1533 }
1534 else if (responseMessage.result !== void 0) {
1535 responsePromise.resolve(responseMessage.result);
1536 }
1537 else {
1538 throw new Error('Should never happen.');
1539 }
1540 }
1541 catch (error) {
1542 if (error.message) {
1543 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
1544 }
1545 else {
1546 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
1547 }
1548 }
1549 }
1550 }
1551 }
1552 function handleNotification(message) {
1553 if (isDisposed()) {
1554 // See handle request.
1555 return;
1556 }
1557 let type = undefined;
1558 let notificationHandler;
1559 if (message.method === CancelNotification.type.method) {
1560 notificationHandler = (params) => {
1561 let id = params.id;
1562 let source = requestTokens[String(id)];
1563 if (source) {
1564 source.cancel();
1565 }
1566 };
1567 }
1568 else {
1569 let element = notificationHandlers[message.method];
1570 if (element) {
1571 notificationHandler = element.handler;
1572 type = element.type;
1573 }
1574 }
1575 if (notificationHandler || starNotificationHandler) {
1576 try {
1577 traceReceivedNotification(message);
1578 if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1579 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
1580 }
1581 else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {
1582 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
1583 }
1584 else {
1585 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
1586 }
1587 }
1588 catch (error) {
1589 if (error.message) {
1590 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
1591 }
1592 else {
1593 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
1594 }
1595 }
1596 }
1597 else {
1598 unhandledNotificationEmitter.fire(message);
1599 }
1600 }
1601 function handleInvalidMessage(message) {
1602 if (!message) {
1603 logger.error('Received empty message.');
1604 return;
1605 }
1606 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
1607 // Test whether we find an id to reject the promise
1608 let responseMessage = message;
1609 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
1610 let key = String(responseMessage.id);
1611 let responseHandler = responsePromises[key];
1612 if (responseHandler) {
1613 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
1614 }
1615 }
1616 }
1617 function traceSendingRequest(message) {
1618 if (trace === Trace.Off || !tracer) {
1619 return;
1620 }
1621 if (traceFormat === TraceFormat.Text) {
1622 let data = undefined;
1623 if (trace === Trace.Verbose && message.params) {
1624 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1625 }
1626 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
1627 }
1628 else {
1629 logLSPMessage('send-request', message);
1630 }
1631 }
1632 function traceSendingNotification(message) {
1633 if (trace === Trace.Off || !tracer) {
1634 return;
1635 }
1636 if (traceFormat === TraceFormat.Text) {
1637 let data = undefined;
1638 if (trace === Trace.Verbose) {
1639 if (message.params) {
1640 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1641 }
1642 else {
1643 data = 'No parameters provided.\n\n';
1644 }
1645 }
1646 tracer.log(`Sending notification '${message.method}'.`, data);
1647 }
1648 else {
1649 logLSPMessage('send-notification', message);
1650 }
1651 }
1652 function traceSendingResponse(message, method, startTime) {
1653 if (trace === Trace.Off || !tracer) {
1654 return;
1655 }
1656 if (traceFormat === TraceFormat.Text) {
1657 let data = undefined;
1658 if (trace === Trace.Verbose) {
1659 if (message.error && message.error.data) {
1660 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1661 }
1662 else {
1663 if (message.result) {
1664 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1665 }
1666 else if (message.error === void 0) {
1667 data = 'No result returned.\n\n';
1668 }
1669 }
1670 }
1671 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
1672 }
1673 else {
1674 logLSPMessage('send-response', message);
1675 }
1676 }
1677 function traceReceivedRequest(message) {
1678 if (trace === Trace.Off || !tracer) {
1679 return;
1680 }
1681 if (traceFormat === TraceFormat.Text) {
1682 let data = undefined;
1683 if (trace === Trace.Verbose && message.params) {
1684 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1685 }
1686 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
1687 }
1688 else {
1689 logLSPMessage('receive-request', message);
1690 }
1691 }
1692 function traceReceivedNotification(message) {
1693 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
1694 return;
1695 }
1696 if (traceFormat === TraceFormat.Text) {
1697 let data = undefined;
1698 if (trace === Trace.Verbose) {
1699 if (message.params) {
1700 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1701 }
1702 else {
1703 data = 'No parameters provided.\n\n';
1704 }
1705 }
1706 tracer.log(`Received notification '${message.method}'.`, data);
1707 }
1708 else {
1709 logLSPMessage('receive-notification', message);
1710 }
1711 }
1712 function traceReceivedResponse(message, responsePromise) {
1713 if (trace === Trace.Off || !tracer) {
1714 return;
1715 }
1716 if (traceFormat === TraceFormat.Text) {
1717 let data = undefined;
1718 if (trace === Trace.Verbose) {
1719 if (message.error && message.error.data) {
1720 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1721 }
1722 else {
1723 if (message.result) {
1724 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1725 }
1726 else if (message.error === void 0) {
1727 data = 'No result returned.\n\n';
1728 }
1729 }
1730 }
1731 if (responsePromise) {
1732 let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
1733 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
1734 }
1735 else {
1736 tracer.log(`Received response ${message.id} without active response promise.`, data);
1737 }
1738 }
1739 else {
1740 logLSPMessage('receive-response', message);
1741 }
1742 }
1743 function logLSPMessage(type, message) {
1744 if (!tracer || trace === Trace.Off) {
1745 return;
1746 }
1747 const lspMessage = {
1748 isLSPMessage: true,
1749 type,
1750 message,
1751 timestamp: Date.now()
1752 };
1753 tracer.log(lspMessage);
1754 }
1755 function throwIfClosedOrDisposed() {
1756 if (isClosed()) {
1757 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
1758 }
1759 if (isDisposed()) {
1760 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
1761 }
1762 }
1763 function throwIfListening() {
1764 if (isListening()) {
1765 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
1766 }
1767 }
1768 function throwIfNotListening() {
1769 if (!isListening()) {
1770 throw new Error('Call listen() first.');
1771 }
1772 }
1773 function undefinedToNull(param) {
1774 if (param === void 0) {
1775 return null;
1776 }
1777 else {
1778 return param;
1779 }
1780 }
1781 function computeMessageParams(type, params) {
1782 let result;
1783 let numberOfParams = type.numberOfParams;
1784 switch (numberOfParams) {
1785 case 0:
1786 result = null;
1787 break;
1788 case 1:
1789 result = undefinedToNull(params[0]);
1790 break;
1791 default:
1792 result = [];
1793 for (let i = 0; i < params.length && i < numberOfParams; i++) {
1794 result.push(undefinedToNull(params[i]));
1795 }
1796 if (params.length < numberOfParams) {
1797 for (let i = params.length; i < numberOfParams; i++) {
1798 result.push(null);
1799 }
1800 }
1801 break;
1802 }
1803 return result;
1804 }
1805 let connection = {
1806 sendNotification: (type, ...params) => {
1807 throwIfClosedOrDisposed();
1808 let method;
1809 let messageParams;
1810 if (Is.string(type)) {
1811 method = type;
1812 switch (params.length) {
1813 case 0:
1814 messageParams = null;
1815 break;
1816 case 1:
1817 messageParams = params[0];
1818 break;
1819 default:
1820 messageParams = params;
1821 break;
1822 }
1823 }
1824 else {
1825 method = type.method;
1826 messageParams = computeMessageParams(type, params);
1827 }
1828 let notificationMessage = {
1829 jsonrpc: version,
1830 method: method,
1831 params: messageParams
1832 };
1833 traceSendingNotification(notificationMessage);
1834 messageWriter.write(notificationMessage);
1835 },
1836 onNotification: (type, handler) => {
1837 throwIfClosedOrDisposed();
1838 if (Is.func(type)) {
1839 starNotificationHandler = type;
1840 }
1841 else if (handler) {
1842 if (Is.string(type)) {
1843 notificationHandlers[type] = { type: undefined, handler };
1844 }
1845 else {
1846 notificationHandlers[type.method] = { type, handler };
1847 }
1848 }
1849 },
1850 onProgress: (_type, token, handler) => {
1851 if (progressHandlers.has(token)) {
1852 throw new Error(`Progress handler for token ${token} already registered`);
1853 }
1854 progressHandlers.set(token, handler);
1855 return {
1856 dispose: () => {
1857 progressHandlers.delete(token);
1858 }
1859 };
1860 },
1861 sendProgress: (_type, token, value) => {
1862 connection.sendNotification(ProgressNotification.type, { token, value });
1863 },
1864 onUnhandledProgress: unhandledProgressEmitter.event,
1865 sendRequest: (type, ...params) => {
1866 throwIfClosedOrDisposed();
1867 throwIfNotListening();
1868 let method;
1869 let messageParams;
1870 let token = undefined;
1871 if (Is.string(type)) {
1872 method = type;
1873 switch (params.length) {
1874 case 0:
1875 messageParams = null;
1876 break;
1877 case 1:
1878 // The cancellation token is optional so it can also be undefined.
1879 if (cancellation_1.CancellationToken.is(params[0])) {
1880 messageParams = null;
1881 token = params[0];
1882 }
1883 else {
1884 messageParams = undefinedToNull(params[0]);
1885 }
1886 break;
1887 default:
1888 const last = params.length - 1;
1889 if (cancellation_1.CancellationToken.is(params[last])) {
1890 token = params[last];
1891 if (params.length === 2) {
1892 messageParams = undefinedToNull(params[0]);
1893 }
1894 else {
1895 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
1896 }
1897 }
1898 else {
1899 messageParams = params.map(value => undefinedToNull(value));
1900 }
1901 break;
1902 }
1903 }
1904 else {
1905 method = type.method;
1906 messageParams = computeMessageParams(type, params);
1907 let numberOfParams = type.numberOfParams;
1908 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
1909 }
1910 let id = sequenceNumber++;
1911 let result = new Promise((resolve, reject) => {
1912 let requestMessage = {
1913 jsonrpc: version,
1914 id: id,
1915 method: method,
1916 params: messageParams
1917 };
1918 let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };
1919 traceSendingRequest(requestMessage);
1920 try {
1921 messageWriter.write(requestMessage);
1922 }
1923 catch (e) {
1924 // Writing the message failed. So we need to reject the promise.
1925 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
1926 responsePromise = null;
1927 }
1928 if (responsePromise) {
1929 responsePromises[String(id)] = responsePromise;
1930 }
1931 });
1932 if (token) {
1933 token.onCancellationRequested(() => {
1934 connection.sendNotification(CancelNotification.type, { id });
1935 });
1936 }
1937 return result;
1938 },
1939 onRequest: (type, handler) => {
1940 throwIfClosedOrDisposed();
1941 if (Is.func(type)) {
1942 starRequestHandler = type;
1943 }
1944 else if (handler) {
1945 if (Is.string(type)) {
1946 requestHandlers[type] = { type: undefined, handler };
1947 }
1948 else {
1949 requestHandlers[type.method] = { type, handler };
1950 }
1951 }
1952 },
1953 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
1954 let _sendNotification = false;
1955 let _traceFormat = TraceFormat.Text;
1956 if (sendNotificationOrTraceOptions !== void 0) {
1957 if (Is.boolean(sendNotificationOrTraceOptions)) {
1958 _sendNotification = sendNotificationOrTraceOptions;
1959 }
1960 else {
1961 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
1962 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
1963 }
1964 }
1965 trace = _value;
1966 traceFormat = _traceFormat;
1967 if (trace === Trace.Off) {
1968 tracer = undefined;
1969 }
1970 else {
1971 tracer = _tracer;
1972 }
1973 if (_sendNotification && !isClosed() && !isDisposed()) {
1974 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
1975 }
1976 },
1977 onError: errorEmitter.event,
1978 onClose: closeEmitter.event,
1979 onUnhandledNotification: unhandledNotificationEmitter.event,
1980 onDispose: disposeEmitter.event,
1981 dispose: () => {
1982 if (isDisposed()) {
1983 return;
1984 }
1985 state = ConnectionState.Disposed;
1986 disposeEmitter.fire(undefined);
1987 let error = new Error('Connection got disposed.');
1988 Object.keys(responsePromises).forEach((key) => {
1989 responsePromises[key].reject(error);
1990 });
1991 responsePromises = Object.create(null);
1992 requestTokens = Object.create(null);
1993 messageQueue = new linkedMap_1.LinkedMap();
1994 // Test for backwards compatibility
1995 if (Is.func(messageWriter.dispose)) {
1996 messageWriter.dispose();
1997 }
1998 if (Is.func(messageReader.dispose)) {
1999 messageReader.dispose();
2000 }
2001 },
2002 listen: () => {
2003 throwIfClosedOrDisposed();
2004 throwIfListening();
2005 state = ConnectionState.Listening;
2006 messageReader.listen(callback);
2007 },
2008 inspect: () => {
2009 // eslint-disable-next-line no-console
2010 console.log('inspect');
2011 }
2012 };
2013 connection.onNotification(LogTraceNotification.type, (params) => {
2014 if (trace === Trace.Off || !tracer) {
2015 return;
2016 }
2017 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
2018 });
2019 connection.onNotification(ProgressNotification.type, (params) => {
2020 const handler = progressHandlers.get(params.token);
2021 if (handler) {
2022 handler(params.value);
2023 }
2024 else {
2025 unhandledProgressEmitter.fire(params);
2026 }
2027 });
2028 return connection;
2029}
2030function isMessageReader(value) {
2031 return value.listen !== void 0 && value.read === void 0;
2032}
2033function isMessageWriter(value) {
2034 return value.write !== void 0 && value.end === void 0;
2035}
2036function createMessageConnection(input, output, logger, strategy) {
2037 if (!logger) {
2038 logger = exports.NullLogger;
2039 }
2040 let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);
2041 let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);
2042 return _createMessageConnection(reader, writer, logger, strategy);
2043}
2044exports.createMessageConnection = createMessageConnection;
2045
2046
2047/***/ }),
2048/* 5 */
2049/***/ ((__unused_webpack_module, exports) => {
2050
2051"use strict";
2052/* --------------------------------------------------------------------------------------------
2053 * Copyright (c) Microsoft Corporation. All rights reserved.
2054 * Licensed under the MIT License. See License.txt in the project root for license information.
2055 * ------------------------------------------------------------------------------------------ */
2056
2057Object.defineProperty(exports, "__esModule", ({ value: true }));
2058function boolean(value) {
2059 return value === true || value === false;
2060}
2061exports.boolean = boolean;
2062function string(value) {
2063 return typeof value === 'string' || value instanceof String;
2064}
2065exports.string = string;
2066function number(value) {
2067 return typeof value === 'number' || value instanceof Number;
2068}
2069exports.number = number;
2070function error(value) {
2071 return value instanceof Error;
2072}
2073exports.error = error;
2074function func(value) {
2075 return typeof value === 'function';
2076}
2077exports.func = func;
2078function array(value) {
2079 return Array.isArray(value);
2080}
2081exports.array = array;
2082function stringArray(value) {
2083 return array(value) && value.every(elem => string(elem));
2084}
2085exports.stringArray = stringArray;
2086
2087
2088/***/ }),
2089/* 6 */
2090/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2091
2092"use strict";
2093/* --------------------------------------------------------------------------------------------
2094 * Copyright (c) Microsoft Corporation. All rights reserved.
2095 * Licensed under the MIT License. See License.txt in the project root for license information.
2096 * ------------------------------------------------------------------------------------------ */
2097
2098Object.defineProperty(exports, "__esModule", ({ value: true }));
2099const is = __webpack_require__(5);
2100/**
2101 * Predefined error codes.
2102 */
2103var ErrorCodes;
2104(function (ErrorCodes) {
2105 // Defined by JSON RPC
2106 ErrorCodes.ParseError = -32700;
2107 ErrorCodes.InvalidRequest = -32600;
2108 ErrorCodes.MethodNotFound = -32601;
2109 ErrorCodes.InvalidParams = -32602;
2110 ErrorCodes.InternalError = -32603;
2111 ErrorCodes.serverErrorStart = -32099;
2112 ErrorCodes.serverErrorEnd = -32000;
2113 ErrorCodes.ServerNotInitialized = -32002;
2114 ErrorCodes.UnknownErrorCode = -32001;
2115 // Defined by the protocol.
2116 ErrorCodes.RequestCancelled = -32800;
2117 ErrorCodes.ContentModified = -32801;
2118 // Defined by VSCode library.
2119 ErrorCodes.MessageWriteError = 1;
2120 ErrorCodes.MessageReadError = 2;
2121})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
2122/**
2123 * An error object return in a response in case a request
2124 * has failed.
2125 */
2126class ResponseError extends Error {
2127 constructor(code, message, data) {
2128 super(message);
2129 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
2130 this.data = data;
2131 Object.setPrototypeOf(this, ResponseError.prototype);
2132 }
2133 toJson() {
2134 return {
2135 code: this.code,
2136 message: this.message,
2137 data: this.data,
2138 };
2139 }
2140}
2141exports.ResponseError = ResponseError;
2142/**
2143 * An abstract implementation of a MessageType.
2144 */
2145class AbstractMessageType {
2146 constructor(_method, _numberOfParams) {
2147 this._method = _method;
2148 this._numberOfParams = _numberOfParams;
2149 }
2150 get method() {
2151 return this._method;
2152 }
2153 get numberOfParams() {
2154 return this._numberOfParams;
2155 }
2156}
2157exports.AbstractMessageType = AbstractMessageType;
2158/**
2159 * Classes to type request response pairs
2160 *
2161 * The type parameter RO will be removed in the next major version
2162 * of the JSON RPC library since it is a LSP concept and doesn't
2163 * belong here. For now it is tagged as default never.
2164 */
2165class RequestType0 extends AbstractMessageType {
2166 constructor(method) {
2167 super(method, 0);
2168 }
2169}
2170exports.RequestType0 = RequestType0;
2171class RequestType extends AbstractMessageType {
2172 constructor(method) {
2173 super(method, 1);
2174 }
2175}
2176exports.RequestType = RequestType;
2177class RequestType1 extends AbstractMessageType {
2178 constructor(method) {
2179 super(method, 1);
2180 }
2181}
2182exports.RequestType1 = RequestType1;
2183class RequestType2 extends AbstractMessageType {
2184 constructor(method) {
2185 super(method, 2);
2186 }
2187}
2188exports.RequestType2 = RequestType2;
2189class RequestType3 extends AbstractMessageType {
2190 constructor(method) {
2191 super(method, 3);
2192 }
2193}
2194exports.RequestType3 = RequestType3;
2195class RequestType4 extends AbstractMessageType {
2196 constructor(method) {
2197 super(method, 4);
2198 }
2199}
2200exports.RequestType4 = RequestType4;
2201class RequestType5 extends AbstractMessageType {
2202 constructor(method) {
2203 super(method, 5);
2204 }
2205}
2206exports.RequestType5 = RequestType5;
2207class RequestType6 extends AbstractMessageType {
2208 constructor(method) {
2209 super(method, 6);
2210 }
2211}
2212exports.RequestType6 = RequestType6;
2213class RequestType7 extends AbstractMessageType {
2214 constructor(method) {
2215 super(method, 7);
2216 }
2217}
2218exports.RequestType7 = RequestType7;
2219class RequestType8 extends AbstractMessageType {
2220 constructor(method) {
2221 super(method, 8);
2222 }
2223}
2224exports.RequestType8 = RequestType8;
2225class RequestType9 extends AbstractMessageType {
2226 constructor(method) {
2227 super(method, 9);
2228 }
2229}
2230exports.RequestType9 = RequestType9;
2231/**
2232 * The type parameter RO will be removed in the next major version
2233 * of the JSON RPC library since it is a LSP concept and doesn't
2234 * belong here. For now it is tagged as default never.
2235 */
2236class NotificationType extends AbstractMessageType {
2237 constructor(method) {
2238 super(method, 1);
2239 this._ = undefined;
2240 }
2241}
2242exports.NotificationType = NotificationType;
2243class NotificationType0 extends AbstractMessageType {
2244 constructor(method) {
2245 super(method, 0);
2246 }
2247}
2248exports.NotificationType0 = NotificationType0;
2249class NotificationType1 extends AbstractMessageType {
2250 constructor(method) {
2251 super(method, 1);
2252 }
2253}
2254exports.NotificationType1 = NotificationType1;
2255class NotificationType2 extends AbstractMessageType {
2256 constructor(method) {
2257 super(method, 2);
2258 }
2259}
2260exports.NotificationType2 = NotificationType2;
2261class NotificationType3 extends AbstractMessageType {
2262 constructor(method) {
2263 super(method, 3);
2264 }
2265}
2266exports.NotificationType3 = NotificationType3;
2267class NotificationType4 extends AbstractMessageType {
2268 constructor(method) {
2269 super(method, 4);
2270 }
2271}
2272exports.NotificationType4 = NotificationType4;
2273class NotificationType5 extends AbstractMessageType {
2274 constructor(method) {
2275 super(method, 5);
2276 }
2277}
2278exports.NotificationType5 = NotificationType5;
2279class NotificationType6 extends AbstractMessageType {
2280 constructor(method) {
2281 super(method, 6);
2282 }
2283}
2284exports.NotificationType6 = NotificationType6;
2285class NotificationType7 extends AbstractMessageType {
2286 constructor(method) {
2287 super(method, 7);
2288 }
2289}
2290exports.NotificationType7 = NotificationType7;
2291class NotificationType8 extends AbstractMessageType {
2292 constructor(method) {
2293 super(method, 8);
2294 }
2295}
2296exports.NotificationType8 = NotificationType8;
2297class NotificationType9 extends AbstractMessageType {
2298 constructor(method) {
2299 super(method, 9);
2300 }
2301}
2302exports.NotificationType9 = NotificationType9;
2303/**
2304 * Tests if the given message is a request message
2305 */
2306function isRequestMessage(message) {
2307 let candidate = message;
2308 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
2309}
2310exports.isRequestMessage = isRequestMessage;
2311/**
2312 * Tests if the given message is a notification message
2313 */
2314function isNotificationMessage(message) {
2315 let candidate = message;
2316 return candidate && is.string(candidate.method) && message.id === void 0;
2317}
2318exports.isNotificationMessage = isNotificationMessage;
2319/**
2320 * Tests if the given message is a response message
2321 */
2322function isResponseMessage(message) {
2323 let candidate = message;
2324 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
2325}
2326exports.isResponseMessage = isResponseMessage;
2327
2328
2329/***/ }),
2330/* 7 */
2331/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2332
2333"use strict";
2334/* --------------------------------------------------------------------------------------------
2335 * Copyright (c) Microsoft Corporation. All rights reserved.
2336 * Licensed under the MIT License. See License.txt in the project root for license information.
2337 * ------------------------------------------------------------------------------------------ */
2338
2339Object.defineProperty(exports, "__esModule", ({ value: true }));
2340const events_1 = __webpack_require__(8);
2341const Is = __webpack_require__(5);
2342let DefaultSize = 8192;
2343let CR = Buffer.from('\r', 'ascii')[0];
2344let LF = Buffer.from('\n', 'ascii')[0];
2345let CRLF = '\r\n';
2346class MessageBuffer {
2347 constructor(encoding = 'utf8') {
2348 this.encoding = encoding;
2349 this.index = 0;
2350 this.buffer = Buffer.allocUnsafe(DefaultSize);
2351 }
2352 append(chunk) {
2353 var toAppend = chunk;
2354 if (typeof (chunk) === 'string') {
2355 var str = chunk;
2356 var bufferLen = Buffer.byteLength(str, this.encoding);
2357 toAppend = Buffer.allocUnsafe(bufferLen);
2358 toAppend.write(str, 0, bufferLen, this.encoding);
2359 }
2360 if (this.buffer.length - this.index >= toAppend.length) {
2361 toAppend.copy(this.buffer, this.index, 0, toAppend.length);
2362 }
2363 else {
2364 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
2365 if (this.index === 0) {
2366 this.buffer = Buffer.allocUnsafe(newSize);
2367 toAppend.copy(this.buffer, 0, 0, toAppend.length);
2368 }
2369 else {
2370 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
2371 }
2372 }
2373 this.index += toAppend.length;
2374 }
2375 tryReadHeaders() {
2376 let result = undefined;
2377 let current = 0;
2378 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
2379 current++;
2380 }
2381 // No header / body separator found (e.g CRLFCRLF)
2382 if (current + 3 >= this.index) {
2383 return result;
2384 }
2385 result = Object.create(null);
2386 let headers = this.buffer.toString('ascii', 0, current).split(CRLF);
2387 headers.forEach((header) => {
2388 let index = header.indexOf(':');
2389 if (index === -1) {
2390 throw new Error('Message header must separate key and value using :');
2391 }
2392 let key = header.substr(0, index);
2393 let value = header.substr(index + 1).trim();
2394 result[key] = value;
2395 });
2396 let nextStart = current + 4;
2397 this.buffer = this.buffer.slice(nextStart);
2398 this.index = this.index - nextStart;
2399 return result;
2400 }
2401 tryReadContent(length) {
2402 if (this.index < length) {
2403 return null;
2404 }
2405 let result = this.buffer.toString(this.encoding, 0, length);
2406 let nextStart = length;
2407 this.buffer.copy(this.buffer, 0, nextStart);
2408 this.index = this.index - nextStart;
2409 return result;
2410 }
2411 get numberOfBytes() {
2412 return this.index;
2413 }
2414}
2415var MessageReader;
2416(function (MessageReader) {
2417 function is(value) {
2418 let candidate = value;
2419 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
2420 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
2421 }
2422 MessageReader.is = is;
2423})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
2424class AbstractMessageReader {
2425 constructor() {
2426 this.errorEmitter = new events_1.Emitter();
2427 this.closeEmitter = new events_1.Emitter();
2428 this.partialMessageEmitter = new events_1.Emitter();
2429 }
2430 dispose() {
2431 this.errorEmitter.dispose();
2432 this.closeEmitter.dispose();
2433 }
2434 get onError() {
2435 return this.errorEmitter.event;
2436 }
2437 fireError(error) {
2438 this.errorEmitter.fire(this.asError(error));
2439 }
2440 get onClose() {
2441 return this.closeEmitter.event;
2442 }
2443 fireClose() {
2444 this.closeEmitter.fire(undefined);
2445 }
2446 get onPartialMessage() {
2447 return this.partialMessageEmitter.event;
2448 }
2449 firePartialMessage(info) {
2450 this.partialMessageEmitter.fire(info);
2451 }
2452 asError(error) {
2453 if (error instanceof Error) {
2454 return error;
2455 }
2456 else {
2457 return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2458 }
2459 }
2460}
2461exports.AbstractMessageReader = AbstractMessageReader;
2462class StreamMessageReader extends AbstractMessageReader {
2463 constructor(readable, encoding = 'utf8') {
2464 super();
2465 this.readable = readable;
2466 this.buffer = new MessageBuffer(encoding);
2467 this._partialMessageTimeout = 10000;
2468 }
2469 set partialMessageTimeout(timeout) {
2470 this._partialMessageTimeout = timeout;
2471 }
2472 get partialMessageTimeout() {
2473 return this._partialMessageTimeout;
2474 }
2475 listen(callback) {
2476 this.nextMessageLength = -1;
2477 this.messageToken = 0;
2478 this.partialMessageTimer = undefined;
2479 this.callback = callback;
2480 this.readable.on('data', (data) => {
2481 this.onData(data);
2482 });
2483 this.readable.on('error', (error) => this.fireError(error));
2484 this.readable.on('close', () => this.fireClose());
2485 }
2486 onData(data) {
2487 this.buffer.append(data);
2488 while (true) {
2489 if (this.nextMessageLength === -1) {
2490 let headers = this.buffer.tryReadHeaders();
2491 if (!headers) {
2492 return;
2493 }
2494 let contentLength = headers['Content-Length'];
2495 if (!contentLength) {
2496 throw new Error('Header must provide a Content-Length property.');
2497 }
2498 let length = parseInt(contentLength);
2499 if (isNaN(length)) {
2500 throw new Error('Content-Length value must be a number.');
2501 }
2502 this.nextMessageLength = length;
2503 // Take the encoding form the header. For compatibility
2504 // treat both utf-8 and utf8 as node utf8
2505 }
2506 var msg = this.buffer.tryReadContent(this.nextMessageLength);
2507 if (msg === null) {
2508 /** We haven't received the full message yet. */
2509 this.setPartialMessageTimer();
2510 return;
2511 }
2512 this.clearPartialMessageTimer();
2513 this.nextMessageLength = -1;
2514 this.messageToken++;
2515 var json = JSON.parse(msg);
2516 this.callback(json);
2517 }
2518 }
2519 clearPartialMessageTimer() {
2520 if (this.partialMessageTimer) {
2521 clearTimeout(this.partialMessageTimer);
2522 this.partialMessageTimer = undefined;
2523 }
2524 }
2525 setPartialMessageTimer() {
2526 this.clearPartialMessageTimer();
2527 if (this._partialMessageTimeout <= 0) {
2528 return;
2529 }
2530 this.partialMessageTimer = setTimeout((token, timeout) => {
2531 this.partialMessageTimer = undefined;
2532 if (token === this.messageToken) {
2533 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
2534 this.setPartialMessageTimer();
2535 }
2536 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
2537 }
2538}
2539exports.StreamMessageReader = StreamMessageReader;
2540class IPCMessageReader extends AbstractMessageReader {
2541 constructor(process) {
2542 super();
2543 this.process = process;
2544 let eventEmitter = this.process;
2545 eventEmitter.on('error', (error) => this.fireError(error));
2546 eventEmitter.on('close', () => this.fireClose());
2547 }
2548 listen(callback) {
2549 this.process.on('message', callback);
2550 }
2551}
2552exports.IPCMessageReader = IPCMessageReader;
2553class SocketMessageReader extends StreamMessageReader {
2554 constructor(socket, encoding = 'utf-8') {
2555 super(socket, encoding);
2556 }
2557}
2558exports.SocketMessageReader = SocketMessageReader;
2559
2560
2561/***/ }),
2562/* 8 */
2563/***/ ((__unused_webpack_module, exports) => {
2564
2565"use strict";
2566/* --------------------------------------------------------------------------------------------
2567 * Copyright (c) Microsoft Corporation. All rights reserved.
2568 * Licensed under the MIT License. See License.txt in the project root for license information.
2569 * ------------------------------------------------------------------------------------------ */
2570
2571Object.defineProperty(exports, "__esModule", ({ value: true }));
2572var Disposable;
2573(function (Disposable) {
2574 function create(func) {
2575 return {
2576 dispose: func
2577 };
2578 }
2579 Disposable.create = create;
2580})(Disposable = exports.Disposable || (exports.Disposable = {}));
2581var Event;
2582(function (Event) {
2583 const _disposable = { dispose() { } };
2584 Event.None = function () { return _disposable; };
2585})(Event = exports.Event || (exports.Event = {}));
2586class CallbackList {
2587 add(callback, context = null, bucket) {
2588 if (!this._callbacks) {
2589 this._callbacks = [];
2590 this._contexts = [];
2591 }
2592 this._callbacks.push(callback);
2593 this._contexts.push(context);
2594 if (Array.isArray(bucket)) {
2595 bucket.push({ dispose: () => this.remove(callback, context) });
2596 }
2597 }
2598 remove(callback, context = null) {
2599 if (!this._callbacks) {
2600 return;
2601 }
2602 var foundCallbackWithDifferentContext = false;
2603 for (var i = 0, len = this._callbacks.length; i < len; i++) {
2604 if (this._callbacks[i] === callback) {
2605 if (this._contexts[i] === context) {
2606 // callback & context match => remove it
2607 this._callbacks.splice(i, 1);
2608 this._contexts.splice(i, 1);
2609 return;
2610 }
2611 else {
2612 foundCallbackWithDifferentContext = true;
2613 }
2614 }
2615 }
2616 if (foundCallbackWithDifferentContext) {
2617 throw new Error('When adding a listener with a context, you should remove it with the same context');
2618 }
2619 }
2620 invoke(...args) {
2621 if (!this._callbacks) {
2622 return [];
2623 }
2624 var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
2625 for (var i = 0, len = callbacks.length; i < len; i++) {
2626 try {
2627 ret.push(callbacks[i].apply(contexts[i], args));
2628 }
2629 catch (e) {
2630 // eslint-disable-next-line no-console
2631 console.error(e);
2632 }
2633 }
2634 return ret;
2635 }
2636 isEmpty() {
2637 return !this._callbacks || this._callbacks.length === 0;
2638 }
2639 dispose() {
2640 this._callbacks = undefined;
2641 this._contexts = undefined;
2642 }
2643}
2644class Emitter {
2645 constructor(_options) {
2646 this._options = _options;
2647 }
2648 /**
2649 * For the public to allow to subscribe
2650 * to events from this Emitter
2651 */
2652 get event() {
2653 if (!this._event) {
2654 this._event = (listener, thisArgs, disposables) => {
2655 if (!this._callbacks) {
2656 this._callbacks = new CallbackList();
2657 }
2658 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
2659 this._options.onFirstListenerAdd(this);
2660 }
2661 this._callbacks.add(listener, thisArgs);
2662 let result;
2663 result = {
2664 dispose: () => {
2665 this._callbacks.remove(listener, thisArgs);
2666 result.dispose = Emitter._noop;
2667 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
2668 this._options.onLastListenerRemove(this);
2669 }
2670 }
2671 };
2672 if (Array.isArray(disposables)) {
2673 disposables.push(result);
2674 }
2675 return result;
2676 };
2677 }
2678 return this._event;
2679 }
2680 /**
2681 * To be kept private to fire an event to
2682 * subscribers
2683 */
2684 fire(event) {
2685 if (this._callbacks) {
2686 this._callbacks.invoke.call(this._callbacks, event);
2687 }
2688 }
2689 dispose() {
2690 if (this._callbacks) {
2691 this._callbacks.dispose();
2692 this._callbacks = undefined;
2693 }
2694 }
2695}
2696exports.Emitter = Emitter;
2697Emitter._noop = function () { };
2698
2699
2700/***/ }),
2701/* 9 */
2702/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2703
2704"use strict";
2705/* --------------------------------------------------------------------------------------------
2706 * Copyright (c) Microsoft Corporation. All rights reserved.
2707 * Licensed under the MIT License. See License.txt in the project root for license information.
2708 * ------------------------------------------------------------------------------------------ */
2709
2710Object.defineProperty(exports, "__esModule", ({ value: true }));
2711const events_1 = __webpack_require__(8);
2712const Is = __webpack_require__(5);
2713let ContentLength = 'Content-Length: ';
2714let CRLF = '\r\n';
2715var MessageWriter;
2716(function (MessageWriter) {
2717 function is(value) {
2718 let candidate = value;
2719 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
2720 Is.func(candidate.onError) && Is.func(candidate.write);
2721 }
2722 MessageWriter.is = is;
2723})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
2724class AbstractMessageWriter {
2725 constructor() {
2726 this.errorEmitter = new events_1.Emitter();
2727 this.closeEmitter = new events_1.Emitter();
2728 }
2729 dispose() {
2730 this.errorEmitter.dispose();
2731 this.closeEmitter.dispose();
2732 }
2733 get onError() {
2734 return this.errorEmitter.event;
2735 }
2736 fireError(error, message, count) {
2737 this.errorEmitter.fire([this.asError(error), message, count]);
2738 }
2739 get onClose() {
2740 return this.closeEmitter.event;
2741 }
2742 fireClose() {
2743 this.closeEmitter.fire(undefined);
2744 }
2745 asError(error) {
2746 if (error instanceof Error) {
2747 return error;
2748 }
2749 else {
2750 return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2751 }
2752 }
2753}
2754exports.AbstractMessageWriter = AbstractMessageWriter;
2755class StreamMessageWriter extends AbstractMessageWriter {
2756 constructor(writable, encoding = 'utf8') {
2757 super();
2758 this.writable = writable;
2759 this.encoding = encoding;
2760 this.errorCount = 0;
2761 this.writable.on('error', (error) => this.fireError(error));
2762 this.writable.on('close', () => this.fireClose());
2763 }
2764 write(msg) {
2765 let json = JSON.stringify(msg);
2766 let contentLength = Buffer.byteLength(json, this.encoding);
2767 let headers = [
2768 ContentLength, contentLength.toString(), CRLF,
2769 CRLF
2770 ];
2771 try {
2772 // Header must be written in ASCII encoding
2773 this.writable.write(headers.join(''), 'ascii');
2774 // Now write the content. This can be written in any encoding
2775 this.writable.write(json, this.encoding);
2776 this.errorCount = 0;
2777 }
2778 catch (error) {
2779 this.errorCount++;
2780 this.fireError(error, msg, this.errorCount);
2781 }
2782 }
2783}
2784exports.StreamMessageWriter = StreamMessageWriter;
2785class IPCMessageWriter extends AbstractMessageWriter {
2786 constructor(process) {
2787 super();
2788 this.process = process;
2789 this.errorCount = 0;
2790 this.queue = [];
2791 this.sending = false;
2792 let eventEmitter = this.process;
2793 eventEmitter.on('error', (error) => this.fireError(error));
2794 eventEmitter.on('close', () => this.fireClose);
2795 }
2796 write(msg) {
2797 if (!this.sending && this.queue.length === 0) {
2798 // See https://github.com/nodejs/node/issues/7657
2799 this.doWriteMessage(msg);
2800 }
2801 else {
2802 this.queue.push(msg);
2803 }
2804 }
2805 doWriteMessage(msg) {
2806 try {
2807 if (this.process.send) {
2808 this.sending = true;
2809 this.process.send(msg, undefined, undefined, (error) => {
2810 this.sending = false;
2811 if (error) {
2812 this.errorCount++;
2813 this.fireError(error, msg, this.errorCount);
2814 }
2815 else {
2816 this.errorCount = 0;
2817 }
2818 if (this.queue.length > 0) {
2819 this.doWriteMessage(this.queue.shift());
2820 }
2821 });
2822 }
2823 }
2824 catch (error) {
2825 this.errorCount++;
2826 this.fireError(error, msg, this.errorCount);
2827 }
2828 }
2829}
2830exports.IPCMessageWriter = IPCMessageWriter;
2831class SocketMessageWriter extends AbstractMessageWriter {
2832 constructor(socket, encoding = 'utf8') {
2833 super();
2834 this.socket = socket;
2835 this.queue = [];
2836 this.sending = false;
2837 this.encoding = encoding;
2838 this.errorCount = 0;
2839 this.socket.on('error', (error) => this.fireError(error));
2840 this.socket.on('close', () => this.fireClose());
2841 }
2842 dispose() {
2843 super.dispose();
2844 this.socket.destroy();
2845 }
2846 write(msg) {
2847 if (!this.sending && this.queue.length === 0) {
2848 // See https://github.com/nodejs/node/issues/7657
2849 this.doWriteMessage(msg);
2850 }
2851 else {
2852 this.queue.push(msg);
2853 }
2854 }
2855 doWriteMessage(msg) {
2856 let json = JSON.stringify(msg);
2857 let contentLength = Buffer.byteLength(json, this.encoding);
2858 let headers = [
2859 ContentLength, contentLength.toString(), CRLF,
2860 CRLF
2861 ];
2862 try {
2863 // Header must be written in ASCII encoding
2864 this.sending = true;
2865 this.socket.write(headers.join(''), 'ascii', (error) => {
2866 if (error) {
2867 this.handleError(error, msg);
2868 }
2869 try {
2870 // Now write the content. This can be written in any encoding
2871 this.socket.write(json, this.encoding, (error) => {
2872 this.sending = false;
2873 if (error) {
2874 this.handleError(error, msg);
2875 }
2876 else {
2877 this.errorCount = 0;
2878 }
2879 if (this.queue.length > 0) {
2880 this.doWriteMessage(this.queue.shift());
2881 }
2882 });
2883 }
2884 catch (error) {
2885 this.handleError(error, msg);
2886 }
2887 });
2888 }
2889 catch (error) {
2890 this.handleError(error, msg);
2891 }
2892 }
2893 handleError(error, msg) {
2894 this.errorCount++;
2895 this.fireError(error, msg, this.errorCount);
2896 }
2897}
2898exports.SocketMessageWriter = SocketMessageWriter;
2899
2900
2901/***/ }),
2902/* 10 */
2903/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2904
2905"use strict";
2906/*---------------------------------------------------------------------------------------------
2907 * Copyright (c) Microsoft Corporation. All rights reserved.
2908 * Licensed under the MIT License. See License.txt in the project root for license information.
2909 *--------------------------------------------------------------------------------------------*/
2910
2911Object.defineProperty(exports, "__esModule", ({ value: true }));
2912const events_1 = __webpack_require__(8);
2913const Is = __webpack_require__(5);
2914var CancellationToken;
2915(function (CancellationToken) {
2916 CancellationToken.None = Object.freeze({
2917 isCancellationRequested: false,
2918 onCancellationRequested: events_1.Event.None
2919 });
2920 CancellationToken.Cancelled = Object.freeze({
2921 isCancellationRequested: true,
2922 onCancellationRequested: events_1.Event.None
2923 });
2924 function is(value) {
2925 let candidate = value;
2926 return candidate && (candidate === CancellationToken.None
2927 || candidate === CancellationToken.Cancelled
2928 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
2929 }
2930 CancellationToken.is = is;
2931})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
2932const shortcutEvent = Object.freeze(function (callback, context) {
2933 let handle = setTimeout(callback.bind(context), 0);
2934 return { dispose() { clearTimeout(handle); } };
2935});
2936class MutableToken {
2937 constructor() {
2938 this._isCancelled = false;
2939 }
2940 cancel() {
2941 if (!this._isCancelled) {
2942 this._isCancelled = true;
2943 if (this._emitter) {
2944 this._emitter.fire(undefined);
2945 this.dispose();
2946 }
2947 }
2948 }
2949 get isCancellationRequested() {
2950 return this._isCancelled;
2951 }
2952 get onCancellationRequested() {
2953 if (this._isCancelled) {
2954 return shortcutEvent;
2955 }
2956 if (!this._emitter) {
2957 this._emitter = new events_1.Emitter();
2958 }
2959 return this._emitter.event;
2960 }
2961 dispose() {
2962 if (this._emitter) {
2963 this._emitter.dispose();
2964 this._emitter = undefined;
2965 }
2966 }
2967}
2968class CancellationTokenSource {
2969 get token() {
2970 if (!this._token) {
2971 // be lazy and create the token only when
2972 // actually needed
2973 this._token = new MutableToken();
2974 }
2975 return this._token;
2976 }
2977 cancel() {
2978 if (!this._token) {
2979 // save an object by returning the default
2980 // cancelled token when cancellation happens
2981 // before someone asks for the token
2982 this._token = CancellationToken.Cancelled;
2983 }
2984 else {
2985 this._token.cancel();
2986 }
2987 }
2988 dispose() {
2989 if (!this._token) {
2990 // ensure to initialize with an empty token if we had none
2991 this._token = CancellationToken.None;
2992 }
2993 else if (this._token instanceof MutableToken) {
2994 // actually dispose
2995 this._token.dispose();
2996 }
2997 }
2998}
2999exports.CancellationTokenSource = CancellationTokenSource;
3000
3001
3002/***/ }),
3003/* 11 */
3004/***/ ((__unused_webpack_module, exports) => {
3005
3006"use strict";
3007
3008/*---------------------------------------------------------------------------------------------
3009 * Copyright (c) Microsoft Corporation. All rights reserved.
3010 * Licensed under the MIT License. See License.txt in the project root for license information.
3011 *--------------------------------------------------------------------------------------------*/
3012Object.defineProperty(exports, "__esModule", ({ value: true }));
3013var Touch;
3014(function (Touch) {
3015 Touch.None = 0;
3016 Touch.First = 1;
3017 Touch.Last = 2;
3018})(Touch = exports.Touch || (exports.Touch = {}));
3019class LinkedMap {
3020 constructor() {
3021 this._map = new Map();
3022 this._head = undefined;
3023 this._tail = undefined;
3024 this._size = 0;
3025 }
3026 clear() {
3027 this._map.clear();
3028 this._head = undefined;
3029 this._tail = undefined;
3030 this._size = 0;
3031 }
3032 isEmpty() {
3033 return !this._head && !this._tail;
3034 }
3035 get size() {
3036 return this._size;
3037 }
3038 has(key) {
3039 return this._map.has(key);
3040 }
3041 get(key) {
3042 const item = this._map.get(key);
3043 if (!item) {
3044 return undefined;
3045 }
3046 return item.value;
3047 }
3048 set(key, value, touch = Touch.None) {
3049 let item = this._map.get(key);
3050 if (item) {
3051 item.value = value;
3052 if (touch !== Touch.None) {
3053 this.touch(item, touch);
3054 }
3055 }
3056 else {
3057 item = { key, value, next: undefined, previous: undefined };
3058 switch (touch) {
3059 case Touch.None:
3060 this.addItemLast(item);
3061 break;
3062 case Touch.First:
3063 this.addItemFirst(item);
3064 break;
3065 case Touch.Last:
3066 this.addItemLast(item);
3067 break;
3068 default:
3069 this.addItemLast(item);
3070 break;
3071 }
3072 this._map.set(key, item);
3073 this._size++;
3074 }
3075 }
3076 delete(key) {
3077 const item = this._map.get(key);
3078 if (!item) {
3079 return false;
3080 }
3081 this._map.delete(key);
3082 this.removeItem(item);
3083 this._size--;
3084 return true;
3085 }
3086 shift() {
3087 if (!this._head && !this._tail) {
3088 return undefined;
3089 }
3090 if (!this._head || !this._tail) {
3091 throw new Error('Invalid list');
3092 }
3093 const item = this._head;
3094 this._map.delete(item.key);
3095 this.removeItem(item);
3096 this._size--;
3097 return item.value;
3098 }
3099 forEach(callbackfn, thisArg) {
3100 let current = this._head;
3101 while (current) {
3102 if (thisArg) {
3103 callbackfn.bind(thisArg)(current.value, current.key, this);
3104 }
3105 else {
3106 callbackfn(current.value, current.key, this);
3107 }
3108 current = current.next;
3109 }
3110 }
3111 forEachReverse(callbackfn, thisArg) {
3112 let current = this._tail;
3113 while (current) {
3114 if (thisArg) {
3115 callbackfn.bind(thisArg)(current.value, current.key, this);
3116 }
3117 else {
3118 callbackfn(current.value, current.key, this);
3119 }
3120 current = current.previous;
3121 }
3122 }
3123 values() {
3124 let result = [];
3125 let current = this._head;
3126 while (current) {
3127 result.push(current.value);
3128 current = current.next;
3129 }
3130 return result;
3131 }
3132 keys() {
3133 let result = [];
3134 let current = this._head;
3135 while (current) {
3136 result.push(current.key);
3137 current = current.next;
3138 }
3139 return result;
3140 }
3141 /* JSON RPC run on es5 which has no Symbol.iterator
3142 public keys(): IterableIterator<K> {
3143 let current = this._head;
3144 let iterator: IterableIterator<K> = {
3145 [Symbol.iterator]() {
3146 return iterator;
3147 },
3148 next():IteratorResult<K> {
3149 if (current) {
3150 let result = { value: current.key, done: false };
3151 current = current.next;
3152 return result;
3153 } else {
3154 return { value: undefined, done: true };
3155 }
3156 }
3157 };
3158 return iterator;
3159 }
3160
3161 public values(): IterableIterator<V> {
3162 let current = this._head;
3163 let iterator: IterableIterator<V> = {
3164 [Symbol.iterator]() {
3165 return iterator;
3166 },
3167 next():IteratorResult<V> {
3168 if (current) {
3169 let result = { value: current.value, done: false };
3170 current = current.next;
3171 return result;
3172 } else {
3173 return { value: undefined, done: true };
3174 }
3175 }
3176 };
3177 return iterator;
3178 }
3179 */
3180 addItemFirst(item) {
3181 // First time Insert
3182 if (!this._head && !this._tail) {
3183 this._tail = item;
3184 }
3185 else if (!this._head) {
3186 throw new Error('Invalid list');
3187 }
3188 else {
3189 item.next = this._head;
3190 this._head.previous = item;
3191 }
3192 this._head = item;
3193 }
3194 addItemLast(item) {
3195 // First time Insert
3196 if (!this._head && !this._tail) {
3197 this._head = item;
3198 }
3199 else if (!this._tail) {
3200 throw new Error('Invalid list');
3201 }
3202 else {
3203 item.previous = this._tail;
3204 this._tail.next = item;
3205 }
3206 this._tail = item;
3207 }
3208 removeItem(item) {
3209 if (item === this._head && item === this._tail) {
3210 this._head = undefined;
3211 this._tail = undefined;
3212 }
3213 else if (item === this._head) {
3214 this._head = item.next;
3215 }
3216 else if (item === this._tail) {
3217 this._tail = item.previous;
3218 }
3219 else {
3220 const next = item.next;
3221 const previous = item.previous;
3222 if (!next || !previous) {
3223 throw new Error('Invalid list');
3224 }
3225 next.previous = previous;
3226 previous.next = next;
3227 }
3228 }
3229 touch(item, touch) {
3230 if (!this._head || !this._tail) {
3231 throw new Error('Invalid list');
3232 }
3233 if ((touch !== Touch.First && touch !== Touch.Last)) {
3234 return;
3235 }
3236 if (touch === Touch.First) {
3237 if (item === this._head) {
3238 return;
3239 }
3240 const next = item.next;
3241 const previous = item.previous;
3242 // Unlink the item
3243 if (item === this._tail) {
3244 // previous must be defined since item was not head but is tail
3245 // So there are more than on item in the map
3246 previous.next = undefined;
3247 this._tail = previous;
3248 }
3249 else {
3250 // Both next and previous are not undefined since item was neither head nor tail.
3251 next.previous = previous;
3252 previous.next = next;
3253 }
3254 // Insert the node at head
3255 item.previous = undefined;
3256 item.next = this._head;
3257 this._head.previous = item;
3258 this._head = item;
3259 }
3260 else if (touch === Touch.Last) {
3261 if (item === this._tail) {
3262 return;
3263 }
3264 const next = item.next;
3265 const previous = item.previous;
3266 // Unlink the item.
3267 if (item === this._head) {
3268 // next must be defined since item was not tail but is head
3269 // So there are more than on item in the map
3270 next.previous = undefined;
3271 this._head = next;
3272 }
3273 else {
3274 // Both next and previous are not undefined since item was neither head nor tail.
3275 next.previous = previous;
3276 previous.next = next;
3277 }
3278 item.next = undefined;
3279 item.previous = this._tail;
3280 this._tail.next = item;
3281 this._tail = item;
3282 }
3283 }
3284}
3285exports.LinkedMap = LinkedMap;
3286
3287
3288/***/ }),
3289/* 12 */
3290/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3291
3292"use strict";
3293/* --------------------------------------------------------------------------------------------
3294 * Copyright (c) Microsoft Corporation. All rights reserved.
3295 * Licensed under the MIT License. See License.txt in the project root for license information.
3296 * ------------------------------------------------------------------------------------------ */
3297
3298Object.defineProperty(exports, "__esModule", ({ value: true }));
3299const path_1 = __webpack_require__(13);
3300const os_1 = __webpack_require__(14);
3301const crypto_1 = __webpack_require__(15);
3302const net_1 = __webpack_require__(16);
3303const messageReader_1 = __webpack_require__(7);
3304const messageWriter_1 = __webpack_require__(9);
3305function generateRandomPipeName() {
3306 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
3307 if (process.platform === 'win32') {
3308 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
3309 }
3310 else {
3311 // Mac/Unix: use socket file
3312 return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);
3313 }
3314}
3315exports.generateRandomPipeName = generateRandomPipeName;
3316function createClientPipeTransport(pipeName, encoding = 'utf-8') {
3317 let connectResolve;
3318 let connected = new Promise((resolve, _reject) => {
3319 connectResolve = resolve;
3320 });
3321 return new Promise((resolve, reject) => {
3322 let server = net_1.createServer((socket) => {
3323 server.close();
3324 connectResolve([
3325 new messageReader_1.SocketMessageReader(socket, encoding),
3326 new messageWriter_1.SocketMessageWriter(socket, encoding)
3327 ]);
3328 });
3329 server.on('error', reject);
3330 server.listen(pipeName, () => {
3331 server.removeListener('error', reject);
3332 resolve({
3333 onConnected: () => { return connected; }
3334 });
3335 });
3336 });
3337}
3338exports.createClientPipeTransport = createClientPipeTransport;
3339function createServerPipeTransport(pipeName, encoding = 'utf-8') {
3340 const socket = net_1.createConnection(pipeName);
3341 return [
3342 new messageReader_1.SocketMessageReader(socket, encoding),
3343 new messageWriter_1.SocketMessageWriter(socket, encoding)
3344 ];
3345}
3346exports.createServerPipeTransport = createServerPipeTransport;
3347
3348
3349/***/ }),
3350/* 13 */
3351/***/ ((module) => {
3352
3353"use strict";
3354module.exports = require("path");;
3355
3356/***/ }),
3357/* 14 */
3358/***/ ((module) => {
3359
3360"use strict";
3361module.exports = require("os");;
3362
3363/***/ }),
3364/* 15 */
3365/***/ ((module) => {
3366
3367"use strict";
3368module.exports = require("crypto");;
3369
3370/***/ }),
3371/* 16 */
3372/***/ ((module) => {
3373
3374"use strict";
3375module.exports = require("net");;
3376
3377/***/ }),
3378/* 17 */
3379/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3380
3381"use strict";
3382/* --------------------------------------------------------------------------------------------
3383 * Copyright (c) Microsoft Corporation. All rights reserved.
3384 * Licensed under the MIT License. See License.txt in the project root for license information.
3385 * ------------------------------------------------------------------------------------------ */
3386
3387Object.defineProperty(exports, "__esModule", ({ value: true }));
3388const net_1 = __webpack_require__(16);
3389const messageReader_1 = __webpack_require__(7);
3390const messageWriter_1 = __webpack_require__(9);
3391function createClientSocketTransport(port, encoding = 'utf-8') {
3392 let connectResolve;
3393 let connected = new Promise((resolve, _reject) => {
3394 connectResolve = resolve;
3395 });
3396 return new Promise((resolve, reject) => {
3397 let server = net_1.createServer((socket) => {
3398 server.close();
3399 connectResolve([
3400 new messageReader_1.SocketMessageReader(socket, encoding),
3401 new messageWriter_1.SocketMessageWriter(socket, encoding)
3402 ]);
3403 });
3404 server.on('error', reject);
3405 server.listen(port, '127.0.0.1', () => {
3406 server.removeListener('error', reject);
3407 resolve({
3408 onConnected: () => { return connected; }
3409 });
3410 });
3411 });
3412}
3413exports.createClientSocketTransport = createClientSocketTransport;
3414function createServerSocketTransport(port, encoding = 'utf-8') {
3415 const socket = net_1.createConnection(port, '127.0.0.1');
3416 return [
3417 new messageReader_1.SocketMessageReader(socket, encoding),
3418 new messageWriter_1.SocketMessageWriter(socket, encoding)
3419 ];
3420}
3421exports.createServerSocketTransport = createServerSocketTransport;
3422
3423
3424/***/ }),
3425/* 18 */
3426/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3427
3428"use strict";
3429__webpack_require__.r(__webpack_exports__);
3430/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3431/* harmony export */ "Position": () => /* binding */ Position,
3432/* harmony export */ "Range": () => /* binding */ Range,
3433/* harmony export */ "Location": () => /* binding */ Location,
3434/* harmony export */ "LocationLink": () => /* binding */ LocationLink,
3435/* harmony export */ "Color": () => /* binding */ Color,
3436/* harmony export */ "ColorInformation": () => /* binding */ ColorInformation,
3437/* harmony export */ "ColorPresentation": () => /* binding */ ColorPresentation,
3438/* harmony export */ "FoldingRangeKind": () => /* binding */ FoldingRangeKind,
3439/* harmony export */ "FoldingRange": () => /* binding */ FoldingRange,
3440/* harmony export */ "DiagnosticRelatedInformation": () => /* binding */ DiagnosticRelatedInformation,
3441/* harmony export */ "DiagnosticSeverity": () => /* binding */ DiagnosticSeverity,
3442/* harmony export */ "DiagnosticTag": () => /* binding */ DiagnosticTag,
3443/* harmony export */ "Diagnostic": () => /* binding */ Diagnostic,
3444/* harmony export */ "Command": () => /* binding */ Command,
3445/* harmony export */ "TextEdit": () => /* binding */ TextEdit,
3446/* harmony export */ "TextDocumentEdit": () => /* binding */ TextDocumentEdit,
3447/* harmony export */ "CreateFile": () => /* binding */ CreateFile,
3448/* harmony export */ "RenameFile": () => /* binding */ RenameFile,
3449/* harmony export */ "DeleteFile": () => /* binding */ DeleteFile,
3450/* harmony export */ "WorkspaceEdit": () => /* binding */ WorkspaceEdit,
3451/* harmony export */ "WorkspaceChange": () => /* binding */ WorkspaceChange,
3452/* harmony export */ "TextDocumentIdentifier": () => /* binding */ TextDocumentIdentifier,
3453/* harmony export */ "VersionedTextDocumentIdentifier": () => /* binding */ VersionedTextDocumentIdentifier,
3454/* harmony export */ "TextDocumentItem": () => /* binding */ TextDocumentItem,
3455/* harmony export */ "MarkupKind": () => /* binding */ MarkupKind,
3456/* harmony export */ "MarkupContent": () => /* binding */ MarkupContent,
3457/* harmony export */ "CompletionItemKind": () => /* binding */ CompletionItemKind,
3458/* harmony export */ "InsertTextFormat": () => /* binding */ InsertTextFormat,
3459/* harmony export */ "CompletionItemTag": () => /* binding */ CompletionItemTag,
3460/* harmony export */ "CompletionItem": () => /* binding */ CompletionItem,
3461/* harmony export */ "CompletionList": () => /* binding */ CompletionList,
3462/* harmony export */ "MarkedString": () => /* binding */ MarkedString,
3463/* harmony export */ "Hover": () => /* binding */ Hover,
3464/* harmony export */ "ParameterInformation": () => /* binding */ ParameterInformation,
3465/* harmony export */ "SignatureInformation": () => /* binding */ SignatureInformation,
3466/* harmony export */ "DocumentHighlightKind": () => /* binding */ DocumentHighlightKind,
3467/* harmony export */ "DocumentHighlight": () => /* binding */ DocumentHighlight,
3468/* harmony export */ "SymbolKind": () => /* binding */ SymbolKind,
3469/* harmony export */ "SymbolTag": () => /* binding */ SymbolTag,
3470/* harmony export */ "SymbolInformation": () => /* binding */ SymbolInformation,
3471/* harmony export */ "DocumentSymbol": () => /* binding */ DocumentSymbol,
3472/* harmony export */ "CodeActionKind": () => /* binding */ CodeActionKind,
3473/* harmony export */ "CodeActionContext": () => /* binding */ CodeActionContext,
3474/* harmony export */ "CodeAction": () => /* binding */ CodeAction,
3475/* harmony export */ "CodeLens": () => /* binding */ CodeLens,
3476/* harmony export */ "FormattingOptions": () => /* binding */ FormattingOptions,
3477/* harmony export */ "DocumentLink": () => /* binding */ DocumentLink,
3478/* harmony export */ "SelectionRange": () => /* binding */ SelectionRange,
3479/* harmony export */ "EOL": () => /* binding */ EOL,
3480/* harmony export */ "TextDocument": () => /* binding */ TextDocument
3481/* harmony export */ });
3482/* --------------------------------------------------------------------------------------------
3483 * Copyright (c) Microsoft Corporation. All rights reserved.
3484 * Licensed under the MIT License. See License.txt in the project root for license information.
3485 * ------------------------------------------------------------------------------------------ */
3486
3487/**
3488 * The Position namespace provides helper functions to work with
3489 * [Position](#Position) literals.
3490 */
3491var Position;
3492(function (Position) {
3493 /**
3494 * Creates a new Position literal from the given line and character.
3495 * @param line The position's line.
3496 * @param character The position's character.
3497 */
3498 function create(line, character) {
3499 return { line: line, character: character };
3500 }
3501 Position.create = create;
3502 /**
3503 * Checks whether the given liternal conforms to the [Position](#Position) interface.
3504 */
3505 function is(value) {
3506 var candidate = value;
3507 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
3508 }
3509 Position.is = is;
3510})(Position || (Position = {}));
3511/**
3512 * The Range namespace provides helper functions to work with
3513 * [Range](#Range) literals.
3514 */
3515var Range;
3516(function (Range) {
3517 function create(one, two, three, four) {
3518 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
3519 return { start: Position.create(one, two), end: Position.create(three, four) };
3520 }
3521 else if (Position.is(one) && Position.is(two)) {
3522 return { start: one, end: two };
3523 }
3524 else {
3525 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
3526 }
3527 }
3528 Range.create = create;
3529 /**
3530 * Checks whether the given literal conforms to the [Range](#Range) interface.
3531 */
3532 function is(value) {
3533 var candidate = value;
3534 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
3535 }
3536 Range.is = is;
3537})(Range || (Range = {}));
3538/**
3539 * The Location namespace provides helper functions to work with
3540 * [Location](#Location) literals.
3541 */
3542var Location;
3543(function (Location) {
3544 /**
3545 * Creates a Location literal.
3546 * @param uri The location's uri.
3547 * @param range The location's range.
3548 */
3549 function create(uri, range) {
3550 return { uri: uri, range: range };
3551 }
3552 Location.create = create;
3553 /**
3554 * Checks whether the given literal conforms to the [Location](#Location) interface.
3555 */
3556 function is(value) {
3557 var candidate = value;
3558 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
3559 }
3560 Location.is = is;
3561})(Location || (Location = {}));
3562/**
3563 * The LocationLink namespace provides helper functions to work with
3564 * [LocationLink](#LocationLink) literals.
3565 */
3566var LocationLink;
3567(function (LocationLink) {
3568 /**
3569 * Creates a LocationLink literal.
3570 * @param targetUri The definition's uri.
3571 * @param targetRange The full range of the definition.
3572 * @param targetSelectionRange The span of the symbol definition at the target.
3573 * @param originSelectionRange The span of the symbol being defined in the originating source file.
3574 */
3575 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
3576 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
3577 }
3578 LocationLink.create = create;
3579 /**
3580 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
3581 */
3582 function is(value) {
3583 var candidate = value;
3584 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
3585 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
3586 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
3587 }
3588 LocationLink.is = is;
3589})(LocationLink || (LocationLink = {}));
3590/**
3591 * The Color namespace provides helper functions to work with
3592 * [Color](#Color) literals.
3593 */
3594var Color;
3595(function (Color) {
3596 /**
3597 * Creates a new Color literal.
3598 */
3599 function create(red, green, blue, alpha) {
3600 return {
3601 red: red,
3602 green: green,
3603 blue: blue,
3604 alpha: alpha,
3605 };
3606 }
3607 Color.create = create;
3608 /**
3609 * Checks whether the given literal conforms to the [Color](#Color) interface.
3610 */
3611 function is(value) {
3612 var candidate = value;
3613 return Is.number(candidate.red)
3614 && Is.number(candidate.green)
3615 && Is.number(candidate.blue)
3616 && Is.number(candidate.alpha);
3617 }
3618 Color.is = is;
3619})(Color || (Color = {}));
3620/**
3621 * The ColorInformation namespace provides helper functions to work with
3622 * [ColorInformation](#ColorInformation) literals.
3623 */
3624var ColorInformation;
3625(function (ColorInformation) {
3626 /**
3627 * Creates a new ColorInformation literal.
3628 */
3629 function create(range, color) {
3630 return {
3631 range: range,
3632 color: color,
3633 };
3634 }
3635 ColorInformation.create = create;
3636 /**
3637 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3638 */
3639 function is(value) {
3640 var candidate = value;
3641 return Range.is(candidate.range) && Color.is(candidate.color);
3642 }
3643 ColorInformation.is = is;
3644})(ColorInformation || (ColorInformation = {}));
3645/**
3646 * The Color namespace provides helper functions to work with
3647 * [ColorPresentation](#ColorPresentation) literals.
3648 */
3649var ColorPresentation;
3650(function (ColorPresentation) {
3651 /**
3652 * Creates a new ColorInformation literal.
3653 */
3654 function create(label, textEdit, additionalTextEdits) {
3655 return {
3656 label: label,
3657 textEdit: textEdit,
3658 additionalTextEdits: additionalTextEdits,
3659 };
3660 }
3661 ColorPresentation.create = create;
3662 /**
3663 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3664 */
3665 function is(value) {
3666 var candidate = value;
3667 return Is.string(candidate.label)
3668 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
3669 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
3670 }
3671 ColorPresentation.is = is;
3672})(ColorPresentation || (ColorPresentation = {}));
3673/**
3674 * Enum of known range kinds
3675 */
3676var FoldingRangeKind;
3677(function (FoldingRangeKind) {
3678 /**
3679 * Folding range for a comment
3680 */
3681 FoldingRangeKind["Comment"] = "comment";
3682 /**
3683 * Folding range for a imports or includes
3684 */
3685 FoldingRangeKind["Imports"] = "imports";
3686 /**
3687 * Folding range for a region (e.g. `#region`)
3688 */
3689 FoldingRangeKind["Region"] = "region";
3690})(FoldingRangeKind || (FoldingRangeKind = {}));
3691/**
3692 * The folding range namespace provides helper functions to work with
3693 * [FoldingRange](#FoldingRange) literals.
3694 */
3695var FoldingRange;
3696(function (FoldingRange) {
3697 /**
3698 * Creates a new FoldingRange literal.
3699 */
3700 function create(startLine, endLine, startCharacter, endCharacter, kind) {
3701 var result = {
3702 startLine: startLine,
3703 endLine: endLine
3704 };
3705 if (Is.defined(startCharacter)) {
3706 result.startCharacter = startCharacter;
3707 }
3708 if (Is.defined(endCharacter)) {
3709 result.endCharacter = endCharacter;
3710 }
3711 if (Is.defined(kind)) {
3712 result.kind = kind;
3713 }
3714 return result;
3715 }
3716 FoldingRange.create = create;
3717 /**
3718 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
3719 */
3720 function is(value) {
3721 var candidate = value;
3722 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
3723 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
3724 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
3725 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
3726 }
3727 FoldingRange.is = is;
3728})(FoldingRange || (FoldingRange = {}));
3729/**
3730 * The DiagnosticRelatedInformation namespace provides helper functions to work with
3731 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
3732 */
3733var DiagnosticRelatedInformation;
3734(function (DiagnosticRelatedInformation) {
3735 /**
3736 * Creates a new DiagnosticRelatedInformation literal.
3737 */
3738 function create(location, message) {
3739 return {
3740 location: location,
3741 message: message
3742 };
3743 }
3744 DiagnosticRelatedInformation.create = create;
3745 /**
3746 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
3747 */
3748 function is(value) {
3749 var candidate = value;
3750 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
3751 }
3752 DiagnosticRelatedInformation.is = is;
3753})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
3754/**
3755 * The diagnostic's severity.
3756 */
3757var DiagnosticSeverity;
3758(function (DiagnosticSeverity) {
3759 /**
3760 * Reports an error.
3761 */
3762 DiagnosticSeverity.Error = 1;
3763 /**
3764 * Reports a warning.
3765 */
3766 DiagnosticSeverity.Warning = 2;
3767 /**
3768 * Reports an information.
3769 */
3770 DiagnosticSeverity.Information = 3;
3771 /**
3772 * Reports a hint.
3773 */
3774 DiagnosticSeverity.Hint = 4;
3775})(DiagnosticSeverity || (DiagnosticSeverity = {}));
3776/**
3777 * The diagnostic tags.
3778 *
3779 * @since 3.15.0
3780 */
3781var DiagnosticTag;
3782(function (DiagnosticTag) {
3783 /**
3784 * Unused or unnecessary code.
3785 *
3786 * Clients are allowed to render diagnostics with this tag faded out instead of having
3787 * an error squiggle.
3788 */
3789 DiagnosticTag.Unnecessary = 1;
3790 /**
3791 * Deprecated or obsolete code.
3792 *
3793 * Clients are allowed to rendered diagnostics with this tag strike through.
3794 */
3795 DiagnosticTag.Deprecated = 2;
3796})(DiagnosticTag || (DiagnosticTag = {}));
3797/**
3798 * The Diagnostic namespace provides helper functions to work with
3799 * [Diagnostic](#Diagnostic) literals.
3800 */
3801var Diagnostic;
3802(function (Diagnostic) {
3803 /**
3804 * Creates a new Diagnostic literal.
3805 */
3806 function create(range, message, severity, code, source, relatedInformation) {
3807 var result = { range: range, message: message };
3808 if (Is.defined(severity)) {
3809 result.severity = severity;
3810 }
3811 if (Is.defined(code)) {
3812 result.code = code;
3813 }
3814 if (Is.defined(source)) {
3815 result.source = source;
3816 }
3817 if (Is.defined(relatedInformation)) {
3818 result.relatedInformation = relatedInformation;
3819 }
3820 return result;
3821 }
3822 Diagnostic.create = create;
3823 /**
3824 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
3825 */
3826 function is(value) {
3827 var candidate = value;
3828 return Is.defined(candidate)
3829 && Range.is(candidate.range)
3830 && Is.string(candidate.message)
3831 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
3832 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
3833 && (Is.string(candidate.source) || Is.undefined(candidate.source))
3834 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
3835 }
3836 Diagnostic.is = is;
3837})(Diagnostic || (Diagnostic = {}));
3838/**
3839 * The Command namespace provides helper functions to work with
3840 * [Command](#Command) literals.
3841 */
3842var Command;
3843(function (Command) {
3844 /**
3845 * Creates a new Command literal.
3846 */
3847 function create(title, command) {
3848 var args = [];
3849 for (var _i = 2; _i < arguments.length; _i++) {
3850 args[_i - 2] = arguments[_i];
3851 }
3852 var result = { title: title, command: command };
3853 if (Is.defined(args) && args.length > 0) {
3854 result.arguments = args;
3855 }
3856 return result;
3857 }
3858 Command.create = create;
3859 /**
3860 * Checks whether the given literal conforms to the [Command](#Command) interface.
3861 */
3862 function is(value) {
3863 var candidate = value;
3864 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
3865 }
3866 Command.is = is;
3867})(Command || (Command = {}));
3868/**
3869 * The TextEdit namespace provides helper function to create replace,
3870 * insert and delete edits more easily.
3871 */
3872var TextEdit;
3873(function (TextEdit) {
3874 /**
3875 * Creates a replace text edit.
3876 * @param range The range of text to be replaced.
3877 * @param newText The new text.
3878 */
3879 function replace(range, newText) {
3880 return { range: range, newText: newText };
3881 }
3882 TextEdit.replace = replace;
3883 /**
3884 * Creates a insert text edit.
3885 * @param position The position to insert the text at.
3886 * @param newText The text to be inserted.
3887 */
3888 function insert(position, newText) {
3889 return { range: { start: position, end: position }, newText: newText };
3890 }
3891 TextEdit.insert = insert;
3892 /**
3893 * Creates a delete text edit.
3894 * @param range The range of text to be deleted.
3895 */
3896 function del(range) {
3897 return { range: range, newText: '' };
3898 }
3899 TextEdit.del = del;
3900 function is(value) {
3901 var candidate = value;
3902 return Is.objectLiteral(candidate)
3903 && Is.string(candidate.newText)
3904 && Range.is(candidate.range);
3905 }
3906 TextEdit.is = is;
3907})(TextEdit || (TextEdit = {}));
3908/**
3909 * The TextDocumentEdit namespace provides helper function to create
3910 * an edit that manipulates a text document.
3911 */
3912var TextDocumentEdit;
3913(function (TextDocumentEdit) {
3914 /**
3915 * Creates a new `TextDocumentEdit`
3916 */
3917 function create(textDocument, edits) {
3918 return { textDocument: textDocument, edits: edits };
3919 }
3920 TextDocumentEdit.create = create;
3921 function is(value) {
3922 var candidate = value;
3923 return Is.defined(candidate)
3924 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
3925 && Array.isArray(candidate.edits);
3926 }
3927 TextDocumentEdit.is = is;
3928})(TextDocumentEdit || (TextDocumentEdit = {}));
3929var CreateFile;
3930(function (CreateFile) {
3931 function create(uri, options) {
3932 var result = {
3933 kind: 'create',
3934 uri: uri
3935 };
3936 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
3937 result.options = options;
3938 }
3939 return result;
3940 }
3941 CreateFile.create = create;
3942 function is(value) {
3943 var candidate = value;
3944 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
3945 (candidate.options === void 0 ||
3946 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
3947 }
3948 CreateFile.is = is;
3949})(CreateFile || (CreateFile = {}));
3950var RenameFile;
3951(function (RenameFile) {
3952 function create(oldUri, newUri, options) {
3953 var result = {
3954 kind: 'rename',
3955 oldUri: oldUri,
3956 newUri: newUri
3957 };
3958 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
3959 result.options = options;
3960 }
3961 return result;
3962 }
3963 RenameFile.create = create;
3964 function is(value) {
3965 var candidate = value;
3966 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
3967 (candidate.options === void 0 ||
3968 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
3969 }
3970 RenameFile.is = is;
3971})(RenameFile || (RenameFile = {}));
3972var DeleteFile;
3973(function (DeleteFile) {
3974 function create(uri, options) {
3975 var result = {
3976 kind: 'delete',
3977 uri: uri
3978 };
3979 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
3980 result.options = options;
3981 }
3982 return result;
3983 }
3984 DeleteFile.create = create;
3985 function is(value) {
3986 var candidate = value;
3987 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
3988 (candidate.options === void 0 ||
3989 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
3990 }
3991 DeleteFile.is = is;
3992})(DeleteFile || (DeleteFile = {}));
3993var WorkspaceEdit;
3994(function (WorkspaceEdit) {
3995 function is(value) {
3996 var candidate = value;
3997 return candidate &&
3998 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
3999 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
4000 if (Is.string(change.kind)) {
4001 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
4002 }
4003 else {
4004 return TextDocumentEdit.is(change);
4005 }
4006 }));
4007 }
4008 WorkspaceEdit.is = is;
4009})(WorkspaceEdit || (WorkspaceEdit = {}));
4010var TextEditChangeImpl = /** @class */ (function () {
4011 function TextEditChangeImpl(edits) {
4012 this.edits = edits;
4013 }
4014 TextEditChangeImpl.prototype.insert = function (position, newText) {
4015 this.edits.push(TextEdit.insert(position, newText));
4016 };
4017 TextEditChangeImpl.prototype.replace = function (range, newText) {
4018 this.edits.push(TextEdit.replace(range, newText));
4019 };
4020 TextEditChangeImpl.prototype.delete = function (range) {
4021 this.edits.push(TextEdit.del(range));
4022 };
4023 TextEditChangeImpl.prototype.add = function (edit) {
4024 this.edits.push(edit);
4025 };
4026 TextEditChangeImpl.prototype.all = function () {
4027 return this.edits;
4028 };
4029 TextEditChangeImpl.prototype.clear = function () {
4030 this.edits.splice(0, this.edits.length);
4031 };
4032 return TextEditChangeImpl;
4033}());
4034/**
4035 * A workspace change helps constructing changes to a workspace.
4036 */
4037var WorkspaceChange = /** @class */ (function () {
4038 function WorkspaceChange(workspaceEdit) {
4039 var _this = this;
4040 this._textEditChanges = Object.create(null);
4041 if (workspaceEdit) {
4042 this._workspaceEdit = workspaceEdit;
4043 if (workspaceEdit.documentChanges) {
4044 workspaceEdit.documentChanges.forEach(function (change) {
4045 if (TextDocumentEdit.is(change)) {
4046 var textEditChange = new TextEditChangeImpl(change.edits);
4047 _this._textEditChanges[change.textDocument.uri] = textEditChange;
4048 }
4049 });
4050 }
4051 else if (workspaceEdit.changes) {
4052 Object.keys(workspaceEdit.changes).forEach(function (key) {
4053 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
4054 _this._textEditChanges[key] = textEditChange;
4055 });
4056 }
4057 }
4058 }
4059 Object.defineProperty(WorkspaceChange.prototype, "edit", {
4060 /**
4061 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
4062 * use to be returned from a workspace edit operation like rename.
4063 */
4064 get: function () {
4065 return this._workspaceEdit;
4066 },
4067 enumerable: true,
4068 configurable: true
4069 });
4070 WorkspaceChange.prototype.getTextEditChange = function (key) {
4071 if (VersionedTextDocumentIdentifier.is(key)) {
4072 if (!this._workspaceEdit) {
4073 this._workspaceEdit = {
4074 documentChanges: []
4075 };
4076 }
4077 if (!this._workspaceEdit.documentChanges) {
4078 throw new Error('Workspace edit is not configured for document changes.');
4079 }
4080 var textDocument = key;
4081 var result = this._textEditChanges[textDocument.uri];
4082 if (!result) {
4083 var edits = [];
4084 var textDocumentEdit = {
4085 textDocument: textDocument,
4086 edits: edits
4087 };
4088 this._workspaceEdit.documentChanges.push(textDocumentEdit);
4089 result = new TextEditChangeImpl(edits);
4090 this._textEditChanges[textDocument.uri] = result;
4091 }
4092 return result;
4093 }
4094 else {
4095 if (!this._workspaceEdit) {
4096 this._workspaceEdit = {
4097 changes: Object.create(null)
4098 };
4099 }
4100 if (!this._workspaceEdit.changes) {
4101 throw new Error('Workspace edit is not configured for normal text edit changes.');
4102 }
4103 var result = this._textEditChanges[key];
4104 if (!result) {
4105 var edits = [];
4106 this._workspaceEdit.changes[key] = edits;
4107 result = new TextEditChangeImpl(edits);
4108 this._textEditChanges[key] = result;
4109 }
4110 return result;
4111 }
4112 };
4113 WorkspaceChange.prototype.createFile = function (uri, options) {
4114 this.checkDocumentChanges();
4115 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
4116 };
4117 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
4118 this.checkDocumentChanges();
4119 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
4120 };
4121 WorkspaceChange.prototype.deleteFile = function (uri, options) {
4122 this.checkDocumentChanges();
4123 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
4124 };
4125 WorkspaceChange.prototype.checkDocumentChanges = function () {
4126 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
4127 throw new Error('Workspace edit is not configured for document changes.');
4128 }
4129 };
4130 return WorkspaceChange;
4131}());
4132
4133/**
4134 * The TextDocumentIdentifier namespace provides helper functions to work with
4135 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
4136 */
4137var TextDocumentIdentifier;
4138(function (TextDocumentIdentifier) {
4139 /**
4140 * Creates a new TextDocumentIdentifier literal.
4141 * @param uri The document's uri.
4142 */
4143 function create(uri) {
4144 return { uri: uri };
4145 }
4146 TextDocumentIdentifier.create = create;
4147 /**
4148 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
4149 */
4150 function is(value) {
4151 var candidate = value;
4152 return Is.defined(candidate) && Is.string(candidate.uri);
4153 }
4154 TextDocumentIdentifier.is = is;
4155})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
4156/**
4157 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
4158 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
4159 */
4160var VersionedTextDocumentIdentifier;
4161(function (VersionedTextDocumentIdentifier) {
4162 /**
4163 * Creates a new VersionedTextDocumentIdentifier literal.
4164 * @param uri The document's uri.
4165 * @param uri The document's text.
4166 */
4167 function create(uri, version) {
4168 return { uri: uri, version: version };
4169 }
4170 VersionedTextDocumentIdentifier.create = create;
4171 /**
4172 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
4173 */
4174 function is(value) {
4175 var candidate = value;
4176 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
4177 }
4178 VersionedTextDocumentIdentifier.is = is;
4179})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
4180/**
4181 * The TextDocumentItem namespace provides helper functions to work with
4182 * [TextDocumentItem](#TextDocumentItem) literals.
4183 */
4184var TextDocumentItem;
4185(function (TextDocumentItem) {
4186 /**
4187 * Creates a new TextDocumentItem literal.
4188 * @param uri The document's uri.
4189 * @param languageId The document's language identifier.
4190 * @param version The document's version number.
4191 * @param text The document's text.
4192 */
4193 function create(uri, languageId, version, text) {
4194 return { uri: uri, languageId: languageId, version: version, text: text };
4195 }
4196 TextDocumentItem.create = create;
4197 /**
4198 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
4199 */
4200 function is(value) {
4201 var candidate = value;
4202 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
4203 }
4204 TextDocumentItem.is = is;
4205})(TextDocumentItem || (TextDocumentItem = {}));
4206/**
4207 * Describes the content type that a client supports in various
4208 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
4209 *
4210 * Please note that `MarkupKinds` must not start with a `$`. This kinds
4211 * are reserved for internal usage.
4212 */
4213var MarkupKind;
4214(function (MarkupKind) {
4215 /**
4216 * Plain text is supported as a content format
4217 */
4218 MarkupKind.PlainText = 'plaintext';
4219 /**
4220 * Markdown is supported as a content format
4221 */
4222 MarkupKind.Markdown = 'markdown';
4223})(MarkupKind || (MarkupKind = {}));
4224(function (MarkupKind) {
4225 /**
4226 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
4227 */
4228 function is(value) {
4229 var candidate = value;
4230 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
4231 }
4232 MarkupKind.is = is;
4233})(MarkupKind || (MarkupKind = {}));
4234var MarkupContent;
4235(function (MarkupContent) {
4236 /**
4237 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
4238 */
4239 function is(value) {
4240 var candidate = value;
4241 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
4242 }
4243 MarkupContent.is = is;
4244})(MarkupContent || (MarkupContent = {}));
4245/**
4246 * The kind of a completion entry.
4247 */
4248var CompletionItemKind;
4249(function (CompletionItemKind) {
4250 CompletionItemKind.Text = 1;
4251 CompletionItemKind.Method = 2;
4252 CompletionItemKind.Function = 3;
4253 CompletionItemKind.Constructor = 4;
4254 CompletionItemKind.Field = 5;
4255 CompletionItemKind.Variable = 6;
4256 CompletionItemKind.Class = 7;
4257 CompletionItemKind.Interface = 8;
4258 CompletionItemKind.Module = 9;
4259 CompletionItemKind.Property = 10;
4260 CompletionItemKind.Unit = 11;
4261 CompletionItemKind.Value = 12;
4262 CompletionItemKind.Enum = 13;
4263 CompletionItemKind.Keyword = 14;
4264 CompletionItemKind.Snippet = 15;
4265 CompletionItemKind.Color = 16;
4266 CompletionItemKind.File = 17;
4267 CompletionItemKind.Reference = 18;
4268 CompletionItemKind.Folder = 19;
4269 CompletionItemKind.EnumMember = 20;
4270 CompletionItemKind.Constant = 21;
4271 CompletionItemKind.Struct = 22;
4272 CompletionItemKind.Event = 23;
4273 CompletionItemKind.Operator = 24;
4274 CompletionItemKind.TypeParameter = 25;
4275})(CompletionItemKind || (CompletionItemKind = {}));
4276/**
4277 * Defines whether the insert text in a completion item should be interpreted as
4278 * plain text or a snippet.
4279 */
4280var InsertTextFormat;
4281(function (InsertTextFormat) {
4282 /**
4283 * The primary text to be inserted is treated as a plain string.
4284 */
4285 InsertTextFormat.PlainText = 1;
4286 /**
4287 * The primary text to be inserted is treated as a snippet.
4288 *
4289 * A snippet can define tab stops and placeholders with `$1`, `$2`
4290 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4291 * the end of the snippet. Placeholders with equal identifiers are linked,
4292 * that is typing in one will update others too.
4293 *
4294 * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
4295 */
4296 InsertTextFormat.Snippet = 2;
4297})(InsertTextFormat || (InsertTextFormat = {}));
4298/**
4299 * Completion item tags are extra annotations that tweak the rendering of a completion
4300 * item.
4301 *
4302 * @since 3.15.0
4303 */
4304var CompletionItemTag;
4305(function (CompletionItemTag) {
4306 /**
4307 * Render a completion as obsolete, usually using a strike-out.
4308 */
4309 CompletionItemTag.Deprecated = 1;
4310})(CompletionItemTag || (CompletionItemTag = {}));
4311/**
4312 * The CompletionItem namespace provides functions to deal with
4313 * completion items.
4314 */
4315var CompletionItem;
4316(function (CompletionItem) {
4317 /**
4318 * Create a completion item and seed it with a label.
4319 * @param label The completion item's label
4320 */
4321 function create(label) {
4322 return { label: label };
4323 }
4324 CompletionItem.create = create;
4325})(CompletionItem || (CompletionItem = {}));
4326/**
4327 * The CompletionList namespace provides functions to deal with
4328 * completion lists.
4329 */
4330var CompletionList;
4331(function (CompletionList) {
4332 /**
4333 * Creates a new completion list.
4334 *
4335 * @param items The completion items.
4336 * @param isIncomplete The list is not complete.
4337 */
4338 function create(items, isIncomplete) {
4339 return { items: items ? items : [], isIncomplete: !!isIncomplete };
4340 }
4341 CompletionList.create = create;
4342})(CompletionList || (CompletionList = {}));
4343var MarkedString;
4344(function (MarkedString) {
4345 /**
4346 * Creates a marked string from plain text.
4347 *
4348 * @param plainText The plain text.
4349 */
4350 function fromPlainText(plainText) {
4351 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
4352 }
4353 MarkedString.fromPlainText = fromPlainText;
4354 /**
4355 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
4356 */
4357 function is(value) {
4358 var candidate = value;
4359 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
4360 }
4361 MarkedString.is = is;
4362})(MarkedString || (MarkedString = {}));
4363var Hover;
4364(function (Hover) {
4365 /**
4366 * Checks whether the given value conforms to the [Hover](#Hover) interface.
4367 */
4368 function is(value) {
4369 var candidate = value;
4370 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
4371 MarkedString.is(candidate.contents) ||
4372 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
4373 }
4374 Hover.is = is;
4375})(Hover || (Hover = {}));
4376/**
4377 * The ParameterInformation namespace provides helper functions to work with
4378 * [ParameterInformation](#ParameterInformation) literals.
4379 */
4380var ParameterInformation;
4381(function (ParameterInformation) {
4382 /**
4383 * Creates a new parameter information literal.
4384 *
4385 * @param label A label string.
4386 * @param documentation A doc string.
4387 */
4388 function create(label, documentation) {
4389 return documentation ? { label: label, documentation: documentation } : { label: label };
4390 }
4391 ParameterInformation.create = create;
4392})(ParameterInformation || (ParameterInformation = {}));
4393/**
4394 * The SignatureInformation namespace provides helper functions to work with
4395 * [SignatureInformation](#SignatureInformation) literals.
4396 */
4397var SignatureInformation;
4398(function (SignatureInformation) {
4399 function create(label, documentation) {
4400 var parameters = [];
4401 for (var _i = 2; _i < arguments.length; _i++) {
4402 parameters[_i - 2] = arguments[_i];
4403 }
4404 var result = { label: label };
4405 if (Is.defined(documentation)) {
4406 result.documentation = documentation;
4407 }
4408 if (Is.defined(parameters)) {
4409 result.parameters = parameters;
4410 }
4411 else {
4412 result.parameters = [];
4413 }
4414 return result;
4415 }
4416 SignatureInformation.create = create;
4417})(SignatureInformation || (SignatureInformation = {}));
4418/**
4419 * A document highlight kind.
4420 */
4421var DocumentHighlightKind;
4422(function (DocumentHighlightKind) {
4423 /**
4424 * A textual occurrence.
4425 */
4426 DocumentHighlightKind.Text = 1;
4427 /**
4428 * Read-access of a symbol, like reading a variable.
4429 */
4430 DocumentHighlightKind.Read = 2;
4431 /**
4432 * Write-access of a symbol, like writing to a variable.
4433 */
4434 DocumentHighlightKind.Write = 3;
4435})(DocumentHighlightKind || (DocumentHighlightKind = {}));
4436/**
4437 * DocumentHighlight namespace to provide helper functions to work with
4438 * [DocumentHighlight](#DocumentHighlight) literals.
4439 */
4440var DocumentHighlight;
4441(function (DocumentHighlight) {
4442 /**
4443 * Create a DocumentHighlight object.
4444 * @param range The range the highlight applies to.
4445 */
4446 function create(range, kind) {
4447 var result = { range: range };
4448 if (Is.number(kind)) {
4449 result.kind = kind;
4450 }
4451 return result;
4452 }
4453 DocumentHighlight.create = create;
4454})(DocumentHighlight || (DocumentHighlight = {}));
4455/**
4456 * A symbol kind.
4457 */
4458var SymbolKind;
4459(function (SymbolKind) {
4460 SymbolKind.File = 1;
4461 SymbolKind.Module = 2;
4462 SymbolKind.Namespace = 3;
4463 SymbolKind.Package = 4;
4464 SymbolKind.Class = 5;
4465 SymbolKind.Method = 6;
4466 SymbolKind.Property = 7;
4467 SymbolKind.Field = 8;
4468 SymbolKind.Constructor = 9;
4469 SymbolKind.Enum = 10;
4470 SymbolKind.Interface = 11;
4471 SymbolKind.Function = 12;
4472 SymbolKind.Variable = 13;
4473 SymbolKind.Constant = 14;
4474 SymbolKind.String = 15;
4475 SymbolKind.Number = 16;
4476 SymbolKind.Boolean = 17;
4477 SymbolKind.Array = 18;
4478 SymbolKind.Object = 19;
4479 SymbolKind.Key = 20;
4480 SymbolKind.Null = 21;
4481 SymbolKind.EnumMember = 22;
4482 SymbolKind.Struct = 23;
4483 SymbolKind.Event = 24;
4484 SymbolKind.Operator = 25;
4485 SymbolKind.TypeParameter = 26;
4486})(SymbolKind || (SymbolKind = {}));
4487/**
4488 * Symbol tags are extra annotations that tweak the rendering of a symbol.
4489 * @since 3.15
4490 */
4491var SymbolTag;
4492(function (SymbolTag) {
4493 /**
4494 * Render a symbol as obsolete, usually using a strike-out.
4495 */
4496 SymbolTag.Deprecated = 1;
4497})(SymbolTag || (SymbolTag = {}));
4498var SymbolInformation;
4499(function (SymbolInformation) {
4500 /**
4501 * Creates a new symbol information literal.
4502 *
4503 * @param name The name of the symbol.
4504 * @param kind The kind of the symbol.
4505 * @param range The range of the location of the symbol.
4506 * @param uri The resource of the location of symbol, defaults to the current document.
4507 * @param containerName The name of the symbol containing the symbol.
4508 */
4509 function create(name, kind, range, uri, containerName) {
4510 var result = {
4511 name: name,
4512 kind: kind,
4513 location: { uri: uri, range: range }
4514 };
4515 if (containerName) {
4516 result.containerName = containerName;
4517 }
4518 return result;
4519 }
4520 SymbolInformation.create = create;
4521})(SymbolInformation || (SymbolInformation = {}));
4522var DocumentSymbol;
4523(function (DocumentSymbol) {
4524 /**
4525 * Creates a new symbol information literal.
4526 *
4527 * @param name The name of the symbol.
4528 * @param detail The detail of the symbol.
4529 * @param kind The kind of the symbol.
4530 * @param range The range of the symbol.
4531 * @param selectionRange The selectionRange of the symbol.
4532 * @param children Children of the symbol.
4533 */
4534 function create(name, detail, kind, range, selectionRange, children) {
4535 var result = {
4536 name: name,
4537 detail: detail,
4538 kind: kind,
4539 range: range,
4540 selectionRange: selectionRange
4541 };
4542 if (children !== void 0) {
4543 result.children = children;
4544 }
4545 return result;
4546 }
4547 DocumentSymbol.create = create;
4548 /**
4549 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
4550 */
4551 function is(value) {
4552 var candidate = value;
4553 return candidate &&
4554 Is.string(candidate.name) && Is.number(candidate.kind) &&
4555 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
4556 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
4557 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
4558 (candidate.children === void 0 || Array.isArray(candidate.children));
4559 }
4560 DocumentSymbol.is = is;
4561})(DocumentSymbol || (DocumentSymbol = {}));
4562/**
4563 * A set of predefined code action kinds
4564 */
4565var CodeActionKind;
4566(function (CodeActionKind) {
4567 /**
4568 * Empty kind.
4569 */
4570 CodeActionKind.Empty = '';
4571 /**
4572 * Base kind for quickfix actions: 'quickfix'
4573 */
4574 CodeActionKind.QuickFix = 'quickfix';
4575 /**
4576 * Base kind for refactoring actions: 'refactor'
4577 */
4578 CodeActionKind.Refactor = 'refactor';
4579 /**
4580 * Base kind for refactoring extraction actions: 'refactor.extract'
4581 *
4582 * Example extract actions:
4583 *
4584 * - Extract method
4585 * - Extract function
4586 * - Extract variable
4587 * - Extract interface from class
4588 * - ...
4589 */
4590 CodeActionKind.RefactorExtract = 'refactor.extract';
4591 /**
4592 * Base kind for refactoring inline actions: 'refactor.inline'
4593 *
4594 * Example inline actions:
4595 *
4596 * - Inline function
4597 * - Inline variable
4598 * - Inline constant
4599 * - ...
4600 */
4601 CodeActionKind.RefactorInline = 'refactor.inline';
4602 /**
4603 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
4604 *
4605 * Example rewrite actions:
4606 *
4607 * - Convert JavaScript function to class
4608 * - Add or remove parameter
4609 * - Encapsulate field
4610 * - Make method static
4611 * - Move method to base class
4612 * - ...
4613 */
4614 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
4615 /**
4616 * Base kind for source actions: `source`
4617 *
4618 * Source code actions apply to the entire file.
4619 */
4620 CodeActionKind.Source = 'source';
4621 /**
4622 * Base kind for an organize imports source action: `source.organizeImports`
4623 */
4624 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
4625 /**
4626 * Base kind for auto-fix source actions: `source.fixAll`.
4627 *
4628 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
4629 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
4630 *
4631 * @since 3.15.0
4632 */
4633 CodeActionKind.SourceFixAll = 'source.fixAll';
4634})(CodeActionKind || (CodeActionKind = {}));
4635/**
4636 * The CodeActionContext namespace provides helper functions to work with
4637 * [CodeActionContext](#CodeActionContext) literals.
4638 */
4639var CodeActionContext;
4640(function (CodeActionContext) {
4641 /**
4642 * Creates a new CodeActionContext literal.
4643 */
4644 function create(diagnostics, only) {
4645 var result = { diagnostics: diagnostics };
4646 if (only !== void 0 && only !== null) {
4647 result.only = only;
4648 }
4649 return result;
4650 }
4651 CodeActionContext.create = create;
4652 /**
4653 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
4654 */
4655 function is(value) {
4656 var candidate = value;
4657 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
4658 }
4659 CodeActionContext.is = is;
4660})(CodeActionContext || (CodeActionContext = {}));
4661var CodeAction;
4662(function (CodeAction) {
4663 function create(title, commandOrEdit, kind) {
4664 var result = { title: title };
4665 if (Command.is(commandOrEdit)) {
4666 result.command = commandOrEdit;
4667 }
4668 else {
4669 result.edit = commandOrEdit;
4670 }
4671 if (kind !== void 0) {
4672 result.kind = kind;
4673 }
4674 return result;
4675 }
4676 CodeAction.create = create;
4677 function is(value) {
4678 var candidate = value;
4679 return candidate && Is.string(candidate.title) &&
4680 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
4681 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
4682 (candidate.edit !== void 0 || candidate.command !== void 0) &&
4683 (candidate.command === void 0 || Command.is(candidate.command)) &&
4684 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
4685 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
4686 }
4687 CodeAction.is = is;
4688})(CodeAction || (CodeAction = {}));
4689/**
4690 * The CodeLens namespace provides helper functions to work with
4691 * [CodeLens](#CodeLens) literals.
4692 */
4693var CodeLens;
4694(function (CodeLens) {
4695 /**
4696 * Creates a new CodeLens literal.
4697 */
4698 function create(range, data) {
4699 var result = { range: range };
4700 if (Is.defined(data)) {
4701 result.data = data;
4702 }
4703 return result;
4704 }
4705 CodeLens.create = create;
4706 /**
4707 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
4708 */
4709 function is(value) {
4710 var candidate = value;
4711 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
4712 }
4713 CodeLens.is = is;
4714})(CodeLens || (CodeLens = {}));
4715/**
4716 * The FormattingOptions namespace provides helper functions to work with
4717 * [FormattingOptions](#FormattingOptions) literals.
4718 */
4719var FormattingOptions;
4720(function (FormattingOptions) {
4721 /**
4722 * Creates a new FormattingOptions literal.
4723 */
4724 function create(tabSize, insertSpaces) {
4725 return { tabSize: tabSize, insertSpaces: insertSpaces };
4726 }
4727 FormattingOptions.create = create;
4728 /**
4729 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
4730 */
4731 function is(value) {
4732 var candidate = value;
4733 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
4734 }
4735 FormattingOptions.is = is;
4736})(FormattingOptions || (FormattingOptions = {}));
4737/**
4738 * The DocumentLink namespace provides helper functions to work with
4739 * [DocumentLink](#DocumentLink) literals.
4740 */
4741var DocumentLink;
4742(function (DocumentLink) {
4743 /**
4744 * Creates a new DocumentLink literal.
4745 */
4746 function create(range, target, data) {
4747 return { range: range, target: target, data: data };
4748 }
4749 DocumentLink.create = create;
4750 /**
4751 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
4752 */
4753 function is(value) {
4754 var candidate = value;
4755 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
4756 }
4757 DocumentLink.is = is;
4758})(DocumentLink || (DocumentLink = {}));
4759/**
4760 * The SelectionRange namespace provides helper function to work with
4761 * SelectionRange literals.
4762 */
4763var SelectionRange;
4764(function (SelectionRange) {
4765 /**
4766 * Creates a new SelectionRange
4767 * @param range the range.
4768 * @param parent an optional parent.
4769 */
4770 function create(range, parent) {
4771 return { range: range, parent: parent };
4772 }
4773 SelectionRange.create = create;
4774 function is(value) {
4775 var candidate = value;
4776 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
4777 }
4778 SelectionRange.is = is;
4779})(SelectionRange || (SelectionRange = {}));
4780var EOL = ['\n', '\r\n', '\r'];
4781/**
4782 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
4783 */
4784var TextDocument;
4785(function (TextDocument) {
4786 /**
4787 * Creates a new ITextDocument literal from the given uri and content.
4788 * @param uri The document's uri.
4789 * @param languageId The document's language Id.
4790 * @param content The document's content.
4791 */
4792 function create(uri, languageId, version, content) {
4793 return new FullTextDocument(uri, languageId, version, content);
4794 }
4795 TextDocument.create = create;
4796 /**
4797 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
4798 */
4799 function is(value) {
4800 var candidate = value;
4801 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
4802 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
4803 }
4804 TextDocument.is = is;
4805 function applyEdits(document, edits) {
4806 var text = document.getText();
4807 var sortedEdits = mergeSort(edits, function (a, b) {
4808 var diff = a.range.start.line - b.range.start.line;
4809 if (diff === 0) {
4810 return a.range.start.character - b.range.start.character;
4811 }
4812 return diff;
4813 });
4814 var lastModifiedOffset = text.length;
4815 for (var i = sortedEdits.length - 1; i >= 0; i--) {
4816 var e = sortedEdits[i];
4817 var startOffset = document.offsetAt(e.range.start);
4818 var endOffset = document.offsetAt(e.range.end);
4819 if (endOffset <= lastModifiedOffset) {
4820 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
4821 }
4822 else {
4823 throw new Error('Overlapping edit');
4824 }
4825 lastModifiedOffset = startOffset;
4826 }
4827 return text;
4828 }
4829 TextDocument.applyEdits = applyEdits;
4830 function mergeSort(data, compare) {
4831 if (data.length <= 1) {
4832 // sorted
4833 return data;
4834 }
4835 var p = (data.length / 2) | 0;
4836 var left = data.slice(0, p);
4837 var right = data.slice(p);
4838 mergeSort(left, compare);
4839 mergeSort(right, compare);
4840 var leftIdx = 0;
4841 var rightIdx = 0;
4842 var i = 0;
4843 while (leftIdx < left.length && rightIdx < right.length) {
4844 var ret = compare(left[leftIdx], right[rightIdx]);
4845 if (ret <= 0) {
4846 // smaller_equal -> take left to preserve order
4847 data[i++] = left[leftIdx++];
4848 }
4849 else {
4850 // greater -> take right
4851 data[i++] = right[rightIdx++];
4852 }
4853 }
4854 while (leftIdx < left.length) {
4855 data[i++] = left[leftIdx++];
4856 }
4857 while (rightIdx < right.length) {
4858 data[i++] = right[rightIdx++];
4859 }
4860 return data;
4861 }
4862})(TextDocument || (TextDocument = {}));
4863var FullTextDocument = /** @class */ (function () {
4864 function FullTextDocument(uri, languageId, version, content) {
4865 this._uri = uri;
4866 this._languageId = languageId;
4867 this._version = version;
4868 this._content = content;
4869 this._lineOffsets = undefined;
4870 }
4871 Object.defineProperty(FullTextDocument.prototype, "uri", {
4872 get: function () {
4873 return this._uri;
4874 },
4875 enumerable: true,
4876 configurable: true
4877 });
4878 Object.defineProperty(FullTextDocument.prototype, "languageId", {
4879 get: function () {
4880 return this._languageId;
4881 },
4882 enumerable: true,
4883 configurable: true
4884 });
4885 Object.defineProperty(FullTextDocument.prototype, "version", {
4886 get: function () {
4887 return this._version;
4888 },
4889 enumerable: true,
4890 configurable: true
4891 });
4892 FullTextDocument.prototype.getText = function (range) {
4893 if (range) {
4894 var start = this.offsetAt(range.start);
4895 var end = this.offsetAt(range.end);
4896 return this._content.substring(start, end);
4897 }
4898 return this._content;
4899 };
4900 FullTextDocument.prototype.update = function (event, version) {
4901 this._content = event.text;
4902 this._version = version;
4903 this._lineOffsets = undefined;
4904 };
4905 FullTextDocument.prototype.getLineOffsets = function () {
4906 if (this._lineOffsets === undefined) {
4907 var lineOffsets = [];
4908 var text = this._content;
4909 var isLineStart = true;
4910 for (var i = 0; i < text.length; i++) {
4911 if (isLineStart) {
4912 lineOffsets.push(i);
4913 isLineStart = false;
4914 }
4915 var ch = text.charAt(i);
4916 isLineStart = (ch === '\r' || ch === '\n');
4917 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
4918 i++;
4919 }
4920 }
4921 if (isLineStart && text.length > 0) {
4922 lineOffsets.push(text.length);
4923 }
4924 this._lineOffsets = lineOffsets;
4925 }
4926 return this._lineOffsets;
4927 };
4928 FullTextDocument.prototype.positionAt = function (offset) {
4929 offset = Math.max(Math.min(offset, this._content.length), 0);
4930 var lineOffsets = this.getLineOffsets();
4931 var low = 0, high = lineOffsets.length;
4932 if (high === 0) {
4933 return Position.create(0, offset);
4934 }
4935 while (low < high) {
4936 var mid = Math.floor((low + high) / 2);
4937 if (lineOffsets[mid] > offset) {
4938 high = mid;
4939 }
4940 else {
4941 low = mid + 1;
4942 }
4943 }
4944 // low is the least x for which the line offset is larger than the current offset
4945 // or array.length if no line offset is larger than the current offset
4946 var line = low - 1;
4947 return Position.create(line, offset - lineOffsets[line]);
4948 };
4949 FullTextDocument.prototype.offsetAt = function (position) {
4950 var lineOffsets = this.getLineOffsets();
4951 if (position.line >= lineOffsets.length) {
4952 return this._content.length;
4953 }
4954 else if (position.line < 0) {
4955 return 0;
4956 }
4957 var lineOffset = lineOffsets[position.line];
4958 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
4959 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
4960 };
4961 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
4962 get: function () {
4963 return this.getLineOffsets().length;
4964 },
4965 enumerable: true,
4966 configurable: true
4967 });
4968 return FullTextDocument;
4969}());
4970var Is;
4971(function (Is) {
4972 var toString = Object.prototype.toString;
4973 function defined(value) {
4974 return typeof value !== 'undefined';
4975 }
4976 Is.defined = defined;
4977 function undefined(value) {
4978 return typeof value === 'undefined';
4979 }
4980 Is.undefined = undefined;
4981 function boolean(value) {
4982 return value === true || value === false;
4983 }
4984 Is.boolean = boolean;
4985 function string(value) {
4986 return toString.call(value) === '[object String]';
4987 }
4988 Is.string = string;
4989 function number(value) {
4990 return toString.call(value) === '[object Number]';
4991 }
4992 Is.number = number;
4993 function func(value) {
4994 return toString.call(value) === '[object Function]';
4995 }
4996 Is.func = func;
4997 function objectLiteral(value) {
4998 // Strictly speaking class instances pass this check as well. Since the LSP
4999 // doesn't use classes we ignore this for now. If we do we need to add something
5000 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5001 return value !== null && typeof value === 'object';
5002 }
5003 Is.objectLiteral = objectLiteral;
5004 function typedArray(value, check) {
5005 return Array.isArray(value) && value.every(check);
5006 }
5007 Is.typedArray = typedArray;
5008})(Is || (Is = {}));
5009
5010
5011/***/ }),
5012/* 19 */
5013/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5014
5015"use strict";
5016/* --------------------------------------------------------------------------------------------
5017 * Copyright (c) Microsoft Corporation. All rights reserved.
5018 * Licensed under the MIT License. See License.txt in the project root for license information.
5019 * ------------------------------------------------------------------------------------------ */
5020
5021Object.defineProperty(exports, "__esModule", ({ value: true }));
5022const Is = __webpack_require__(20);
5023const vscode_jsonrpc_1 = __webpack_require__(4);
5024const messages_1 = __webpack_require__(21);
5025const protocol_implementation_1 = __webpack_require__(22);
5026exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
5027const protocol_typeDefinition_1 = __webpack_require__(23);
5028exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
5029const protocol_workspaceFolders_1 = __webpack_require__(24);
5030exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
5031exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
5032const protocol_configuration_1 = __webpack_require__(25);
5033exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
5034const protocol_colorProvider_1 = __webpack_require__(26);
5035exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
5036exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
5037const protocol_foldingRange_1 = __webpack_require__(27);
5038exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
5039const protocol_declaration_1 = __webpack_require__(28);
5040exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
5041const protocol_selectionRange_1 = __webpack_require__(29);
5042exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
5043const protocol_progress_1 = __webpack_require__(30);
5044exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
5045exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
5046exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
5047// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5048let __noDynamicImport;
5049/**
5050 * The DocumentFilter namespace provides helper functions to work with
5051 * [DocumentFilter](#DocumentFilter) literals.
5052 */
5053var DocumentFilter;
5054(function (DocumentFilter) {
5055 function is(value) {
5056 const candidate = value;
5057 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
5058 }
5059 DocumentFilter.is = is;
5060})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
5061/**
5062 * The DocumentSelector namespace provides helper functions to work with
5063 * [DocumentSelector](#DocumentSelector)s.
5064 */
5065var DocumentSelector;
5066(function (DocumentSelector) {
5067 function is(value) {
5068 if (!Array.isArray(value)) {
5069 return false;
5070 }
5071 for (let elem of value) {
5072 if (!Is.string(elem) && !DocumentFilter.is(elem)) {
5073 return false;
5074 }
5075 }
5076 return true;
5077 }
5078 DocumentSelector.is = is;
5079})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
5080/**
5081 * The `client/registerCapability` request is sent from the server to the client to register a new capability
5082 * handler on the client side.
5083 */
5084var RegistrationRequest;
5085(function (RegistrationRequest) {
5086 RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
5087})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
5088/**
5089 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
5090 * handler on the client side.
5091 */
5092var UnregistrationRequest;
5093(function (UnregistrationRequest) {
5094 UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
5095})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
5096var ResourceOperationKind;
5097(function (ResourceOperationKind) {
5098 /**
5099 * Supports creating new files and folders.
5100 */
5101 ResourceOperationKind.Create = 'create';
5102 /**
5103 * Supports renaming existing files and folders.
5104 */
5105 ResourceOperationKind.Rename = 'rename';
5106 /**
5107 * Supports deleting existing files and folders.
5108 */
5109 ResourceOperationKind.Delete = 'delete';
5110})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
5111var FailureHandlingKind;
5112(function (FailureHandlingKind) {
5113 /**
5114 * Applying the workspace change is simply aborted if one of the changes provided
5115 * fails. All operations executed before the failing operation stay executed.
5116 */
5117 FailureHandlingKind.Abort = 'abort';
5118 /**
5119 * All operations are executed transactional. That means they either all
5120 * succeed or no changes at all are applied to the workspace.
5121 */
5122 FailureHandlingKind.Transactional = 'transactional';
5123 /**
5124 * If the workspace edit contains only textual file changes they are executed transactional.
5125 * If resource changes (create, rename or delete file) are part of the change the failure
5126 * handling startegy is abort.
5127 */
5128 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
5129 /**
5130 * The client tries to undo the operations already executed. But there is no
5131 * guarantee that this is succeeding.
5132 */
5133 FailureHandlingKind.Undo = 'undo';
5134})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
5135/**
5136 * The StaticRegistrationOptions namespace provides helper functions to work with
5137 * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
5138 */
5139var StaticRegistrationOptions;
5140(function (StaticRegistrationOptions) {
5141 function hasId(value) {
5142 const candidate = value;
5143 return candidate && Is.string(candidate.id) && candidate.id.length > 0;
5144 }
5145 StaticRegistrationOptions.hasId = hasId;
5146})(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
5147/**
5148 * The TextDocumentRegistrationOptions namespace provides helper functions to work with
5149 * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
5150 */
5151var TextDocumentRegistrationOptions;
5152(function (TextDocumentRegistrationOptions) {
5153 function is(value) {
5154 const candidate = value;
5155 return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
5156 }
5157 TextDocumentRegistrationOptions.is = is;
5158})(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
5159/**
5160 * The WorkDoneProgressOptions namespace provides helper functions to work with
5161 * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
5162 */
5163var WorkDoneProgressOptions;
5164(function (WorkDoneProgressOptions) {
5165 function is(value) {
5166 const candidate = value;
5167 return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
5168 }
5169 WorkDoneProgressOptions.is = is;
5170 function hasWorkDoneProgress(value) {
5171 const candidate = value;
5172 return candidate && Is.boolean(candidate.workDoneProgress);
5173 }
5174 WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
5175})(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
5176/**
5177 * The initialize request is sent from the client to the server.
5178 * It is sent once as the request after starting up the server.
5179 * The requests parameter is of type [InitializeParams](#InitializeParams)
5180 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
5181 * resolves to such.
5182 */
5183var InitializeRequest;
5184(function (InitializeRequest) {
5185 InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
5186})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
5187/**
5188 * Known error codes for an `InitializeError`;
5189 */
5190var InitializeError;
5191(function (InitializeError) {
5192 /**
5193 * If the protocol version provided by the client can't be handled by the server.
5194 * @deprecated This initialize error got replaced by client capabilities. There is
5195 * no version handshake in version 3.0x
5196 */
5197 InitializeError.unknownProtocolVersion = 1;
5198})(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
5199/**
5200 * The intialized notification is sent from the client to the
5201 * server after the client is fully initialized and the server
5202 * is allowed to send requests from the server to the client.
5203 */
5204var InitializedNotification;
5205(function (InitializedNotification) {
5206 InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
5207})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
5208//---- Shutdown Method ----
5209/**
5210 * A shutdown request is sent from the client to the server.
5211 * It is sent once when the client decides to shutdown the
5212 * server. The only notification that is sent after a shutdown request
5213 * is the exit event.
5214 */
5215var ShutdownRequest;
5216(function (ShutdownRequest) {
5217 ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
5218})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
5219//---- Exit Notification ----
5220/**
5221 * The exit event is sent from the client to the server to
5222 * ask the server to exit its process.
5223 */
5224var ExitNotification;
5225(function (ExitNotification) {
5226 ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
5227})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
5228/**
5229 * The configuration change notification is sent from the client to the server
5230 * when the client's configuration has changed. The notification contains
5231 * the changed configuration as defined by the language client.
5232 */
5233var DidChangeConfigurationNotification;
5234(function (DidChangeConfigurationNotification) {
5235 DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
5236})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
5237//---- Message show and log notifications ----
5238/**
5239 * The message type
5240 */
5241var MessageType;
5242(function (MessageType) {
5243 /**
5244 * An error message.
5245 */
5246 MessageType.Error = 1;
5247 /**
5248 * A warning message.
5249 */
5250 MessageType.Warning = 2;
5251 /**
5252 * An information message.
5253 */
5254 MessageType.Info = 3;
5255 /**
5256 * A log message.
5257 */
5258 MessageType.Log = 4;
5259})(MessageType = exports.MessageType || (exports.MessageType = {}));
5260/**
5261 * The show message notification is sent from a server to a client to ask
5262 * the client to display a particular message in the user interface.
5263 */
5264var ShowMessageNotification;
5265(function (ShowMessageNotification) {
5266 ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
5267})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
5268/**
5269 * The show message request is sent from the server to the client to show a message
5270 * and a set of options actions to the user.
5271 */
5272var ShowMessageRequest;
5273(function (ShowMessageRequest) {
5274 ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
5275})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
5276/**
5277 * The log message notification is sent from the server to the client to ask
5278 * the client to log a particular message.
5279 */
5280var LogMessageNotification;
5281(function (LogMessageNotification) {
5282 LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
5283})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
5284//---- Telemetry notification
5285/**
5286 * The telemetry event notification is sent from the server to the client to ask
5287 * the client to log telemetry data.
5288 */
5289var TelemetryEventNotification;
5290(function (TelemetryEventNotification) {
5291 TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
5292})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
5293/**
5294 * Defines how the host (editor) should sync
5295 * document changes to the language server.
5296 */
5297var TextDocumentSyncKind;
5298(function (TextDocumentSyncKind) {
5299 /**
5300 * Documents should not be synced at all.
5301 */
5302 TextDocumentSyncKind.None = 0;
5303 /**
5304 * Documents are synced by always sending the full content
5305 * of the document.
5306 */
5307 TextDocumentSyncKind.Full = 1;
5308 /**
5309 * Documents are synced by sending the full content on open.
5310 * After that only incremental updates to the document are
5311 * send.
5312 */
5313 TextDocumentSyncKind.Incremental = 2;
5314})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
5315/**
5316 * The document open notification is sent from the client to the server to signal
5317 * newly opened text documents. The document's truth is now managed by the client
5318 * and the server must not try to read the document's truth using the document's
5319 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
5320 * mean that its content is presented in an editor. An open notification must not
5321 * be sent more than once without a corresponding close notification send before.
5322 * This means open and close notification must be balanced and the max open count
5323 * is one.
5324 */
5325var DidOpenTextDocumentNotification;
5326(function (DidOpenTextDocumentNotification) {
5327 DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
5328 DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
5329})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
5330/**
5331 * The document change notification is sent from the client to the server to signal
5332 * changes to a text document.
5333 */
5334var DidChangeTextDocumentNotification;
5335(function (DidChangeTextDocumentNotification) {
5336 DidChangeTextDocumentNotification.method = 'textDocument/didChange';
5337 DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
5338})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
5339/**
5340 * The document close notification is sent from the client to the server when
5341 * the document got closed in the client. The document's truth now exists where
5342 * the document's uri points to (e.g. if the document's uri is a file uri the
5343 * truth now exists on disk). As with the open notification the close notification
5344 * is about managing the document's content. Receiving a close notification
5345 * doesn't mean that the document was open in an editor before. A close
5346 * notification requires a previous open notification to be sent.
5347 */
5348var DidCloseTextDocumentNotification;
5349(function (DidCloseTextDocumentNotification) {
5350 DidCloseTextDocumentNotification.method = 'textDocument/didClose';
5351 DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
5352})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
5353/**
5354 * The document save notification is sent from the client to the server when
5355 * the document got saved in the client.
5356 */
5357var DidSaveTextDocumentNotification;
5358(function (DidSaveTextDocumentNotification) {
5359 DidSaveTextDocumentNotification.method = 'textDocument/didSave';
5360 DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
5361})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
5362/**
5363 * Represents reasons why a text document is saved.
5364 */
5365var TextDocumentSaveReason;
5366(function (TextDocumentSaveReason) {
5367 /**
5368 * Manually triggered, e.g. by the user pressing save, by starting debugging,
5369 * or by an API call.
5370 */
5371 TextDocumentSaveReason.Manual = 1;
5372 /**
5373 * Automatic after a delay.
5374 */
5375 TextDocumentSaveReason.AfterDelay = 2;
5376 /**
5377 * When the editor lost focus.
5378 */
5379 TextDocumentSaveReason.FocusOut = 3;
5380})(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
5381/**
5382 * A document will save notification is sent from the client to the server before
5383 * the document is actually saved.
5384 */
5385var WillSaveTextDocumentNotification;
5386(function (WillSaveTextDocumentNotification) {
5387 WillSaveTextDocumentNotification.method = 'textDocument/willSave';
5388 WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
5389})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
5390/**
5391 * A document will save request is sent from the client to the server before
5392 * the document is actually saved. The request can return an array of TextEdits
5393 * which will be applied to the text document before it is saved. Please note that
5394 * clients might drop results if computing the text edits took too long or if a
5395 * server constantly fails on this request. This is done to keep the save fast and
5396 * reliable.
5397 */
5398var WillSaveTextDocumentWaitUntilRequest;
5399(function (WillSaveTextDocumentWaitUntilRequest) {
5400 WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
5401 WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
5402})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
5403/**
5404 * The watched files notification is sent from the client to the server when
5405 * the client detects changes to file watched by the language client.
5406 */
5407var DidChangeWatchedFilesNotification;
5408(function (DidChangeWatchedFilesNotification) {
5409 DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
5410})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
5411/**
5412 * The file event type
5413 */
5414var FileChangeType;
5415(function (FileChangeType) {
5416 /**
5417 * The file got created.
5418 */
5419 FileChangeType.Created = 1;
5420 /**
5421 * The file got changed.
5422 */
5423 FileChangeType.Changed = 2;
5424 /**
5425 * The file got deleted.
5426 */
5427 FileChangeType.Deleted = 3;
5428})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
5429var WatchKind;
5430(function (WatchKind) {
5431 /**
5432 * Interested in create events.
5433 */
5434 WatchKind.Create = 1;
5435 /**
5436 * Interested in change events
5437 */
5438 WatchKind.Change = 2;
5439 /**
5440 * Interested in delete events
5441 */
5442 WatchKind.Delete = 4;
5443})(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
5444/**
5445 * Diagnostics notification are sent from the server to the client to signal
5446 * results of validation runs.
5447 */
5448var PublishDiagnosticsNotification;
5449(function (PublishDiagnosticsNotification) {
5450 PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
5451})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
5452/**
5453 * How a completion was triggered
5454 */
5455var CompletionTriggerKind;
5456(function (CompletionTriggerKind) {
5457 /**
5458 * Completion was triggered by typing an identifier (24x7 code
5459 * complete), manual invocation (e.g Ctrl+Space) or via API.
5460 */
5461 CompletionTriggerKind.Invoked = 1;
5462 /**
5463 * Completion was triggered by a trigger character specified by
5464 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
5465 */
5466 CompletionTriggerKind.TriggerCharacter = 2;
5467 /**
5468 * Completion was re-triggered as current completion list is incomplete
5469 */
5470 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
5471})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
5472/**
5473 * Request to request completion at a given text document position. The request's
5474 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
5475 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
5476 * or a Thenable that resolves to such.
5477 *
5478 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
5479 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
5480 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
5481 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
5482 */
5483var CompletionRequest;
5484(function (CompletionRequest) {
5485 CompletionRequest.method = 'textDocument/completion';
5486 CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
5487 /** @deprecated Use CompletionRequest.type */
5488 CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5489})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
5490/**
5491 * Request to resolve additional information for a given completion item.The request's
5492 * parameter is of type [CompletionItem](#CompletionItem) the response
5493 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
5494 */
5495var CompletionResolveRequest;
5496(function (CompletionResolveRequest) {
5497 CompletionResolveRequest.method = 'completionItem/resolve';
5498 CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
5499})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
5500/**
5501 * Request to request hover information at a given text document position. The request's
5502 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
5503 * type [Hover](#Hover) or a Thenable that resolves to such.
5504 */
5505var HoverRequest;
5506(function (HoverRequest) {
5507 HoverRequest.method = 'textDocument/hover';
5508 HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
5509})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
5510/**
5511 * How a signature help was triggered.
5512 *
5513 * @since 3.15.0
5514 */
5515var SignatureHelpTriggerKind;
5516(function (SignatureHelpTriggerKind) {
5517 /**
5518 * Signature help was invoked manually by the user or by a command.
5519 */
5520 SignatureHelpTriggerKind.Invoked = 1;
5521 /**
5522 * Signature help was triggered by a trigger character.
5523 */
5524 SignatureHelpTriggerKind.TriggerCharacter = 2;
5525 /**
5526 * Signature help was triggered by the cursor moving or by the document content changing.
5527 */
5528 SignatureHelpTriggerKind.ContentChange = 3;
5529})(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
5530var SignatureHelpRequest;
5531(function (SignatureHelpRequest) {
5532 SignatureHelpRequest.method = 'textDocument/signatureHelp';
5533 SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
5534})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
5535/**
5536 * A request to resolve the definition location of a symbol at a given text
5537 * document position. The request's parameter is of type [TextDocumentPosition]
5538 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
5539 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
5540 * to such.
5541 */
5542var DefinitionRequest;
5543(function (DefinitionRequest) {
5544 DefinitionRequest.method = 'textDocument/definition';
5545 DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
5546 /** @deprecated Use DefinitionRequest.type */
5547 DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5548})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
5549/**
5550 * A request to resolve project-wide references for the symbol denoted
5551 * by the given text document position. The request's parameter is of
5552 * type [ReferenceParams](#ReferenceParams) the response is of type
5553 * [Location[]](#Location) or a Thenable that resolves to such.
5554 */
5555var ReferencesRequest;
5556(function (ReferencesRequest) {
5557 ReferencesRequest.method = 'textDocument/references';
5558 ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
5559 /** @deprecated Use ReferencesRequest.type */
5560 ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5561})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
5562/**
5563 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
5564 * text document position. The request's parameter is of type [TextDocumentPosition]
5565 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
5566 * (#DocumentHighlight) or a Thenable that resolves to such.
5567 */
5568var DocumentHighlightRequest;
5569(function (DocumentHighlightRequest) {
5570 DocumentHighlightRequest.method = 'textDocument/documentHighlight';
5571 DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
5572 /** @deprecated Use DocumentHighlightRequest.type */
5573 DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5574})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
5575/**
5576 * A request to list all symbols found in a given text document. The request's
5577 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
5578 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
5579 * that resolves to such.
5580 */
5581var DocumentSymbolRequest;
5582(function (DocumentSymbolRequest) {
5583 DocumentSymbolRequest.method = 'textDocument/documentSymbol';
5584 DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
5585 /** @deprecated Use DocumentSymbolRequest.type */
5586 DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5587})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
5588/**
5589 * A request to provide commands for the given text document and range.
5590 */
5591var CodeActionRequest;
5592(function (CodeActionRequest) {
5593 CodeActionRequest.method = 'textDocument/codeAction';
5594 CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
5595 /** @deprecated Use CodeActionRequest.type */
5596 CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5597})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
5598/**
5599 * A request to list project-wide symbols matching the query string given
5600 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
5601 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
5602 * resolves to such.
5603 */
5604var WorkspaceSymbolRequest;
5605(function (WorkspaceSymbolRequest) {
5606 WorkspaceSymbolRequest.method = 'workspace/symbol';
5607 WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
5608 /** @deprecated Use WorkspaceSymbolRequest.type */
5609 WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5610})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
5611/**
5612 * A request to provide code lens for the given text document.
5613 */
5614var CodeLensRequest;
5615(function (CodeLensRequest) {
5616 CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
5617 /** @deprecated Use CodeLensRequest.type */
5618 CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5619})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
5620/**
5621 * A request to resolve a command for a given code lens.
5622 */
5623var CodeLensResolveRequest;
5624(function (CodeLensResolveRequest) {
5625 CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
5626})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
5627/**
5628 * A request to provide document links
5629 */
5630var DocumentLinkRequest;
5631(function (DocumentLinkRequest) {
5632 DocumentLinkRequest.method = 'textDocument/documentLink';
5633 DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
5634 /** @deprecated Use DocumentLinkRequest.type */
5635 DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5636})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
5637/**
5638 * Request to resolve additional information for a given document link. The request's
5639 * parameter is of type [DocumentLink](#DocumentLink) the response
5640 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
5641 */
5642var DocumentLinkResolveRequest;
5643(function (DocumentLinkResolveRequest) {
5644 DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
5645})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
5646/**
5647 * A request to to format a whole document.
5648 */
5649var DocumentFormattingRequest;
5650(function (DocumentFormattingRequest) {
5651 DocumentFormattingRequest.method = 'textDocument/formatting';
5652 DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
5653})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
5654/**
5655 * A request to to format a range in a document.
5656 */
5657var DocumentRangeFormattingRequest;
5658(function (DocumentRangeFormattingRequest) {
5659 DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
5660 DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
5661})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
5662/**
5663 * A request to format a document on type.
5664 */
5665var DocumentOnTypeFormattingRequest;
5666(function (DocumentOnTypeFormattingRequest) {
5667 DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
5668 DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
5669})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
5670/**
5671 * A request to rename a symbol.
5672 */
5673var RenameRequest;
5674(function (RenameRequest) {
5675 RenameRequest.method = 'textDocument/rename';
5676 RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
5677})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
5678/**
5679 * A request to test and perform the setup necessary for a rename.
5680 */
5681var PrepareRenameRequest;
5682(function (PrepareRenameRequest) {
5683 PrepareRenameRequest.method = 'textDocument/prepareRename';
5684 PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
5685})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
5686/**
5687 * A request send from the client to the server to execute a command. The request might return
5688 * a workspace edit which the client will apply to the workspace.
5689 */
5690var ExecuteCommandRequest;
5691(function (ExecuteCommandRequest) {
5692 ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
5693})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
5694/**
5695 * A request sent from the server to the client to modified certain resources.
5696 */
5697var ApplyWorkspaceEditRequest;
5698(function (ApplyWorkspaceEditRequest) {
5699 ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
5700})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
5701
5702
5703/***/ }),
5704/* 20 */
5705/***/ ((__unused_webpack_module, exports) => {
5706
5707"use strict";
5708/* --------------------------------------------------------------------------------------------
5709 * Copyright (c) Microsoft Corporation. All rights reserved.
5710 * Licensed under the MIT License. See License.txt in the project root for license information.
5711 * ------------------------------------------------------------------------------------------ */
5712
5713Object.defineProperty(exports, "__esModule", ({ value: true }));
5714function boolean(value) {
5715 return value === true || value === false;
5716}
5717exports.boolean = boolean;
5718function string(value) {
5719 return typeof value === 'string' || value instanceof String;
5720}
5721exports.string = string;
5722function number(value) {
5723 return typeof value === 'number' || value instanceof Number;
5724}
5725exports.number = number;
5726function error(value) {
5727 return value instanceof Error;
5728}
5729exports.error = error;
5730function func(value) {
5731 return typeof value === 'function';
5732}
5733exports.func = func;
5734function array(value) {
5735 return Array.isArray(value);
5736}
5737exports.array = array;
5738function stringArray(value) {
5739 return array(value) && value.every(elem => string(elem));
5740}
5741exports.stringArray = stringArray;
5742function typedArray(value, check) {
5743 return Array.isArray(value) && value.every(check);
5744}
5745exports.typedArray = typedArray;
5746function objectLiteral(value) {
5747 // Strictly speaking class instances pass this check as well. Since the LSP
5748 // doesn't use classes we ignore this for now. If we do we need to add something
5749 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
5750 return value !== null && typeof value === 'object';
5751}
5752exports.objectLiteral = objectLiteral;
5753
5754
5755/***/ }),
5756/* 21 */
5757/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5758
5759"use strict";
5760/* --------------------------------------------------------------------------------------------
5761 * Copyright (c) Microsoft Corporation. All rights reserved.
5762 * Licensed under the MIT License. See License.txt in the project root for license information.
5763 * ------------------------------------------------------------------------------------------ */
5764
5765Object.defineProperty(exports, "__esModule", ({ value: true }));
5766const vscode_jsonrpc_1 = __webpack_require__(4);
5767class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
5768 constructor(method) {
5769 super(method);
5770 }
5771}
5772exports.ProtocolRequestType0 = ProtocolRequestType0;
5773class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
5774 constructor(method) {
5775 super(method);
5776 }
5777}
5778exports.ProtocolRequestType = ProtocolRequestType;
5779class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
5780 constructor(method) {
5781 super(method);
5782 }
5783}
5784exports.ProtocolNotificationType = ProtocolNotificationType;
5785class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
5786 constructor(method) {
5787 super(method);
5788 }
5789}
5790exports.ProtocolNotificationType0 = ProtocolNotificationType0;
5791
5792
5793/***/ }),
5794/* 22 */
5795/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5796
5797"use strict";
5798/* --------------------------------------------------------------------------------------------
5799 * Copyright (c) Microsoft Corporation. All rights reserved.
5800 * Licensed under the MIT License. See License.txt in the project root for license information.
5801 * ------------------------------------------------------------------------------------------ */
5802
5803Object.defineProperty(exports, "__esModule", ({ value: true }));
5804const vscode_jsonrpc_1 = __webpack_require__(4);
5805const messages_1 = __webpack_require__(21);
5806// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5807let __noDynamicImport;
5808/**
5809 * A request to resolve the implementation locations of a symbol at a given text
5810 * document position. The request's parameter is of type [TextDocumentPositioParams]
5811 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5812 * Thenable that resolves to such.
5813 */
5814var ImplementationRequest;
5815(function (ImplementationRequest) {
5816 ImplementationRequest.method = 'textDocument/implementation';
5817 ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
5818 /** @deprecated Use ImplementationRequest.type */
5819 ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5820})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
5821
5822
5823/***/ }),
5824/* 23 */
5825/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5826
5827"use strict";
5828/* --------------------------------------------------------------------------------------------
5829 * Copyright (c) Microsoft Corporation. All rights reserved.
5830 * Licensed under the MIT License. See License.txt in the project root for license information.
5831 * ------------------------------------------------------------------------------------------ */
5832
5833Object.defineProperty(exports, "__esModule", ({ value: true }));
5834const vscode_jsonrpc_1 = __webpack_require__(4);
5835const messages_1 = __webpack_require__(21);
5836// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5837let __noDynamicImport;
5838/**
5839 * A request to resolve the type definition locations of a symbol at a given text
5840 * document position. The request's parameter is of type [TextDocumentPositioParams]
5841 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5842 * Thenable that resolves to such.
5843 */
5844var TypeDefinitionRequest;
5845(function (TypeDefinitionRequest) {
5846 TypeDefinitionRequest.method = 'textDocument/typeDefinition';
5847 TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
5848 /** @deprecated Use TypeDefinitionRequest.type */
5849 TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5850})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
5851
5852
5853/***/ }),
5854/* 24 */
5855/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5856
5857"use strict";
5858/* --------------------------------------------------------------------------------------------
5859 * Copyright (c) Microsoft Corporation. All rights reserved.
5860 * Licensed under the MIT License. See License.txt in the project root for license information.
5861 * ------------------------------------------------------------------------------------------ */
5862
5863Object.defineProperty(exports, "__esModule", ({ value: true }));
5864const messages_1 = __webpack_require__(21);
5865/**
5866 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
5867 */
5868var WorkspaceFoldersRequest;
5869(function (WorkspaceFoldersRequest) {
5870 WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
5871})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
5872/**
5873 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
5874 * folder configuration changes.
5875 */
5876var DidChangeWorkspaceFoldersNotification;
5877(function (DidChangeWorkspaceFoldersNotification) {
5878 DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
5879})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
5880
5881
5882/***/ }),
5883/* 25 */
5884/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5885
5886"use strict";
5887/* --------------------------------------------------------------------------------------------
5888 * Copyright (c) Microsoft Corporation. All rights reserved.
5889 * Licensed under the MIT License. See License.txt in the project root for license information.
5890 * ------------------------------------------------------------------------------------------ */
5891
5892Object.defineProperty(exports, "__esModule", ({ value: true }));
5893const messages_1 = __webpack_require__(21);
5894/**
5895 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
5896 * configuration setting.
5897 *
5898 * This pull model replaces the old push model were the client signaled configuration change via an
5899 * event. If the server still needs to react to configuration changes (since the server caches the
5900 * result of `workspace/configuration` requests) the server should register for an empty configuration
5901 * change event and empty the cache if such an event is received.
5902 */
5903var ConfigurationRequest;
5904(function (ConfigurationRequest) {
5905 ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
5906})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
5907
5908
5909/***/ }),
5910/* 26 */
5911/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5912
5913"use strict";
5914/* --------------------------------------------------------------------------------------------
5915 * Copyright (c) Microsoft Corporation. All rights reserved.
5916 * Licensed under the MIT License. See License.txt in the project root for license information.
5917 * ------------------------------------------------------------------------------------------ */
5918
5919Object.defineProperty(exports, "__esModule", ({ value: true }));
5920const vscode_jsonrpc_1 = __webpack_require__(4);
5921const messages_1 = __webpack_require__(21);
5922/**
5923 * A request to list all color symbols found in a given text document. The request's
5924 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
5925 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
5926 * that resolves to such.
5927 */
5928var DocumentColorRequest;
5929(function (DocumentColorRequest) {
5930 DocumentColorRequest.method = 'textDocument/documentColor';
5931 DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
5932 /** @deprecated Use DocumentColorRequest.type */
5933 DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5934})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
5935/**
5936 * A request to list all presentation for a color. The request's
5937 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
5938 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
5939 * that resolves to such.
5940 */
5941var ColorPresentationRequest;
5942(function (ColorPresentationRequest) {
5943 ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
5944})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
5945
5946
5947/***/ }),
5948/* 27 */
5949/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5950
5951"use strict";
5952
5953/*---------------------------------------------------------------------------------------------
5954 * Copyright (c) Microsoft Corporation. All rights reserved.
5955 * Licensed under the MIT License. See License.txt in the project root for license information.
5956 *--------------------------------------------------------------------------------------------*/
5957Object.defineProperty(exports, "__esModule", ({ value: true }));
5958const vscode_jsonrpc_1 = __webpack_require__(4);
5959const messages_1 = __webpack_require__(21);
5960/**
5961 * Enum of known range kinds
5962 */
5963var FoldingRangeKind;
5964(function (FoldingRangeKind) {
5965 /**
5966 * Folding range for a comment
5967 */
5968 FoldingRangeKind["Comment"] = "comment";
5969 /**
5970 * Folding range for a imports or includes
5971 */
5972 FoldingRangeKind["Imports"] = "imports";
5973 /**
5974 * Folding range for a region (e.g. `#region`)
5975 */
5976 FoldingRangeKind["Region"] = "region";
5977})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
5978/**
5979 * A request to provide folding ranges in a document. The request's
5980 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
5981 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
5982 * that resolves to such.
5983 */
5984var FoldingRangeRequest;
5985(function (FoldingRangeRequest) {
5986 FoldingRangeRequest.method = 'textDocument/foldingRange';
5987 FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
5988 /** @deprecated Use FoldingRangeRequest.type */
5989 FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
5990})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
5991
5992
5993/***/ }),
5994/* 28 */
5995/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5996
5997"use strict";
5998/* --------------------------------------------------------------------------------------------
5999 * Copyright (c) Microsoft Corporation. All rights reserved.
6000 * Licensed under the MIT License. See License.txt in the project root for license information.
6001 * ------------------------------------------------------------------------------------------ */
6002
6003Object.defineProperty(exports, "__esModule", ({ value: true }));
6004const vscode_jsonrpc_1 = __webpack_require__(4);
6005const messages_1 = __webpack_require__(21);
6006// @ts-ignore: to avoid inlining LocatioLink as dynamic import
6007let __noDynamicImport;
6008/**
6009 * A request to resolve the type definition locations of a symbol at a given text
6010 * document position. The request's parameter is of type [TextDocumentPositioParams]
6011 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
6012 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
6013 * to such.
6014 */
6015var DeclarationRequest;
6016(function (DeclarationRequest) {
6017 DeclarationRequest.method = 'textDocument/declaration';
6018 DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
6019 /** @deprecated Use DeclarationRequest.type */
6020 DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6021})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
6022
6023
6024/***/ }),
6025/* 29 */
6026/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6027
6028"use strict";
6029
6030/*---------------------------------------------------------------------------------------------
6031 * Copyright (c) Microsoft Corporation. All rights reserved.
6032 * Licensed under the MIT License. See License.txt in the project root for license information.
6033 *--------------------------------------------------------------------------------------------*/
6034Object.defineProperty(exports, "__esModule", ({ value: true }));
6035const vscode_jsonrpc_1 = __webpack_require__(4);
6036const messages_1 = __webpack_require__(21);
6037/**
6038 * A request to provide selection ranges in a document. The request's
6039 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
6040 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
6041 * that resolves to such.
6042 */
6043var SelectionRangeRequest;
6044(function (SelectionRangeRequest) {
6045 SelectionRangeRequest.method = 'textDocument/selectionRange';
6046 SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
6047 /** @deprecated Use SelectionRangeRequest.type */
6048 SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
6049})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
6050
6051
6052/***/ }),
6053/* 30 */
6054/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6055
6056"use strict";
6057/* --------------------------------------------------------------------------------------------
6058 * Copyright (c) Microsoft Corporation. All rights reserved.
6059 * Licensed under the MIT License. See License.txt in the project root for license information.
6060 * ------------------------------------------------------------------------------------------ */
6061
6062Object.defineProperty(exports, "__esModule", ({ value: true }));
6063const vscode_jsonrpc_1 = __webpack_require__(4);
6064const messages_1 = __webpack_require__(21);
6065var WorkDoneProgress;
6066(function (WorkDoneProgress) {
6067 WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
6068})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
6069/**
6070 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
6071 * reporting from the server.
6072 */
6073var WorkDoneProgressCreateRequest;
6074(function (WorkDoneProgressCreateRequest) {
6075 WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
6076})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
6077/**
6078 * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
6079 * initiated on the server side.
6080 */
6081var WorkDoneProgressCancelNotification;
6082(function (WorkDoneProgressCancelNotification) {
6083 WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
6084})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
6085
6086
6087/***/ }),
6088/* 31 */
6089/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6090
6091"use strict";
6092/* --------------------------------------------------------------------------------------------
6093 * Copyright (c) TypeFox and others. All rights reserved.
6094 * Licensed under the MIT License. See License.txt in the project root for license information.
6095 * ------------------------------------------------------------------------------------------ */
6096
6097Object.defineProperty(exports, "__esModule", ({ value: true }));
6098const messages_1 = __webpack_require__(21);
6099/**
6100 * A request to result a `CallHierarchyItem` in a document at a given position.
6101 * Can be used as an input to a incoming or outgoing call hierarchy.
6102 *
6103 * @since 3.16.0 - Proposed state
6104 */
6105var CallHierarchyPrepareRequest;
6106(function (CallHierarchyPrepareRequest) {
6107 CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
6108 CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
6109})(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
6110/**
6111 * A request to resolve the incoming calls for a given `CallHierarchyItem`.
6112 *
6113 * @since 3.16.0 - Proposed state
6114 */
6115var CallHierarchyIncomingCallsRequest;
6116(function (CallHierarchyIncomingCallsRequest) {
6117 CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
6118 CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
6119})(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
6120/**
6121 * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
6122 *
6123 * @since 3.16.0 - Proposed state
6124 */
6125var CallHierarchyOutgoingCallsRequest;
6126(function (CallHierarchyOutgoingCallsRequest) {
6127 CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
6128 CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
6129})(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
6130
6131
6132/***/ }),
6133/* 32 */
6134/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6135
6136"use strict";
6137/* --------------------------------------------------------------------------------------------
6138 * Copyright (c) Microsoft Corporation. All rights reserved.
6139 * Licensed under the MIT License. See License.txt in the project root for license information.
6140 * ------------------------------------------------------------------------------------------ */
6141
6142Object.defineProperty(exports, "__esModule", ({ value: true }));
6143const messages_1 = __webpack_require__(21);
6144/**
6145 * A set of predefined token types. This set is not fixed
6146 * an clients can specify additional token types via the
6147 * corresponding client capabilities.
6148 *
6149 * @since 3.16.0 - Proposed state
6150 */
6151var SemanticTokenTypes;
6152(function (SemanticTokenTypes) {
6153 SemanticTokenTypes["comment"] = "comment";
6154 SemanticTokenTypes["keyword"] = "keyword";
6155 SemanticTokenTypes["string"] = "string";
6156 SemanticTokenTypes["number"] = "number";
6157 SemanticTokenTypes["regexp"] = "regexp";
6158 SemanticTokenTypes["operator"] = "operator";
6159 SemanticTokenTypes["namespace"] = "namespace";
6160 SemanticTokenTypes["type"] = "type";
6161 SemanticTokenTypes["struct"] = "struct";
6162 SemanticTokenTypes["class"] = "class";
6163 SemanticTokenTypes["interface"] = "interface";
6164 SemanticTokenTypes["enum"] = "enum";
6165 SemanticTokenTypes["typeParameter"] = "typeParameter";
6166 SemanticTokenTypes["function"] = "function";
6167 SemanticTokenTypes["member"] = "member";
6168 SemanticTokenTypes["property"] = "property";
6169 SemanticTokenTypes["macro"] = "macro";
6170 SemanticTokenTypes["variable"] = "variable";
6171 SemanticTokenTypes["parameter"] = "parameter";
6172 SemanticTokenTypes["label"] = "label";
6173})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
6174/**
6175 * A set of predefined token modifiers. This set is not fixed
6176 * an clients can specify additional token types via the
6177 * corresponding client capabilities.
6178 *
6179 * @since 3.16.0 - Proposed state
6180 */
6181var SemanticTokenModifiers;
6182(function (SemanticTokenModifiers) {
6183 SemanticTokenModifiers["documentation"] = "documentation";
6184 SemanticTokenModifiers["declaration"] = "declaration";
6185 SemanticTokenModifiers["definition"] = "definition";
6186 SemanticTokenModifiers["reference"] = "reference";
6187 SemanticTokenModifiers["static"] = "static";
6188 SemanticTokenModifiers["abstract"] = "abstract";
6189 SemanticTokenModifiers["deprecated"] = "deprecated";
6190 SemanticTokenModifiers["async"] = "async";
6191 SemanticTokenModifiers["volatile"] = "volatile";
6192 SemanticTokenModifiers["readonly"] = "readonly";
6193})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
6194/**
6195 * @since 3.16.0 - Proposed state
6196 */
6197var SemanticTokens;
6198(function (SemanticTokens) {
6199 function is(value) {
6200 const candidate = value;
6201 return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
6202 Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
6203 }
6204 SemanticTokens.is = is;
6205})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
6206/**
6207 * @since 3.16.0 - Proposed state
6208 */
6209var SemanticTokensRequest;
6210(function (SemanticTokensRequest) {
6211 SemanticTokensRequest.method = 'textDocument/semanticTokens';
6212 SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
6213})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
6214/**
6215 * @since 3.16.0 - Proposed state
6216 */
6217var SemanticTokensEditsRequest;
6218(function (SemanticTokensEditsRequest) {
6219 SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
6220 SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
6221})(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
6222/**
6223 * @since 3.16.0 - Proposed state
6224 */
6225var SemanticTokensRangeRequest;
6226(function (SemanticTokensRangeRequest) {
6227 SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
6228 SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
6229})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
6230
6231
6232/***/ }),
6233/* 33 */
6234/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6235
6236"use strict";
6237/* --------------------------------------------------------------------------------------------
6238 * Copyright (c) Microsoft Corporation. All rights reserved.
6239 * Licensed under the MIT License. See License.txt in the project root for license information.
6240 * ------------------------------------------------------------------------------------------ */
6241
6242Object.defineProperty(exports, "__esModule", ({ value: true }));
6243const vscode_languageserver_protocol_1 = __webpack_require__(3);
6244const Is = __webpack_require__(34);
6245exports.ConfigurationFeature = (Base) => {
6246 return class extends Base {
6247 getConfiguration(arg) {
6248 if (!arg) {
6249 return this._getConfiguration({});
6250 }
6251 else if (Is.string(arg)) {
6252 return this._getConfiguration({ section: arg });
6253 }
6254 else {
6255 return this._getConfiguration(arg);
6256 }
6257 }
6258 _getConfiguration(arg) {
6259 let params = {
6260 items: Array.isArray(arg) ? arg : [arg]
6261 };
6262 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
6263 return Array.isArray(arg) ? result : result[0];
6264 });
6265 }
6266 };
6267};
6268//# sourceMappingURL=configuration.js.map
6269
6270/***/ }),
6271/* 34 */
6272/***/ ((__unused_webpack_module, exports) => {
6273
6274"use strict";
6275/* --------------------------------------------------------------------------------------------
6276 * Copyright (c) Microsoft Corporation. All rights reserved.
6277 * Licensed under the MIT License. See License.txt in the project root for license information.
6278 * ------------------------------------------------------------------------------------------ */
6279
6280Object.defineProperty(exports, "__esModule", ({ value: true }));
6281function boolean(value) {
6282 return value === true || value === false;
6283}
6284exports.boolean = boolean;
6285function string(value) {
6286 return typeof value === 'string' || value instanceof String;
6287}
6288exports.string = string;
6289function number(value) {
6290 return typeof value === 'number' || value instanceof Number;
6291}
6292exports.number = number;
6293function error(value) {
6294 return value instanceof Error;
6295}
6296exports.error = error;
6297function func(value) {
6298 return typeof value === 'function';
6299}
6300exports.func = func;
6301function array(value) {
6302 return Array.isArray(value);
6303}
6304exports.array = array;
6305function stringArray(value) {
6306 return array(value) && value.every(elem => string(elem));
6307}
6308exports.stringArray = stringArray;
6309function typedArray(value, check) {
6310 return Array.isArray(value) && value.every(check);
6311}
6312exports.typedArray = typedArray;
6313function thenable(value) {
6314 return value && func(value.then);
6315}
6316exports.thenable = thenable;
6317//# sourceMappingURL=is.js.map
6318
6319/***/ }),
6320/* 35 */
6321/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6322
6323"use strict";
6324/* --------------------------------------------------------------------------------------------
6325 * Copyright (c) Microsoft Corporation. All rights reserved.
6326 * Licensed under the MIT License. See License.txt in the project root for license information.
6327 * ------------------------------------------------------------------------------------------ */
6328
6329Object.defineProperty(exports, "__esModule", ({ value: true }));
6330const vscode_languageserver_protocol_1 = __webpack_require__(3);
6331exports.WorkspaceFoldersFeature = (Base) => {
6332 return class extends Base {
6333 initialize(capabilities) {
6334 let workspaceCapabilities = capabilities.workspace;
6335 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
6336 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
6337 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
6338 this._onDidChangeWorkspaceFolders.fire(params.event);
6339 });
6340 }
6341 }
6342 getWorkspaceFolders() {
6343 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
6344 }
6345 get onDidChangeWorkspaceFolders() {
6346 if (!this._onDidChangeWorkspaceFolders) {
6347 throw new Error('Client doesn\'t support sending workspace folder change events.');
6348 }
6349 if (!this._unregistration) {
6350 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
6351 }
6352 return this._onDidChangeWorkspaceFolders.event;
6353 }
6354 };
6355};
6356//# sourceMappingURL=workspaceFolders.js.map
6357
6358/***/ }),
6359/* 36 */
6360/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6361
6362"use strict";
6363/* --------------------------------------------------------------------------------------------
6364 * Copyright (c) Microsoft Corporation. All rights reserved.
6365 * Licensed under the MIT License. See License.txt in the project root for license information.
6366 * ------------------------------------------------------------------------------------------ */
6367
6368Object.defineProperty(exports, "__esModule", ({ value: true }));
6369const vscode_languageserver_protocol_1 = __webpack_require__(3);
6370const uuid_1 = __webpack_require__(37);
6371class WorkDoneProgressImpl {
6372 constructor(_connection, _token) {
6373 this._connection = _connection;
6374 this._token = _token;
6375 WorkDoneProgressImpl.Instances.set(this._token, this);
6376 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
6377 }
6378 get token() {
6379 return this._source.token;
6380 }
6381 begin(title, percentage, message, cancellable) {
6382 let param = {
6383 kind: 'begin',
6384 title,
6385 percentage,
6386 message,
6387 cancellable
6388 };
6389 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
6390 }
6391 report(arg0, arg1) {
6392 let param = {
6393 kind: 'report'
6394 };
6395 if (typeof arg0 === 'number') {
6396 param.percentage = arg0;
6397 if (arg1 !== undefined) {
6398 param.message = arg1;
6399 }
6400 }
6401 else {
6402 param.message = arg0;
6403 }
6404 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
6405 }
6406 done() {
6407 WorkDoneProgressImpl.Instances.delete(this._token);
6408 this._source.dispose();
6409 this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });
6410 }
6411 cancel() {
6412 this._source.cancel();
6413 }
6414}
6415WorkDoneProgressImpl.Instances = new Map();
6416class NullProgress {
6417 constructor() {
6418 this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
6419 }
6420 get token() {
6421 return this._source.token;
6422 }
6423 begin() {
6424 }
6425 report() {
6426 }
6427 done() {
6428 }
6429}
6430function attachWorkDone(connection, params) {
6431 if (params === undefined || params.workDoneToken === undefined) {
6432 return new NullProgress();
6433 }
6434 const token = params.workDoneToken;
6435 delete params.workDoneToken;
6436 return new WorkDoneProgressImpl(connection, token);
6437}
6438exports.attachWorkDone = attachWorkDone;
6439exports.ProgressFeature = (Base) => {
6440 return class extends Base {
6441 initialize(capabilities) {
6442 var _a;
6443 if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) {
6444 this._progressSupported = true;
6445 this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
6446 let progress = WorkDoneProgressImpl.Instances.get(params.token);
6447 if (progress !== undefined) {
6448 progress.cancel();
6449 }
6450 });
6451 }
6452 }
6453 attachWorkDoneProgress(token) {
6454 if (token === undefined) {
6455 return new NullProgress();
6456 }
6457 else {
6458 return new WorkDoneProgressImpl(this.connection, token);
6459 }
6460 }
6461 createWorkDoneProgress() {
6462 if (this._progressSupported) {
6463 const token = uuid_1.generateUuid();
6464 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
6465 const result = new WorkDoneProgressImpl(this.connection, token);
6466 return result;
6467 });
6468 }
6469 else {
6470 return Promise.resolve(new NullProgress());
6471 }
6472 }
6473 };
6474};
6475var ResultProgress;
6476(function (ResultProgress) {
6477 ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();
6478})(ResultProgress || (ResultProgress = {}));
6479class ResultProgressImpl {
6480 constructor(_connection, _token) {
6481 this._connection = _connection;
6482 this._token = _token;
6483 }
6484 report(data) {
6485 this._connection.sendProgress(ResultProgress.type, this._token, data);
6486 }
6487}
6488function attachPartialResult(connection, params) {
6489 if (params === undefined || params.partialResultToken === undefined) {
6490 return undefined;
6491 }
6492 const token = params.partialResultToken;
6493 delete params.partialResultToken;
6494 return new ResultProgressImpl(connection, token);
6495}
6496exports.attachPartialResult = attachPartialResult;
6497//# sourceMappingURL=progress.js.map
6498
6499/***/ }),
6500/* 37 */
6501/***/ ((__unused_webpack_module, exports) => {
6502
6503"use strict";
6504/*---------------------------------------------------------------------------------------------
6505 * Copyright (c) Microsoft Corporation. All rights reserved.
6506 * Licensed under the MIT License. See License.txt in the project root for license information.
6507 *--------------------------------------------------------------------------------------------*/
6508
6509Object.defineProperty(exports, "__esModule", ({ value: true }));
6510class ValueUUID {
6511 constructor(_value) {
6512 this._value = _value;
6513 // empty
6514 }
6515 asHex() {
6516 return this._value;
6517 }
6518 equals(other) {
6519 return this.asHex() === other.asHex();
6520 }
6521}
6522class V4UUID extends ValueUUID {
6523 constructor() {
6524 super([
6525 V4UUID._randomHex(),
6526 V4UUID._randomHex(),
6527 V4UUID._randomHex(),
6528 V4UUID._randomHex(),
6529 V4UUID._randomHex(),
6530 V4UUID._randomHex(),
6531 V4UUID._randomHex(),
6532 V4UUID._randomHex(),
6533 '-',
6534 V4UUID._randomHex(),
6535 V4UUID._randomHex(),
6536 V4UUID._randomHex(),
6537 V4UUID._randomHex(),
6538 '-',
6539 '4',
6540 V4UUID._randomHex(),
6541 V4UUID._randomHex(),
6542 V4UUID._randomHex(),
6543 '-',
6544 V4UUID._oneOf(V4UUID._timeHighBits),
6545 V4UUID._randomHex(),
6546 V4UUID._randomHex(),
6547 V4UUID._randomHex(),
6548 '-',
6549 V4UUID._randomHex(),
6550 V4UUID._randomHex(),
6551 V4UUID._randomHex(),
6552 V4UUID._randomHex(),
6553 V4UUID._randomHex(),
6554 V4UUID._randomHex(),
6555 V4UUID._randomHex(),
6556 V4UUID._randomHex(),
6557 V4UUID._randomHex(),
6558 V4UUID._randomHex(),
6559 V4UUID._randomHex(),
6560 V4UUID._randomHex(),
6561 ].join(''));
6562 }
6563 static _oneOf(array) {
6564 return array[Math.floor(array.length * Math.random())];
6565 }
6566 static _randomHex() {
6567 return V4UUID._oneOf(V4UUID._chars);
6568 }
6569}
6570V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
6571V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
6572/**
6573 * An empty UUID that contains only zeros.
6574 */
6575exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
6576function v4() {
6577 return new V4UUID();
6578}
6579exports.v4 = v4;
6580const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
6581function isUUID(value) {
6582 return _UUIDPattern.test(value);
6583}
6584exports.isUUID = isUUID;
6585/**
6586 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
6587 * @param value A uuid string.
6588 */
6589function parse(value) {
6590 if (!isUUID(value)) {
6591 throw new Error('invalid uuid');
6592 }
6593 return new ValueUUID(value);
6594}
6595exports.parse = parse;
6596function generateUuid() {
6597 return v4().asHex();
6598}
6599exports.generateUuid = generateUuid;
6600//# sourceMappingURL=uuid.js.map
6601
6602/***/ }),
6603/* 38 */
6604/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6605
6606"use strict";
6607/* --------------------------------------------------------------------------------------------
6608 * Copyright (c) Microsoft Corporation. All rights reserved.
6609 * Licensed under the MIT License. See License.txt in the project root for license information.
6610 * ------------------------------------------------------------------------------------------ */
6611
6612Object.defineProperty(exports, "__esModule", ({ value: true }));
6613const url = __webpack_require__(39);
6614const path = __webpack_require__(13);
6615const fs = __webpack_require__(40);
6616const child_process_1 = __webpack_require__(41);
6617/**
6618 * @deprecated Use the `vscode-uri` npm module which provides a more
6619 * complete implementation of handling VS Code URIs.
6620 */
6621function uriToFilePath(uri) {
6622 let parsed = url.parse(uri);
6623 if (parsed.protocol !== 'file:' || !parsed.path) {
6624 return undefined;
6625 }
6626 let segments = parsed.path.split('/');
6627 for (var i = 0, len = segments.length; i < len; i++) {
6628 segments[i] = decodeURIComponent(segments[i]);
6629 }
6630 if (process.platform === 'win32' && segments.length > 1) {
6631 let first = segments[0];
6632 let second = segments[1];
6633 // Do we have a drive letter and we started with a / which is the
6634 // case if the first segement is empty (see split above)
6635 if (first.length === 0 && second.length > 1 && second[1] === ':') {
6636 // Remove first slash
6637 segments.shift();
6638 }
6639 }
6640 return path.normalize(segments.join('/'));
6641}
6642exports.uriToFilePath = uriToFilePath;
6643function isWindows() {
6644 return process.platform === 'win32';
6645}
6646function resolve(moduleName, nodePath, cwd, tracer) {
6647 const nodePathKey = 'NODE_PATH';
6648 const app = [
6649 'var p = process;',
6650 'p.on(\'message\',function(m){',
6651 'if(m.c===\'e\'){',
6652 'p.exit(0);',
6653 '}',
6654 'else if(m.c===\'rs\'){',
6655 'try{',
6656 'var r=require.resolve(m.a);',
6657 'p.send({c:\'r\',s:true,r:r});',
6658 '}',
6659 'catch(err){',
6660 'p.send({c:\'r\',s:false});',
6661 '}',
6662 '}',
6663 '});'
6664 ].join('');
6665 return new Promise((resolve, reject) => {
6666 let env = process.env;
6667 let newEnv = Object.create(null);
6668 Object.keys(env).forEach(key => newEnv[key] = env[key]);
6669 if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {
6670 if (newEnv[nodePathKey]) {
6671 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
6672 }
6673 else {
6674 newEnv[nodePathKey] = nodePath;
6675 }
6676 if (tracer) {
6677 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
6678 }
6679 }
6680 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
6681 try {
6682 let cp = child_process_1.fork('', [], {
6683 cwd: cwd,
6684 env: newEnv,
6685 execArgv: ['-e', app]
6686 });
6687 if (cp.pid === void 0) {
6688 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
6689 return;
6690 }
6691 cp.on('error', (error) => {
6692 reject(error);
6693 });
6694 cp.on('message', (message) => {
6695 if (message.c === 'r') {
6696 cp.send({ c: 'e' });
6697 if (message.s) {
6698 resolve(message.r);
6699 }
6700 else {
6701 reject(new Error(`Failed to resolve module: ${moduleName}`));
6702 }
6703 }
6704 });
6705 let message = {
6706 c: 'rs',
6707 a: moduleName
6708 };
6709 cp.send(message);
6710 }
6711 catch (error) {
6712 reject(error);
6713 }
6714 });
6715}
6716exports.resolve = resolve;
6717/**
6718 * Resolve the global npm package path.
6719 * @deprecated Since this depends on the used package manager and their version the best is that servers
6720 * implement this themselves since they know best what kind of package managers to support.
6721 * @param tracer the tracer to use
6722 */
6723function resolveGlobalNodePath(tracer) {
6724 let npmCommand = 'npm';
6725 const env = Object.create(null);
6726 Object.keys(process.env).forEach(key => env[key] = process.env[key]);
6727 env['NO_UPDATE_NOTIFIER'] = 'true';
6728 const options = {
6729 encoding: 'utf8',
6730 env
6731 };
6732 if (isWindows()) {
6733 npmCommand = 'npm.cmd';
6734 options.shell = true;
6735 }
6736 let handler = () => { };
6737 try {
6738 process.on('SIGPIPE', handler);
6739 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
6740 if (!stdout) {
6741 if (tracer) {
6742 tracer(`'npm config get prefix' didn't return a value.`);
6743 }
6744 return undefined;
6745 }
6746 let prefix = stdout.trim();
6747 if (tracer) {
6748 tracer(`'npm config get prefix' value is: ${prefix}`);
6749 }
6750 if (prefix.length > 0) {
6751 if (isWindows()) {
6752 return path.join(prefix, 'node_modules');
6753 }
6754 else {
6755 return path.join(prefix, 'lib', 'node_modules');
6756 }
6757 }
6758 return undefined;
6759 }
6760 catch (err) {
6761 return undefined;
6762 }
6763 finally {
6764 process.removeListener('SIGPIPE', handler);
6765 }
6766}
6767exports.resolveGlobalNodePath = resolveGlobalNodePath;
6768/*
6769 * Resolve the global yarn pakage path.
6770 * @deprecated Since this depends on the used package manager and their version the best is that servers
6771 * implement this themselves since they know best what kind of package managers to support.
6772 * @param tracer the tracer to use
6773 */
6774function resolveGlobalYarnPath(tracer) {
6775 let yarnCommand = 'yarn';
6776 let options = {
6777 encoding: 'utf8'
6778 };
6779 if (isWindows()) {
6780 yarnCommand = 'yarn.cmd';
6781 options.shell = true;
6782 }
6783 let handler = () => { };
6784 try {
6785 process.on('SIGPIPE', handler);
6786 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
6787 let stdout = results.stdout;
6788 if (!stdout) {
6789 if (tracer) {
6790 tracer(`'yarn global dir' didn't return a value.`);
6791 if (results.stderr) {
6792 tracer(results.stderr);
6793 }
6794 }
6795 return undefined;
6796 }
6797 let lines = stdout.trim().split(/\r?\n/);
6798 for (let line of lines) {
6799 try {
6800 let yarn = JSON.parse(line);
6801 if (yarn.type === 'log') {
6802 return path.join(yarn.data, 'node_modules');
6803 }
6804 }
6805 catch (e) {
6806 // Do nothing. Ignore the line
6807 }
6808 }
6809 return undefined;
6810 }
6811 catch (err) {
6812 return undefined;
6813 }
6814 finally {
6815 process.removeListener('SIGPIPE', handler);
6816 }
6817}
6818exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
6819var FileSystem;
6820(function (FileSystem) {
6821 let _isCaseSensitive = undefined;
6822 function isCaseSensitive() {
6823 if (_isCaseSensitive !== void 0) {
6824 return _isCaseSensitive;
6825 }
6826 if (process.platform === 'win32') {
6827 _isCaseSensitive = false;
6828 }
6829 else {
6830 // convert current file name to upper case / lower case and check if file exists
6831 // (guards against cases when name is already all uppercase or lowercase)
6832 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
6833 }
6834 return _isCaseSensitive;
6835 }
6836 FileSystem.isCaseSensitive = isCaseSensitive;
6837 function isParent(parent, child) {
6838 if (isCaseSensitive()) {
6839 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
6840 }
6841 else {
6842 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
6843 }
6844 }
6845 FileSystem.isParent = isParent;
6846})(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
6847function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
6848 if (nodePath) {
6849 if (!path.isAbsolute(nodePath)) {
6850 nodePath = path.join(workspaceRoot, nodePath);
6851 }
6852 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
6853 if (FileSystem.isParent(nodePath, value)) {
6854 return value;
6855 }
6856 else {
6857 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
6858 }
6859 }).then(undefined, (_error) => {
6860 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6861 });
6862 }
6863 else {
6864 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6865 }
6866}
6867exports.resolveModulePath = resolveModulePath;
6868//# sourceMappingURL=files.js.map
6869
6870/***/ }),
6871/* 39 */
6872/***/ ((module) => {
6873
6874"use strict";
6875module.exports = require("url");;
6876
6877/***/ }),
6878/* 40 */
6879/***/ ((module) => {
6880
6881"use strict";
6882module.exports = require("fs");;
6883
6884/***/ }),
6885/* 41 */
6886/***/ ((module) => {
6887
6888"use strict";
6889module.exports = require("child_process");;
6890
6891/***/ }),
6892/* 42 */
6893/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6894
6895"use strict";
6896/* --------------------------------------------------------------------------------------------
6897 * Copyright (c) Microsoft Corporation. All rights reserved.
6898 * Licensed under the MIT License. See License.txt in the project root for license information.
6899 * ------------------------------------------------------------------------------------------ */
6900
6901Object.defineProperty(exports, "__esModule", ({ value: true }));
6902const vscode_languageserver_protocol_1 = __webpack_require__(3);
6903exports.CallHierarchyFeature = (Base) => {
6904 return class extends Base {
6905 get callHierarchy() {
6906 return {
6907 onPrepare: (handler) => {
6908 this.connection.onRequest(vscode_languageserver_protocol_1.Proposed.CallHierarchyPrepareRequest.type, (params, cancel) => {
6909 return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
6910 });
6911 },
6912 onIncomingCalls: (handler) => {
6913 const type = vscode_languageserver_protocol_1.Proposed.CallHierarchyIncomingCallsRequest.type;
6914 this.connection.onRequest(type, (params, cancel) => {
6915 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6916 });
6917 },
6918 onOutgoingCalls: (handler) => {
6919 const type = vscode_languageserver_protocol_1.Proposed.CallHierarchyOutgoingCallsRequest.type;
6920 this.connection.onRequest(type, (params, cancel) => {
6921 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6922 });
6923 }
6924 };
6925 }
6926 };
6927};
6928//# sourceMappingURL=callHierarchy.proposed.js.map
6929
6930/***/ }),
6931/* 43 */
6932/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6933
6934"use strict";
6935/* --------------------------------------------------------------------------------------------
6936 * Copyright (c) Microsoft Corporation. All rights reserved.
6937 * Licensed under the MIT License. See License.txt in the project root for license information.
6938 * ------------------------------------------------------------------------------------------ */
6939
6940Object.defineProperty(exports, "__esModule", ({ value: true }));
6941const vscode_languageserver_protocol_1 = __webpack_require__(3);
6942exports.SemanticTokensFeature = (Base) => {
6943 return class extends Base {
6944 get semanticTokens() {
6945 return {
6946 on: (handler) => {
6947 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRequest.type;
6948 this.connection.onRequest(type, (params, cancel) => {
6949 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6950 });
6951 },
6952 onEdits: (handler) => {
6953 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensEditsRequest.type;
6954 this.connection.onRequest(type, (params, cancel) => {
6955 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6956 });
6957 },
6958 onRange: (handler) => {
6959 const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRangeRequest.type;
6960 this.connection.onRequest(type, (params, cancel) => {
6961 return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
6962 });
6963 }
6964 };
6965 }
6966 };
6967};
6968class SemanticTokensBuilder {
6969 constructor() {
6970 this._prevData = undefined;
6971 this.initialize();
6972 }
6973 initialize() {
6974 this._id = Date.now();
6975 this._prevLine = 0;
6976 this._prevChar = 0;
6977 this._data = [];
6978 this._dataLen = 0;
6979 }
6980 push(line, char, length, tokenType, tokenModifiers) {
6981 let pushLine = line;
6982 let pushChar = char;
6983 if (this._dataLen > 0) {
6984 pushLine -= this._prevLine;
6985 if (pushLine === 0) {
6986 pushChar -= this._prevChar;
6987 }
6988 }
6989 this._data[this._dataLen++] = pushLine;
6990 this._data[this._dataLen++] = pushChar;
6991 this._data[this._dataLen++] = length;
6992 this._data[this._dataLen++] = tokenType;
6993 this._data[this._dataLen++] = tokenModifiers;
6994 this._prevLine = line;
6995 this._prevChar = char;
6996 }
6997 get id() {
6998 return this._id.toString();
6999 }
7000 previousResult(id) {
7001 if (this.id === id) {
7002 this._prevData = this._data;
7003 }
7004 this.initialize();
7005 }
7006 build() {
7007 this._prevData = undefined;
7008 return {
7009 resultId: this.id,
7010 data: this._data
7011 };
7012 }
7013 canBuildEdits() {
7014 return this._prevData !== undefined;
7015 }
7016 buildEdits() {
7017 if (this._prevData !== undefined) {
7018 const prevDataLength = this._prevData.length;
7019 const dataLength = this._data.length;
7020 let startIndex = 0;
7021 while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) {
7022 startIndex++;
7023 }
7024 if (startIndex < dataLength && startIndex < prevDataLength) {
7025 // Find end index
7026 let endIndex = 0;
7027 while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) {
7028 endIndex++;
7029 }
7030 const newData = this._data.slice(startIndex, dataLength - endIndex);
7031 const result = {
7032 resultId: this.id,
7033 edits: [
7034 { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData }
7035 ]
7036 };
7037 return result;
7038 }
7039 else if (startIndex < dataLength) {
7040 return { resultId: this.id, edits: [
7041 { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) }
7042 ] };
7043 }
7044 else if (startIndex < prevDataLength) {
7045 return { resultId: this.id, edits: [
7046 { start: startIndex, deleteCount: prevDataLength - startIndex }
7047 ] };
7048 }
7049 else {
7050 return { resultId: this.id, edits: [] };
7051 }
7052 }
7053 else {
7054 return this.build();
7055 }
7056 }
7057}
7058exports.SemanticTokensBuilder = SemanticTokensBuilder;
7059//# sourceMappingURL=sematicTokens.proposed.js.map
7060
7061/***/ }),
7062/* 44 */
7063/***/ ((__unused_webpack_module, exports) => {
7064
7065"use strict";
7066
7067Object.defineProperty(exports, "__esModule", ({ value: true }));
7068exports.projectRootPatterns = exports.sortTexts = void 0;
7069exports.sortTexts = {
7070 one: "00001",
7071 two: "00002",
7072 three: "00003",
7073 four: "00004",
7074};
7075exports.projectRootPatterns = [".git", "autoload", "plugin"];
7076
7077
7078/***/ }),
7079/* 45 */,
7080/* 46 */
7081/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7082
7083"use strict";
7084
7085var __assign = (this && this.__assign) || function () {
7086 __assign = Object.assign || function(t) {
7087 for (var s, i = 1, n = arguments.length; i < n; i++) {
7088 s = arguments[i];
7089 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7090 t[p] = s[p];
7091 }
7092 return t;
7093 };
7094 return __assign.apply(this, arguments);
7095};
7096var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7097 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7098 return new (P || (P = Promise))(function (resolve, reject) {
7099 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7100 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7101 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7102 step((generator = generator.apply(thisArg, _arguments || [])).next());
7103 });
7104};
7105var __generator = (this && this.__generator) || function (thisArg, body) {
7106 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7107 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7108 function verb(n) { return function (v) { return step([n, v]); }; }
7109 function step(op) {
7110 if (f) throw new TypeError("Generator is already executing.");
7111 while (_) try {
7112 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;
7113 if (y = 0, t) op = [op[0] & 2, t.value];
7114 switch (op[0]) {
7115 case 0: case 1: t = op; break;
7116 case 4: _.label++; return { value: op[1], done: false };
7117 case 5: _.label++; y = op[1]; op = [0]; continue;
7118 case 7: op = _.ops.pop(); _.trys.pop(); continue;
7119 default:
7120 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7121 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7122 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7123 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7124 if (t[2]) _.ops.pop();
7125 _.trys.pop(); continue;
7126 }
7127 op = body.call(thisArg, _);
7128 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7129 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7130 }
7131};
7132var __spreadArrays = (this && this.__spreadArrays) || function () {
7133 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7134 for (var r = Array(s), k = 0, i = 0; i < il; i++)
7135 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7136 r[k] = a[j];
7137 return r;
7138};
7139var __importDefault = (this && this.__importDefault) || function (mod) {
7140 return (mod && mod.__esModule) ? mod : { "default": mod };
7141};
7142Object.defineProperty(exports, "__esModule", ({ value: true }));
7143exports.getRealPath = exports.isSymbolLink = exports.removeSnippets = exports.handleParse = exports.getWordFromPosition = exports.markupSnippets = exports.findProjectRoot = exports.pcb = exports.executeFile = exports.isSomeMatchPattern = void 0;
7144var child_process_1 = __webpack_require__(41);
7145var findup_1 = __importDefault(__webpack_require__(47));
7146var fs_1 = __importDefault(__webpack_require__(40));
7147var path_1 = __importDefault(__webpack_require__(13));
7148var vscode_languageserver_1 = __webpack_require__(2);
7149var vimparser_1 = __webpack_require__(52);
7150var patterns_1 = __webpack_require__(53);
7151function isSomeMatchPattern(patterns, line) {
7152 return patterns.some(function (p) { return p.test(line); });
7153}
7154exports.isSomeMatchPattern = isSomeMatchPattern;
7155function executeFile(input, command, args, option) {
7156 return new Promise(function (resolve, reject) {
7157 var stdout = "";
7158 var stderr = "";
7159 var error;
7160 var isPassAsText = false;
7161 args = (args || []).map(function (arg) {
7162 if (/%text/.test(arg)) {
7163 isPassAsText = true;
7164 return arg.replace(/%text/g, input.toString());
7165 }
7166 return arg;
7167 });
7168 var cp = child_process_1.spawn(command, args, option);
7169 cp.stdout.on("data", function (data) {
7170 stdout += data;
7171 });
7172 cp.stderr.on("data", function (data) {
7173 stderr += data;
7174 });
7175 cp.on("error", function (err) {
7176 error = err;
7177 reject(error);
7178 });
7179 cp.on("close", function (code) {
7180 if (!error) {
7181 resolve({ code: code, stdout: stdout, stderr: stderr });
7182 }
7183 });
7184 // error will occur when cp get error
7185 if (!isPassAsText) {
7186 input.pipe(cp.stdin).on("error", function () { return; });
7187 }
7188 });
7189}
7190exports.executeFile = executeFile;
7191// cover cb type async function to promise
7192function pcb(cb) {
7193 return function () {
7194 var args = [];
7195 for (var _i = 0; _i < arguments.length; _i++) {
7196 args[_i] = arguments[_i];
7197 }
7198 return new Promise(function (resolve) {
7199 cb.apply(void 0, __spreadArrays(args, [function () {
7200 var params = [];
7201 for (var _i = 0; _i < arguments.length; _i++) {
7202 params[_i] = arguments[_i];
7203 }
7204 resolve(params);
7205 }]));
7206 });
7207 };
7208}
7209exports.pcb = pcb;
7210// find work dirname by root patterns
7211function findProjectRoot(filePath, rootPatterns) {
7212 return __awaiter(this, void 0, void 0, function () {
7213 var dirname, patterns, dirCandidate, _i, patterns_2, pattern, _a, err, dir;
7214 return __generator(this, function (_b) {
7215 switch (_b.label) {
7216 case 0:
7217 dirname = path_1.default.dirname(filePath);
7218 patterns = [].concat(rootPatterns);
7219 dirCandidate = "";
7220 _i = 0, patterns_2 = patterns;
7221 _b.label = 1;
7222 case 1:
7223 if (!(_i < patterns_2.length)) return [3 /*break*/, 4];
7224 pattern = patterns_2[_i];
7225 return [4 /*yield*/, pcb(findup_1.default)(dirname, pattern)];
7226 case 2:
7227 _a = _b.sent(), err = _a[0], dir = _a[1];
7228 if (!err && dir && dir !== "/" && dir.length > dirCandidate.length) {
7229 dirCandidate = dir;
7230 }
7231 _b.label = 3;
7232 case 3:
7233 _i++;
7234 return [3 /*break*/, 1];
7235 case 4:
7236 if (dirCandidate.length) {
7237 return [2 /*return*/, dirCandidate];
7238 }
7239 return [2 /*return*/, dirname];
7240 }
7241 });
7242 });
7243}
7244exports.findProjectRoot = findProjectRoot;
7245function markupSnippets(snippets) {
7246 return [
7247 "```vim",
7248 snippets.replace(/\$\{[0-9]+(:([^}]+))?\}/g, "$2"),
7249 "```",
7250 ].join("\n");
7251}
7252exports.markupSnippets = markupSnippets;
7253function getWordFromPosition(doc, position) {
7254 if (!doc) {
7255 return;
7256 }
7257 var character = doc.getText(vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(position.line, position.character), vscode_languageserver_1.Position.create(position.line, position.character + 1)));
7258 // not keyword position
7259 if (!character || !patterns_1.keywordPattern.test(character)) {
7260 return;
7261 }
7262 var currentLine = doc.getText(vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(position.line, 0), vscode_languageserver_1.Position.create(position.line + 1, 0)));
7263 // comment line
7264 if (patterns_1.commentPattern.test(currentLine)) {
7265 return;
7266 }
7267 var preSegment = currentLine.slice(0, position.character);
7268 var nextSegment = currentLine.slice(position.character);
7269 var wordLeft = preSegment.match(patterns_1.wordPrePattern);
7270 var wordRight = nextSegment.match(patterns_1.wordNextPattern);
7271 var word = "" + (wordLeft && wordLeft[1] || "") + (wordRight && wordRight[1] || "");
7272 return {
7273 word: word,
7274 left: wordLeft && wordLeft[1] || "",
7275 right: wordRight && wordRight[1] || "",
7276 wordLeft: wordLeft && wordLeft[1]
7277 ? preSegment.replace(new RegExp(wordLeft[1] + "$"), word)
7278 : "" + preSegment + word,
7279 wordRight: wordRight && wordRight[1]
7280 ? nextSegment.replace(new RegExp("^" + wordRight[1]), word)
7281 : "" + word + nextSegment,
7282 };
7283}
7284exports.getWordFromPosition = getWordFromPosition;
7285// parse vim buffer
7286function handleParse(textDoc) {
7287 return __awaiter(this, void 0, void 0, function () {
7288 var text, tokens, node;
7289 return __generator(this, function (_a) {
7290 text = textDoc instanceof Object ? textDoc.getText() : textDoc;
7291 tokens = new vimparser_1.StringReader(text.split(/\r\n|\r|\n/));
7292 try {
7293 node = new vimparser_1.VimLParser(true).parse(tokens);
7294 return [2 /*return*/, [node, ""]];
7295 }
7296 catch (error) {
7297 return [2 /*return*/, [null, error]];
7298 }
7299 return [2 /*return*/];
7300 });
7301 });
7302}
7303exports.handleParse = handleParse;
7304// remove snippets of completionItem
7305function removeSnippets(completionItems) {
7306 if (completionItems === void 0) { completionItems = []; }
7307 return completionItems.map(function (item) {
7308 if (item.insertTextFormat === vscode_languageserver_1.InsertTextFormat.Snippet) {
7309 return __assign(__assign({}, item), { insertText: item.label, insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText });
7310 }
7311 return item;
7312 });
7313}
7314exports.removeSnippets = removeSnippets;
7315var isSymbolLink = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
7316 return __generator(this, function (_a) {
7317 return [2 /*return*/, new Promise(function (resolve) {
7318 fs_1.default.lstat(filePath, function (err, stats) {
7319 resolve({
7320 err: err,
7321 stats: stats && stats.isSymbolicLink(),
7322 });
7323 });
7324 })];
7325 });
7326}); };
7327exports.isSymbolLink = isSymbolLink;
7328var getRealPath = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
7329 var _a, err, stats;
7330 return __generator(this, function (_b) {
7331 switch (_b.label) {
7332 case 0: return [4 /*yield*/, exports.isSymbolLink(filePath)];
7333 case 1:
7334 _a = _b.sent(), err = _a.err, stats = _a.stats;
7335 if (!err && stats) {
7336 return [2 /*return*/, new Promise(function (resolve) {
7337 fs_1.default.realpath(filePath, function (error, realPath) {
7338 if (error) {
7339 return resolve(filePath);
7340 }
7341 resolve(realPath);
7342 });
7343 })];
7344 }
7345 return [2 /*return*/, filePath];
7346 }
7347 });
7348}); };
7349exports.getRealPath = getRealPath;
7350
7351
7352/***/ }),
7353/* 47 */
7354/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7355
7356var fs = __webpack_require__(40),
7357 Path = __webpack_require__(13),
7358 util = __webpack_require__(48),
7359 colors = __webpack_require__(49),
7360 EE = __webpack_require__(51).EventEmitter,
7361 fsExists = fs.exists ? fs.exists : Path.exists,
7362 fsExistsSync = fs.existsSync ? fs.existsSync : Path.existsSync;
7363
7364module.exports = function(dir, iterator, options, callback){
7365 return FindUp(dir, iterator, options, callback);
7366};
7367
7368function FindUp(dir, iterator, options, callback){
7369 if (!(this instanceof FindUp)) {
7370 return new FindUp(dir, iterator, options, callback);
7371 }
7372 if(typeof options === 'function'){
7373 callback = options;
7374 options = {};
7375 }
7376 options = options || {};
7377
7378 EE.call(this);
7379 this.found = false;
7380 this.stopPlease = false;
7381 var self = this;
7382
7383 if(typeof iterator === 'string'){
7384 var file = iterator;
7385 iterator = function(dir, cb){
7386 return fsExists(Path.join(dir, file), cb);
7387 };
7388 }
7389
7390 if(callback) {
7391 this.on('found', function(dir){
7392 if(options.verbose) console.log(('found '+ dir ).green);
7393 callback(null, dir);
7394 self.stop();
7395 });
7396
7397 this.on('end', function(){
7398 if(options.verbose) console.log('end'.grey);
7399 if(!self.found) callback(new Error('not found'));
7400 });
7401
7402 this.on('error', function(err){
7403 if(options.verbose) console.log('error'.red, err);
7404 callback(err);
7405 });
7406 }
7407
7408 this._find(dir, iterator, options, callback);
7409}
7410util.inherits(FindUp, EE);
7411
7412FindUp.prototype._find = function(dir, iterator, options, callback){
7413 var self = this;
7414
7415 iterator(dir, function(exists){
7416 if(options.verbose) console.log(('traverse '+ dir).grey);
7417 if(exists) {
7418 self.found = true;
7419 self.emit('found', dir);
7420 }
7421
7422 var parentDir = Path.join(dir, '..');
7423 if (self.stopPlease) return self.emit('end');
7424 if (dir === parentDir) return self.emit('end');
7425 if(dir.indexOf('../../') !== -1 ) return self.emit('error', new Error(dir + ' is not correct.'));
7426 self._find(parentDir, iterator, options, callback);
7427 });
7428};
7429
7430FindUp.prototype.stop = function(){
7431 this.stopPlease = true;
7432};
7433
7434module.exports.FindUp = FindUp;
7435
7436module.exports.sync = function(dir, iteratorSync){
7437 if(typeof iteratorSync === 'string'){
7438 var file = iteratorSync;
7439 iteratorSync = function(dir){
7440 return fsExistsSync(Path.join(dir, file));
7441 };
7442 }
7443 var initialDir = dir;
7444 while(dir !== Path.join(dir, '..')){
7445 if(dir.indexOf('../../') !== -1 ) throw new Error(initialDir + ' is not correct.');
7446 if(iteratorSync(dir)) return dir;
7447 dir = Path.join(dir, '..');
7448 }
7449 throw new Error('not found');
7450};
7451
7452
7453/***/ }),
7454/* 48 */
7455/***/ ((module) => {
7456
7457"use strict";
7458module.exports = require("util");;
7459
7460/***/ }),
7461/* 49 */
7462/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
7463
7464/*
7465colors.js
7466
7467Copyright (c) 2010
7468
7469Marak Squires
7470Alexis Sellier (cloudhead)
7471
7472Permission is hereby granted, free of charge, to any person obtaining a copy
7473of this software and associated documentation files (the "Software"), to deal
7474in the Software without restriction, including without limitation the rights
7475to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7476copies of the Software, and to permit persons to whom the Software is
7477furnished to do so, subject to the following conditions:
7478
7479The above copyright notice and this permission notice shall be included in
7480all copies or substantial portions of the Software.
7481
7482THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7483IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7484FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7485AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7486LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7487OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
7488THE SOFTWARE.
7489
7490*/
7491
7492var isHeadless = false;
7493
7494if (typeof module !== 'undefined') {
7495 isHeadless = true;
7496}
7497
7498if (!isHeadless) {
7499 var exports = {};
7500 var module = {};
7501 var colors = exports;
7502 exports.mode = "browser";
7503} else {
7504 exports.mode = "console";
7505}
7506
7507//
7508// Prototypes the string object to have additional method calls that add terminal colors
7509//
7510var addProperty = function (color, func) {
7511 exports[color] = function (str) {
7512 return func.apply(str);
7513 };
7514 String.prototype.__defineGetter__(color, func);
7515};
7516
7517function stylize(str, style) {
7518
7519 var styles;
7520
7521 if (exports.mode === 'console') {
7522 styles = {
7523 //styles
7524 'bold' : ['\x1B[1m', '\x1B[22m'],
7525 'italic' : ['\x1B[3m', '\x1B[23m'],
7526 'underline' : ['\x1B[4m', '\x1B[24m'],
7527 'inverse' : ['\x1B[7m', '\x1B[27m'],
7528 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
7529 //text colors
7530 //grayscale
7531 'white' : ['\x1B[37m', '\x1B[39m'],
7532 'grey' : ['\x1B[90m', '\x1B[39m'],
7533 'black' : ['\x1B[30m', '\x1B[39m'],
7534 //colors
7535 'blue' : ['\x1B[34m', '\x1B[39m'],
7536 'cyan' : ['\x1B[36m', '\x1B[39m'],
7537 'green' : ['\x1B[32m', '\x1B[39m'],
7538 'magenta' : ['\x1B[35m', '\x1B[39m'],
7539 'red' : ['\x1B[31m', '\x1B[39m'],
7540 'yellow' : ['\x1B[33m', '\x1B[39m'],
7541 //background colors
7542 //grayscale
7543 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
7544 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
7545 'blackBG' : ['\x1B[40m', '\x1B[49m'],
7546 //colors
7547 'blueBG' : ['\x1B[44m', '\x1B[49m'],
7548 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
7549 'greenBG' : ['\x1B[42m', '\x1B[49m'],
7550 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
7551 'redBG' : ['\x1B[41m', '\x1B[49m'],
7552 'yellowBG' : ['\x1B[43m', '\x1B[49m']
7553 };
7554 } else if (exports.mode === 'browser') {
7555 styles = {
7556 //styles
7557 'bold' : ['<b>', '</b>'],
7558 'italic' : ['<i>', '</i>'],
7559 'underline' : ['<u>', '</u>'],
7560 'inverse' : ['<span style="background-color:black;color:white;">', '</span>'],
7561 'strikethrough' : ['<del>', '</del>'],
7562 //text colors
7563 //grayscale
7564 'white' : ['<span style="color:white;">', '</span>'],
7565 'grey' : ['<span style="color:gray;">', '</span>'],
7566 'black' : ['<span style="color:black;">', '</span>'],
7567 //colors
7568 'blue' : ['<span style="color:blue;">', '</span>'],
7569 'cyan' : ['<span style="color:cyan;">', '</span>'],
7570 'green' : ['<span style="color:green;">', '</span>'],
7571 'magenta' : ['<span style="color:magenta;">', '</span>'],
7572 'red' : ['<span style="color:red;">', '</span>'],
7573 'yellow' : ['<span style="color:yellow;">', '</span>'],
7574 //background colors
7575 //grayscale
7576 'whiteBG' : ['<span style="background-color:white;">', '</span>'],
7577 'greyBG' : ['<span style="background-color:gray;">', '</span>'],
7578 'blackBG' : ['<span style="background-color:black;">', '</span>'],
7579 //colors
7580 'blueBG' : ['<span style="background-color:blue;">', '</span>'],
7581 'cyanBG' : ['<span style="background-color:cyan;">', '</span>'],
7582 'greenBG' : ['<span style="background-color:green;">', '</span>'],
7583 'magentaBG' : ['<span style="background-color:magenta;">', '</span>'],
7584 'redBG' : ['<span style="background-color:red;">', '</span>'],
7585 'yellowBG' : ['<span style="background-color:yellow;">', '</span>']
7586 };
7587 } else if (exports.mode === 'none') {
7588 return str + '';
7589 } else {
7590 console.log('unsupported mode, try "browser", "console" or "none"');
7591 }
7592 return styles[style][0] + str + styles[style][1];
7593}
7594
7595function applyTheme(theme) {
7596
7597 //
7598 // Remark: This is a list of methods that exist
7599 // on String that you should not overwrite.
7600 //
7601 var stringPrototypeBlacklist = [
7602 '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
7603 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
7604 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
7605 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
7606 ];
7607
7608 Object.keys(theme).forEach(function (prop) {
7609 if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
7610 console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
7611 }
7612 else {
7613 if (typeof(theme[prop]) === 'string') {
7614 addProperty(prop, function () {
7615 return exports[theme[prop]](this);
7616 });
7617 }
7618 else {
7619 addProperty(prop, function () {
7620 var ret = this;
7621 for (var t = 0; t < theme[prop].length; t++) {
7622 ret = exports[theme[prop][t]](ret);
7623 }
7624 return ret;
7625 });
7626 }
7627 }
7628 });
7629}
7630
7631
7632//
7633// Iterate through all default styles and colors
7634//
7635var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
7636x.forEach(function (style) {
7637
7638 // __defineGetter__ at the least works in more browsers
7639 // http://robertnyman.com/javascript/javascript-getters-setters.html
7640 // Object.defineProperty only works in Chrome
7641 addProperty(style, function () {
7642 return stylize(this, style);
7643 });
7644});
7645
7646function sequencer(map) {
7647 return function () {
7648 if (!isHeadless) {
7649 return this.replace(/( )/, '$1');
7650 }
7651 var exploded = this.split(""), i = 0;
7652 exploded = exploded.map(map);
7653 return exploded.join("");
7654 };
7655}
7656
7657var rainbowMap = (function () {
7658 var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
7659 return function (letter, i, exploded) {
7660 if (letter === " ") {
7661 return letter;
7662 } else {
7663 return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
7664 }
7665 };
7666})();
7667
7668exports.themes = {};
7669
7670exports.addSequencer = function (name, map) {
7671 addProperty(name, sequencer(map));
7672};
7673
7674exports.addSequencer('rainbow', rainbowMap);
7675exports.addSequencer('zebra', function (letter, i, exploded) {
7676 return i % 2 === 0 ? letter : letter.inverse;
7677});
7678
7679exports.setTheme = function (theme) {
7680 if (typeof theme === 'string') {
7681 try {
7682 exports.themes[theme] = __webpack_require__(50)(theme);
7683 applyTheme(exports.themes[theme]);
7684 return exports.themes[theme];
7685 } catch (err) {
7686 console.log(err);
7687 return err;
7688 }
7689 } else {
7690 applyTheme(theme);
7691 }
7692};
7693
7694
7695addProperty('stripColors', function () {
7696 return ("" + this).replace(/\x1B\[\d+m/g, '');
7697});
7698
7699// please no
7700function zalgo(text, options) {
7701 var soul = {
7702 "up" : [
7703 '̍', '̎', '̄', '̅',
7704 '̿', '̑', '̆', '̐',
7705 '͒', '͗', '͑', '̇',
7706 '̈', '̊', '͂', '̓',
7707 '̈', '͊', '͋', '͌',
7708 '̃', '̂', '̌', '͐',
7709 '̀', '́', '̋', '̏',
7710 '̒', '̓', '̔', '̽',
7711 '̉', 'ͣ', 'ͤ', 'ͥ',
7712 'ͦ', 'ͧ', 'ͨ', 'ͩ',
7713 'ͪ', 'ͫ', 'ͬ', 'ͭ',
7714 'ͮ', 'ͯ', '̾', '͛',
7715 '͆', '̚'
7716 ],
7717 "down" : [
7718 '̖', '̗', '̘', '̙',
7719 '̜', '̝', '̞', '̟',
7720 '̠', '̤', '̥', '̦',
7721 '̩', '̪', '̫', '̬',
7722 '̭', '̮', '̯', '̰',
7723 '̱', '̲', '̳', '̹',
7724 '̺', '̻', '̼', 'ͅ',
7725 '͇', '͈', '͉', '͍',
7726 '͎', '͓', '͔', '͕',
7727 '͖', '͙', '͚', '̣'
7728 ],
7729 "mid" : [
7730 '̕', '̛', '̀', '́',
7731 '͘', '̡', '̢', '̧',
7732 '̨', '̴', '̵', '̶',
7733 '͜', '͝', '͞',
7734 '͟', '͠', '͢', '̸',
7735 '̷', '͡', ' ҉'
7736 ]
7737 },
7738 all = [].concat(soul.up, soul.down, soul.mid),
7739 zalgo = {};
7740
7741 function randomNumber(range) {
7742 var r = Math.floor(Math.random() * range);
7743 return r;
7744 }
7745
7746 function is_char(character) {
7747 var bool = false;
7748 all.filter(function (i) {
7749 bool = (i === character);
7750 });
7751 return bool;
7752 }
7753
7754 function heComes(text, options) {
7755 var result = '', counts, l;
7756 options = options || {};
7757 options["up"] = options["up"] || true;
7758 options["mid"] = options["mid"] || true;
7759 options["down"] = options["down"] || true;
7760 options["size"] = options["size"] || "maxi";
7761 text = text.split('');
7762 for (l in text) {
7763 if (is_char(l)) {
7764 continue;
7765 }
7766 result = result + text[l];
7767 counts = {"up" : 0, "down" : 0, "mid" : 0};
7768 switch (options.size) {
7769 case 'mini':
7770 counts.up = randomNumber(8);
7771 counts.min = randomNumber(2);
7772 counts.down = randomNumber(8);
7773 break;
7774 case 'maxi':
7775 counts.up = randomNumber(16) + 3;
7776 counts.min = randomNumber(4) + 1;
7777 counts.down = randomNumber(64) + 3;
7778 break;
7779 default:
7780 counts.up = randomNumber(8) + 1;
7781 counts.mid = randomNumber(6) / 2;
7782 counts.down = randomNumber(8) + 1;
7783 break;
7784 }
7785
7786 var arr = ["up", "mid", "down"];
7787 for (var d in arr) {
7788 var index = arr[d];
7789 for (var i = 0 ; i <= counts[index]; i++) {
7790 if (options[index]) {
7791 result = result + soul[index][randomNumber(soul[index].length)];
7792 }
7793 }
7794 }
7795 }
7796 return result;
7797 }
7798 return heComes(text);
7799}
7800
7801
7802// don't summon zalgo
7803addProperty('zalgo', function () {
7804 return zalgo(this);
7805});
7806
7807
7808/***/ }),
7809/* 50 */
7810/***/ ((module) => {
7811
7812function webpackEmptyContext(req) {
7813 var e = new Error("Cannot find module '" + req + "'");
7814 e.code = 'MODULE_NOT_FOUND';
7815 throw e;
7816}
7817webpackEmptyContext.keys = () => [];
7818webpackEmptyContext.resolve = webpackEmptyContext;
7819webpackEmptyContext.id = 50;
7820module.exports = webpackEmptyContext;
7821
7822/***/ }),
7823/* 51 */
7824/***/ ((module) => {
7825
7826"use strict";
7827module.exports = require("events");;
7828
7829/***/ }),
7830/* 52 */
7831/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7832
7833/* module decorator */ module = __webpack_require__.nmd(module);
7834//!/usr/bin/env nodejs
7835// usage: nodejs vimlparser.js [--neovim] foo.vim
7836
7837var fs = __webpack_require__(40);
7838var util = __webpack_require__(48);
7839
7840function main() {
7841 var neovim = false;
7842 var fpath = ''
7843 var args = process.argv;
7844 if (args.length == 4) {
7845 if (args[2] == '--neovim') {
7846 neovim = true;
7847 }
7848 fpath = args[3];
7849 } else if (args.length == 3) {
7850 neovim = false;
7851 fpath = args[2]
7852 }
7853 var r = new StringReader(viml_readfile(fpath));
7854 var p = new VimLParser(neovim);
7855 var c = new Compiler();
7856 try {
7857 var lines = c.compile(p.parse(r));
7858 for (var i in lines) {
7859 process.stdout.write(lines[i] + "\n");
7860 }
7861 } catch (e) {
7862 process.stdout.write(e + '\n');
7863 }
7864}
7865
7866var pat_vim2js = {
7867 "[0-9a-zA-Z]" : "[0-9a-zA-Z]",
7868 "[@*!=><&~#]" : "[@*!=><&~#]",
7869 "\\<ARGOPT\\>" : "\\bARGOPT\\b",
7870 "\\<BANG\\>" : "\\bBANG\\b",
7871 "\\<EDITCMD\\>" : "\\bEDITCMD\\b",
7872 "\\<NOTRLCOM\\>" : "\\bNOTRLCOM\\b",
7873 "\\<TRLBAR\\>" : "\\bTRLBAR\\b",
7874 "\\<USECTRLV\\>" : "\\bUSECTRLV\\b",
7875 "\\<USERCMD\\>" : "\\bUSERCMD\\b",
7876 "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>" : "\\b(XFILE|FILES|FILE1)\\b",
7877 "\\S" : "\\S",
7878 "\\a" : "[A-Za-z]",
7879 "\\d" : "\\d",
7880 "\\h" : "[A-Za-z_]",
7881 "\\s" : "\\s",
7882 "\\v^d%[elete][lp]$" : "^d(elete|elet|ele|el|e)[lp]$",
7883 "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])" : "^s(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])",
7884 "\\w" : "[0-9A-Za-z_]",
7885 "\\w\\|[:#]" : "[0-9A-Za-z_]|[:#]",
7886 "\\x" : "[0-9A-Fa-f]",
7887 "^++" : "^\+\+",
7888 "^++bad=\\(keep\\|drop\\|.\\)\\>" : "^\\+\\+bad=(keep|drop|.)\\b",
7889 "^++bad=drop" : "^\\+\\+bad=drop",
7890 "^++bad=keep" : "^\\+\\+bad=keep",
7891 "^++bin\\>" : "^\\+\\+bin\\b",
7892 "^++edit\\>" : "^\\+\\+edit\\b",
7893 "^++enc=\\S" : "^\\+\\+enc=\\S",
7894 "^++encoding=\\S" : "^\\+\\+encoding=\\S",
7895 "^++ff=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+ff=(dos|unix|mac)\\b",
7896 "^++fileformat=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+fileformat=(dos|unix|mac)\\b",
7897 "^++nobin\\>" : "^\\+\\+nobin\\b",
7898 "^[A-Z]" : "^[A-Z]",
7899 "^\\$\\w\\+" : "^\\$[0-9A-Za-z_]+",
7900 "^\\(!\\|global\\|vglobal\\)$" : "^(!|global|vglobal)$",
7901 "^\\(WHILE\\|FOR\\)$" : "^(WHILE|FOR)$",
7902 "^\\(vimgrep\\|vimgrepadd\\|lvimgrep\\|lvimgrepadd\\)$" : "^(vimgrep|vimgrepadd|lvimgrep|lvimgrepadd)$",
7903 "^\\d" : "^\\d",
7904 "^\\h" : "^[A-Za-z_]",
7905 "^\\s" : "^\\s",
7906 "^\\s*\\\\" : "^\\s*\\\\",
7907 "^[ \\t]$" : "^[ \\t]$",
7908 "^[A-Za-z]$" : "^[A-Za-z]$",
7909 "^[0-9A-Za-z]$" : "^[0-9A-Za-z]$",
7910 "^[0-9]$" : "^[0-9]$",
7911 "^[0-9A-Fa-f]$" : "^[0-9A-Fa-f]$",
7912 "^[0-9A-Za-z_]$" : "^[0-9A-Za-z_]$",
7913 "^[A-Za-z_]$" : "^[A-Za-z_]$",
7914 "^[0-9A-Za-z_:#]$" : "^[0-9A-Za-z_:#]$",
7915 "^[A-Za-z_][0-9A-Za-z_]*$" : "^[A-Za-z_][0-9A-Za-z_]*$",
7916 "^[A-Z]$" : "^[A-Z]$",
7917 "^[a-z]$" : "^[a-z]$",
7918 "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$" : "^[vgslabwt]:$|^([vgslabwt]:)?[A-Za-z_][0-9A-Za-z_#]*$",
7919 "^[0-7]$" : "^[0-7]$",
7920 "^[0-9A-Fa-f][0-9A-Fa-f]$" : "^[0-9A-Fa-f][0-9A-Fa-f]$",
7921 "^\\.[0-9A-Fa-f]$" : "^\\.[0-9A-Fa-f]$",
7922 "^[0-9A-Fa-f][^0-9A-Fa-f]$" : "^[0-9A-Fa-f][^0-9A-Fa-f]$",
7923}
7924
7925function viml_add(lst, item) {
7926 lst.push(item);
7927}
7928
7929function viml_call(func, args) {
7930 return func.apply(null, args);
7931}
7932
7933function viml_char2nr(c) {
7934 return c.charCodeAt(0);
7935}
7936
7937function viml_empty(obj) {
7938 return obj.length == 0;
7939}
7940
7941function viml_equalci(a, b) {
7942 return a.toLowerCase() == b.toLowerCase();
7943}
7944
7945function viml_eqreg(s, reg) {
7946 var mx = new RegExp(pat_vim2js[reg]);
7947 return mx.exec(s) != null;
7948}
7949
7950function viml_eqregh(s, reg) {
7951 var mx = new RegExp(pat_vim2js[reg]);
7952 return mx.exec(s) != null;
7953}
7954
7955function viml_eqregq(s, reg) {
7956 var mx = new RegExp(pat_vim2js[reg], "i");
7957 return mx.exec(s) != null;
7958}
7959
7960function viml_escape(s, chars) {
7961 var r = '';
7962 for (var i = 0; i < s.length; ++i) {
7963 if (chars.indexOf(s.charAt(i)) != -1) {
7964 r = r + "\\" + s.charAt(i);
7965 } else {
7966 r = r + s.charAt(i);
7967 }
7968 }
7969 return r;
7970}
7971
7972function viml_extend(obj, item) {
7973 obj.push.apply(obj, item);
7974}
7975
7976function viml_insert(lst, item) {
7977 var idx = arguments.length >= 3 ? arguments[2] : 0;
7978 lst.splice(0, 0, item);
7979}
7980
7981function viml_join(lst, sep) {
7982 return lst.join(sep);
7983}
7984
7985function viml_keys(obj) {
7986 return Object.keys(obj);
7987}
7988
7989function viml_len(obj) {
7990 if (typeof obj === 'string') {
7991 var len = 0;
7992 for (var i = 0; i < obj.length; i++) {
7993 var c = obj.charCodeAt(i);
7994 len += c < 128 ? 1 : ((c > 127) && (c < 2048)) ? 2 : 3;
7995 }
7996 return len;
7997 }
7998 return obj.length;
7999}
8000
8001function viml_printf() {
8002 var a000 = Array.prototype.slice.call(arguments, 0);
8003 if (a000.length == 1) {
8004 return a000[0];
8005 } else {
8006 return util.format.apply(null, a000);
8007 }
8008}
8009
8010function viml_range(start) {
8011 var end = arguments.length >= 2 ? arguments[1] : null;
8012 if (end == null) {
8013 var x = [];
8014 for (var i = 0; i < start; ++i) {
8015 x.push(i);
8016 }
8017 return x;
8018 } else {
8019 var x = []
8020 for (var i = start; i <= end; ++i) {
8021 x.push(i);
8022 }
8023 return x;
8024 }
8025}
8026
8027function viml_readfile(path) {
8028 // FIXME: newline?
8029 return fs.readFileSync(path, 'utf-8').split(/\r\n|\r|\n/);
8030}
8031
8032function viml_remove(lst, idx) {
8033 lst.splice(idx, 1);
8034}
8035
8036function viml_split(s, sep) {
8037 if (sep == "\\zs") {
8038 return s.split("");
8039 }
8040 throw "NotImplemented";
8041}
8042
8043function viml_str2nr(s) {
8044 var base = arguments.length >= 2 ? arguments[1] : 10;
8045 return parseInt(s, base);
8046}
8047
8048function viml_string(obj) {
8049 return obj.toString();
8050}
8051
8052function viml_has_key(obj, key) {
8053 return obj[key] !== undefined;
8054}
8055
8056function viml_stridx(a, b) {
8057 return a.indexOf(b);
8058}
8059
8060var NIL = [];
8061var TRUE = 1;
8062var FALSE = 0;
8063var NODE_TOPLEVEL = 1;
8064var NODE_COMMENT = 2;
8065var NODE_EXCMD = 3;
8066var NODE_FUNCTION = 4;
8067var NODE_ENDFUNCTION = 5;
8068var NODE_DELFUNCTION = 6;
8069var NODE_RETURN = 7;
8070var NODE_EXCALL = 8;
8071var NODE_LET = 9;
8072var NODE_UNLET = 10;
8073var NODE_LOCKVAR = 11;
8074var NODE_UNLOCKVAR = 12;
8075var NODE_IF = 13;
8076var NODE_ELSEIF = 14;
8077var NODE_ELSE = 15;
8078var NODE_ENDIF = 16;
8079var NODE_WHILE = 17;
8080var NODE_ENDWHILE = 18;
8081var NODE_FOR = 19;
8082var NODE_ENDFOR = 20;
8083var NODE_CONTINUE = 21;
8084var NODE_BREAK = 22;
8085var NODE_TRY = 23;
8086var NODE_CATCH = 24;
8087var NODE_FINALLY = 25;
8088var NODE_ENDTRY = 26;
8089var NODE_THROW = 27;
8090var NODE_ECHO = 28;
8091var NODE_ECHON = 29;
8092var NODE_ECHOHL = 30;
8093var NODE_ECHOMSG = 31;
8094var NODE_ECHOERR = 32;
8095var NODE_EXECUTE = 33;
8096var NODE_TERNARY = 34;
8097var NODE_OR = 35;
8098var NODE_AND = 36;
8099var NODE_EQUAL = 37;
8100var NODE_EQUALCI = 38;
8101var NODE_EQUALCS = 39;
8102var NODE_NEQUAL = 40;
8103var NODE_NEQUALCI = 41;
8104var NODE_NEQUALCS = 42;
8105var NODE_GREATER = 43;
8106var NODE_GREATERCI = 44;
8107var NODE_GREATERCS = 45;
8108var NODE_GEQUAL = 46;
8109var NODE_GEQUALCI = 47;
8110var NODE_GEQUALCS = 48;
8111var NODE_SMALLER = 49;
8112var NODE_SMALLERCI = 50;
8113var NODE_SMALLERCS = 51;
8114var NODE_SEQUAL = 52;
8115var NODE_SEQUALCI = 53;
8116var NODE_SEQUALCS = 54;
8117var NODE_MATCH = 55;
8118var NODE_MATCHCI = 56;
8119var NODE_MATCHCS = 57;
8120var NODE_NOMATCH = 58;
8121var NODE_NOMATCHCI = 59;
8122var NODE_NOMATCHCS = 60;
8123var NODE_IS = 61;
8124var NODE_ISCI = 62;
8125var NODE_ISCS = 63;
8126var NODE_ISNOT = 64;
8127var NODE_ISNOTCI = 65;
8128var NODE_ISNOTCS = 66;
8129var NODE_ADD = 67;
8130var NODE_SUBTRACT = 68;
8131var NODE_CONCAT = 69;
8132var NODE_MULTIPLY = 70;
8133var NODE_DIVIDE = 71;
8134var NODE_REMAINDER = 72;
8135var NODE_NOT = 73;
8136var NODE_MINUS = 74;
8137var NODE_PLUS = 75;
8138var NODE_SUBSCRIPT = 76;
8139var NODE_SLICE = 77;
8140var NODE_CALL = 78;
8141var NODE_DOT = 79;
8142var NODE_NUMBER = 80;
8143var NODE_STRING = 81;
8144var NODE_LIST = 82;
8145var NODE_DICT = 83;
8146var NODE_OPTION = 85;
8147var NODE_IDENTIFIER = 86;
8148var NODE_CURLYNAME = 87;
8149var NODE_ENV = 88;
8150var NODE_REG = 89;
8151var NODE_CURLYNAMEPART = 90;
8152var NODE_CURLYNAMEEXPR = 91;
8153var NODE_LAMBDA = 92;
8154var NODE_BLOB = 93;
8155var NODE_CONST = 94;
8156var NODE_EVAL = 95;
8157var NODE_HEREDOC = 96;
8158var NODE_METHOD = 97;
8159var TOKEN_EOF = 1;
8160var TOKEN_EOL = 2;
8161var TOKEN_SPACE = 3;
8162var TOKEN_OROR = 4;
8163var TOKEN_ANDAND = 5;
8164var TOKEN_EQEQ = 6;
8165var TOKEN_EQEQCI = 7;
8166var TOKEN_EQEQCS = 8;
8167var TOKEN_NEQ = 9;
8168var TOKEN_NEQCI = 10;
8169var TOKEN_NEQCS = 11;
8170var TOKEN_GT = 12;
8171var TOKEN_GTCI = 13;
8172var TOKEN_GTCS = 14;
8173var TOKEN_GTEQ = 15;
8174var TOKEN_GTEQCI = 16;
8175var TOKEN_GTEQCS = 17;
8176var TOKEN_LT = 18;
8177var TOKEN_LTCI = 19;
8178var TOKEN_LTCS = 20;
8179var TOKEN_LTEQ = 21;
8180var TOKEN_LTEQCI = 22;
8181var TOKEN_LTEQCS = 23;
8182var TOKEN_MATCH = 24;
8183var TOKEN_MATCHCI = 25;
8184var TOKEN_MATCHCS = 26;
8185var TOKEN_NOMATCH = 27;
8186var TOKEN_NOMATCHCI = 28;
8187var TOKEN_NOMATCHCS = 29;
8188var TOKEN_IS = 30;
8189var TOKEN_ISCI = 31;
8190var TOKEN_ISCS = 32;
8191var TOKEN_ISNOT = 33;
8192var TOKEN_ISNOTCI = 34;
8193var TOKEN_ISNOTCS = 35;
8194var TOKEN_PLUS = 36;
8195var TOKEN_MINUS = 37;
8196var TOKEN_DOT = 38;
8197var TOKEN_STAR = 39;
8198var TOKEN_SLASH = 40;
8199var TOKEN_PERCENT = 41;
8200var TOKEN_NOT = 42;
8201var TOKEN_QUESTION = 43;
8202var TOKEN_COLON = 44;
8203var TOKEN_POPEN = 45;
8204var TOKEN_PCLOSE = 46;
8205var TOKEN_SQOPEN = 47;
8206var TOKEN_SQCLOSE = 48;
8207var TOKEN_COPEN = 49;
8208var TOKEN_CCLOSE = 50;
8209var TOKEN_COMMA = 51;
8210var TOKEN_NUMBER = 52;
8211var TOKEN_SQUOTE = 53;
8212var TOKEN_DQUOTE = 54;
8213var TOKEN_OPTION = 55;
8214var TOKEN_IDENTIFIER = 56;
8215var TOKEN_ENV = 57;
8216var TOKEN_REG = 58;
8217var TOKEN_EQ = 59;
8218var TOKEN_OR = 60;
8219var TOKEN_SEMICOLON = 61;
8220var TOKEN_BACKTICK = 62;
8221var TOKEN_DOTDOTDOT = 63;
8222var TOKEN_SHARP = 64;
8223var TOKEN_ARROW = 65;
8224var TOKEN_BLOB = 66;
8225var TOKEN_LITCOPEN = 67;
8226var TOKEN_DOTDOT = 68;
8227var TOKEN_HEREDOC = 69;
8228var MAX_FUNC_ARGS = 20;
8229function isalpha(c) {
8230 return viml_eqregh(c, "^[A-Za-z]$");
8231}
8232
8233function isalnum(c) {
8234 return viml_eqregh(c, "^[0-9A-Za-z]$");
8235}
8236
8237function isdigit(c) {
8238 return viml_eqregh(c, "^[0-9]$");
8239}
8240
8241function isodigit(c) {
8242 return viml_eqregh(c, "^[0-7]$");
8243}
8244
8245function isxdigit(c) {
8246 return viml_eqregh(c, "^[0-9A-Fa-f]$");
8247}
8248
8249function iswordc(c) {
8250 return viml_eqregh(c, "^[0-9A-Za-z_]$");
8251}
8252
8253function iswordc1(c) {
8254 return viml_eqregh(c, "^[A-Za-z_]$");
8255}
8256
8257function iswhite(c) {
8258 return viml_eqregh(c, "^[ \\t]$");
8259}
8260
8261function isnamec(c) {
8262 return viml_eqregh(c, "^[0-9A-Za-z_:#]$");
8263}
8264
8265function isnamec1(c) {
8266 return viml_eqregh(c, "^[A-Za-z_]$");
8267}
8268
8269function isargname(s) {
8270 return viml_eqregh(s, "^[A-Za-z_][0-9A-Za-z_]*$");
8271}
8272
8273function isvarname(s) {
8274 return viml_eqregh(s, "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$");
8275}
8276
8277// FIXME:
8278function isidc(c) {
8279 return viml_eqregh(c, "^[0-9A-Za-z_]$");
8280}
8281
8282function isupper(c) {
8283 return viml_eqregh(c, "^[A-Z]$");
8284}
8285
8286function islower(c) {
8287 return viml_eqregh(c, "^[a-z]$");
8288}
8289
8290function ExArg() {
8291 var ea = {};
8292 ea.forceit = FALSE;
8293 ea.addr_count = 0;
8294 ea.line1 = 0;
8295 ea.line2 = 0;
8296 ea.flags = 0;
8297 ea.do_ecmd_cmd = "";
8298 ea.do_ecmd_lnum = 0;
8299 ea.append = 0;
8300 ea.usefilter = FALSE;
8301 ea.amount = 0;
8302 ea.regname = 0;
8303 ea.force_bin = 0;
8304 ea.read_edit = 0;
8305 ea.force_ff = 0;
8306 ea.force_enc = 0;
8307 ea.bad_char = 0;
8308 ea.linepos = {};
8309 ea.cmdpos = [];
8310 ea.argpos = [];
8311 ea.cmd = {};
8312 ea.modifiers = [];
8313 ea.range = [];
8314 ea.argopt = {};
8315 ea.argcmd = {};
8316 return ea;
8317}
8318
8319// struct node {
8320// int type
8321// pos pos
8322// node left
8323// node right
8324// node cond
8325// node rest
8326// node[] list
8327// node[] rlist
8328// node[] default_args
8329// node[] body
8330// string op
8331// string str
8332// int depth
8333// variant value
8334// }
8335// TOPLEVEL .body
8336// COMMENT .str
8337// EXCMD .ea .str
8338// FUNCTION .ea .body .left .rlist .default_args .attr .endfunction
8339// ENDFUNCTION .ea
8340// DELFUNCTION .ea .left
8341// RETURN .ea .left
8342// EXCALL .ea .left
8343// LET .ea .op .left .list .rest .right
8344// CONST .ea .op .left .list .rest .right
8345// UNLET .ea .list
8346// LOCKVAR .ea .depth .list
8347// UNLOCKVAR .ea .depth .list
8348// IF .ea .body .cond .elseif .else .endif
8349// ELSEIF .ea .body .cond
8350// ELSE .ea .body
8351// ENDIF .ea
8352// WHILE .ea .body .cond .endwhile
8353// ENDWHILE .ea
8354// FOR .ea .body .left .list .rest .right .endfor
8355// ENDFOR .ea
8356// CONTINUE .ea
8357// BREAK .ea
8358// TRY .ea .body .catch .finally .endtry
8359// CATCH .ea .body .pattern
8360// FINALLY .ea .body
8361// ENDTRY .ea
8362// THROW .ea .left
8363// EVAL .ea .left
8364// ECHO .ea .list
8365// ECHON .ea .list
8366// ECHOHL .ea .str
8367// ECHOMSG .ea .list
8368// ECHOERR .ea .list
8369// EXECUTE .ea .list
8370// TERNARY .cond .left .right
8371// OR .left .right
8372// AND .left .right
8373// EQUAL .left .right
8374// EQUALCI .left .right
8375// EQUALCS .left .right
8376// NEQUAL .left .right
8377// NEQUALCI .left .right
8378// NEQUALCS .left .right
8379// GREATER .left .right
8380// GREATERCI .left .right
8381// GREATERCS .left .right
8382// GEQUAL .left .right
8383// GEQUALCI .left .right
8384// GEQUALCS .left .right
8385// SMALLER .left .right
8386// SMALLERCI .left .right
8387// SMALLERCS .left .right
8388// SEQUAL .left .right
8389// SEQUALCI .left .right
8390// SEQUALCS .left .right
8391// MATCH .left .right
8392// MATCHCI .left .right
8393// MATCHCS .left .right
8394// NOMATCH .left .right
8395// NOMATCHCI .left .right
8396// NOMATCHCS .left .right
8397// IS .left .right
8398// ISCI .left .right
8399// ISCS .left .right
8400// ISNOT .left .right
8401// ISNOTCI .left .right
8402// ISNOTCS .left .right
8403// ADD .left .right
8404// SUBTRACT .left .right
8405// CONCAT .left .right
8406// MULTIPLY .left .right
8407// DIVIDE .left .right
8408// REMAINDER .left .right
8409// NOT .left
8410// MINUS .left
8411// PLUS .left
8412// SUBSCRIPT .left .right
8413// SLICE .left .rlist
8414// METHOD .left .right
8415// CALL .left .rlist
8416// DOT .left .right
8417// NUMBER .value
8418// STRING .value
8419// LIST .value
8420// DICT .value
8421// BLOB .value
8422// NESTING .left
8423// OPTION .value
8424// IDENTIFIER .value
8425// CURLYNAME .value
8426// ENV .value
8427// REG .value
8428// CURLYNAMEPART .value
8429// CURLYNAMEEXPR .value
8430// LAMBDA .rlist .left
8431// HEREDOC .rlist .op .body
8432function Node(type) {
8433 return {"type":type};
8434}
8435
8436function Err(msg, pos) {
8437 return viml_printf("vimlparser: %s: line %d col %d", msg, pos.lnum, pos.col);
8438}
8439
8440function VimLParser() { this.__init__.apply(this, arguments); }
8441VimLParser.prototype.__init__ = function() {
8442 var a000 = Array.prototype.slice.call(arguments, 0);
8443 if (viml_len(a000) > 0) {
8444 this.neovim = a000[0];
8445 }
8446 else {
8447 this.neovim = 0;
8448 }
8449 this.find_command_cache = {};
8450}
8451
8452VimLParser.prototype.push_context = function(node) {
8453 viml_insert(this.context, node);
8454}
8455
8456VimLParser.prototype.pop_context = function() {
8457 viml_remove(this.context, 0);
8458}
8459
8460VimLParser.prototype.find_context = function(type) {
8461 var i = 0;
8462 var __c3 = this.context;
8463 for (var __i3 = 0; __i3 < __c3.length; ++__i3) {
8464 var node = __c3[__i3];
8465 if (node.type == type) {
8466 return i;
8467 }
8468 i += 1;
8469 }
8470 return -1;
8471}
8472
8473VimLParser.prototype.add_node = function(node) {
8474 viml_add(this.context[0].body, node);
8475}
8476
8477VimLParser.prototype.check_missing_endfunction = function(ends, pos) {
8478 if (this.context[0].type == NODE_FUNCTION) {
8479 throw Err(viml_printf("E126: Missing :endfunction: %s", ends), pos);
8480 }
8481}
8482
8483VimLParser.prototype.check_missing_endif = function(ends, pos) {
8484 if (this.context[0].type == NODE_IF || this.context[0].type == NODE_ELSEIF || this.context[0].type == NODE_ELSE) {
8485 throw Err(viml_printf("E171: Missing :endif: %s", ends), pos);
8486 }
8487}
8488
8489VimLParser.prototype.check_missing_endtry = function(ends, pos) {
8490 if (this.context[0].type == NODE_TRY || this.context[0].type == NODE_CATCH || this.context[0].type == NODE_FINALLY) {
8491 throw Err(viml_printf("E600: Missing :endtry: %s", ends), pos);
8492 }
8493}
8494
8495VimLParser.prototype.check_missing_endwhile = function(ends, pos) {
8496 if (this.context[0].type == NODE_WHILE) {
8497 throw Err(viml_printf("E170: Missing :endwhile: %s", ends), pos);
8498 }
8499}
8500
8501VimLParser.prototype.check_missing_endfor = function(ends, pos) {
8502 if (this.context[0].type == NODE_FOR) {
8503 throw Err(viml_printf("E170: Missing :endfor: %s", ends), pos);
8504 }
8505}
8506
8507VimLParser.prototype.parse = function(reader) {
8508 this.reader = reader;
8509 this.context = [];
8510 var toplevel = Node(NODE_TOPLEVEL);
8511 toplevel.pos = this.reader.getpos();
8512 toplevel.body = [];
8513 this.push_context(toplevel);
8514 while (this.reader.peek() != "<EOF>") {
8515 this.parse_one_cmd();
8516 }
8517 this.check_missing_endfunction("TOPLEVEL", this.reader.getpos());
8518 this.check_missing_endif("TOPLEVEL", this.reader.getpos());
8519 this.check_missing_endtry("TOPLEVEL", this.reader.getpos());
8520 this.check_missing_endwhile("TOPLEVEL", this.reader.getpos());
8521 this.check_missing_endfor("TOPLEVEL", this.reader.getpos());
8522 this.pop_context();
8523 return toplevel;
8524}
8525
8526VimLParser.prototype.parse_one_cmd = function() {
8527 this.ea = ExArg();
8528 if (this.reader.peekn(2) == "#!") {
8529 this.parse_hashbang();
8530 this.reader.get();
8531 return;
8532 }
8533 this.reader.skip_white_and_colon();
8534 if (this.reader.peekn(1) == "") {
8535 this.reader.get();
8536 return;
8537 }
8538 if (this.reader.peekn(1) == "\"") {
8539 this.parse_comment();
8540 this.reader.get();
8541 return;
8542 }
8543 this.ea.linepos = this.reader.getpos();
8544 this.parse_command_modifiers();
8545 this.parse_range();
8546 this.parse_command();
8547 this.parse_trail();
8548}
8549
8550// FIXME:
8551VimLParser.prototype.parse_command_modifiers = function() {
8552 var modifiers = [];
8553 while (TRUE) {
8554 var pos = this.reader.tell();
8555 var d = "";
8556 if (isdigit(this.reader.peekn(1))) {
8557 var d = this.reader.read_digit();
8558 this.reader.skip_white();
8559 }
8560 var k = this.reader.read_alpha();
8561 var c = this.reader.peekn(1);
8562 this.reader.skip_white();
8563 if (viml_stridx("aboveleft", k) == 0 && viml_len(k) >= 3) {
8564 // abo\%[veleft]
8565 viml_add(modifiers, {"name":"aboveleft"});
8566 }
8567 else if (viml_stridx("belowright", k) == 0 && viml_len(k) >= 3) {
8568 // bel\%[owright]
8569 viml_add(modifiers, {"name":"belowright"});
8570 }
8571 else if (viml_stridx("browse", k) == 0 && viml_len(k) >= 3) {
8572 // bro\%[wse]
8573 viml_add(modifiers, {"name":"browse"});
8574 }
8575 else if (viml_stridx("botright", k) == 0 && viml_len(k) >= 2) {
8576 // bo\%[tright]
8577 viml_add(modifiers, {"name":"botright"});
8578 }
8579 else if (viml_stridx("confirm", k) == 0 && viml_len(k) >= 4) {
8580 // conf\%[irm]
8581 viml_add(modifiers, {"name":"confirm"});
8582 }
8583 else if (viml_stridx("keepmarks", k) == 0 && viml_len(k) >= 3) {
8584 // kee\%[pmarks]
8585 viml_add(modifiers, {"name":"keepmarks"});
8586 }
8587 else if (viml_stridx("keepalt", k) == 0 && viml_len(k) >= 5) {
8588 // keepa\%[lt]
8589 viml_add(modifiers, {"name":"keepalt"});
8590 }
8591 else if (viml_stridx("keepjumps", k) == 0 && viml_len(k) >= 5) {
8592 // keepj\%[umps]
8593 viml_add(modifiers, {"name":"keepjumps"});
8594 }
8595 else if (viml_stridx("keeppatterns", k) == 0 && viml_len(k) >= 5) {
8596 // keepp\%[atterns]
8597 viml_add(modifiers, {"name":"keeppatterns"});
8598 }
8599 else if (viml_stridx("hide", k) == 0 && viml_len(k) >= 3) {
8600 // hid\%[e]
8601 if (this.ends_excmds(c)) {
8602 break;
8603 }
8604 viml_add(modifiers, {"name":"hide"});
8605 }
8606 else if (viml_stridx("lockmarks", k) == 0 && viml_len(k) >= 3) {
8607 // loc\%[kmarks]
8608 viml_add(modifiers, {"name":"lockmarks"});
8609 }
8610 else if (viml_stridx("leftabove", k) == 0 && viml_len(k) >= 5) {
8611 // lefta\%[bove]
8612 viml_add(modifiers, {"name":"leftabove"});
8613 }
8614 else if (viml_stridx("noautocmd", k) == 0 && viml_len(k) >= 3) {
8615 // noa\%[utocmd]
8616 viml_add(modifiers, {"name":"noautocmd"});
8617 }
8618 else if (viml_stridx("noswapfile", k) == 0 && viml_len(k) >= 3) {
8619 // :nos\%[wapfile]
8620 viml_add(modifiers, {"name":"noswapfile"});
8621 }
8622 else if (viml_stridx("rightbelow", k) == 0 && viml_len(k) >= 6) {
8623 // rightb\%[elow]
8624 viml_add(modifiers, {"name":"rightbelow"});
8625 }
8626 else if (viml_stridx("sandbox", k) == 0 && viml_len(k) >= 3) {
8627 // san\%[dbox]
8628 viml_add(modifiers, {"name":"sandbox"});
8629 }
8630 else if (viml_stridx("silent", k) == 0 && viml_len(k) >= 3) {
8631 // sil\%[ent]
8632 if (c == "!") {
8633 this.reader.get();
8634 viml_add(modifiers, {"name":"silent", "bang":1});
8635 }
8636 else {
8637 viml_add(modifiers, {"name":"silent", "bang":0});
8638 }
8639 }
8640 else if (k == "tab") {
8641 // tab
8642 if (d != "") {
8643 viml_add(modifiers, {"name":"tab", "count":viml_str2nr(d, 10)});
8644 }
8645 else {
8646 viml_add(modifiers, {"name":"tab"});
8647 }
8648 }
8649 else if (viml_stridx("topleft", k) == 0 && viml_len(k) >= 2) {
8650 // to\%[pleft]
8651 viml_add(modifiers, {"name":"topleft"});
8652 }
8653 else if (viml_stridx("unsilent", k) == 0 && viml_len(k) >= 3) {
8654 // uns\%[ilent]
8655 viml_add(modifiers, {"name":"unsilent"});
8656 }
8657 else if (viml_stridx("vertical", k) == 0 && viml_len(k) >= 4) {
8658 // vert\%[ical]
8659 viml_add(modifiers, {"name":"vertical"});
8660 }
8661 else if (viml_stridx("verbose", k) == 0 && viml_len(k) >= 4) {
8662 // verb\%[ose]
8663 if (d != "") {
8664 viml_add(modifiers, {"name":"verbose", "count":viml_str2nr(d, 10)});
8665 }
8666 else {
8667 viml_add(modifiers, {"name":"verbose", "count":1});
8668 }
8669 }
8670 else {
8671 this.reader.seek_set(pos);
8672 break;
8673 }
8674 }
8675 this.ea.modifiers = modifiers;
8676}
8677
8678// FIXME:
8679VimLParser.prototype.parse_range = function() {
8680 var tokens = [];
8681 while (TRUE) {
8682 while (TRUE) {
8683 this.reader.skip_white();
8684 var c = this.reader.peekn(1);
8685 if (c == "") {
8686 break;
8687 }
8688 if (c == ".") {
8689 viml_add(tokens, this.reader.getn(1));
8690 }
8691 else if (c == "$") {
8692 viml_add(tokens, this.reader.getn(1));
8693 }
8694 else if (c == "'") {
8695 this.reader.getn(1);
8696 var m = this.reader.getn(1);
8697 if (m == "") {
8698 break;
8699 }
8700 viml_add(tokens, "'" + m);
8701 }
8702 else if (c == "/") {
8703 this.reader.getn(1);
8704 var __tmp = this.parse_pattern(c);
8705 var pattern = __tmp[0];
8706 var _ = __tmp[1];
8707 viml_add(tokens, pattern);
8708 }
8709 else if (c == "?") {
8710 this.reader.getn(1);
8711 var __tmp = this.parse_pattern(c);
8712 var pattern = __tmp[0];
8713 var _ = __tmp[1];
8714 viml_add(tokens, pattern);
8715 }
8716 else if (c == "\\") {
8717 var m = this.reader.p(1);
8718 if (m == "&" || m == "?" || m == "/") {
8719 this.reader.seek_cur(2);
8720 viml_add(tokens, "\\" + m);
8721 }
8722 else {
8723 throw Err("E10: \\\\ should be followed by /, ? or &", this.reader.getpos());
8724 }
8725 }
8726 else if (isdigit(c)) {
8727 viml_add(tokens, this.reader.read_digit());
8728 }
8729 while (TRUE) {
8730 this.reader.skip_white();
8731 if (this.reader.peekn(1) == "") {
8732 break;
8733 }
8734 var n = this.reader.read_integer();
8735 if (n == "") {
8736 break;
8737 }
8738 viml_add(tokens, n);
8739 }
8740 if (this.reader.p(0) != "/" && this.reader.p(0) != "?") {
8741 break;
8742 }
8743 }
8744 if (this.reader.peekn(1) == "%") {
8745 viml_add(tokens, this.reader.getn(1));
8746 }
8747 else if (this.reader.peekn(1) == "*") {
8748 // && &cpoptions !~ '\*'
8749 viml_add(tokens, this.reader.getn(1));
8750 }
8751 if (this.reader.peekn(1) == ";") {
8752 viml_add(tokens, this.reader.getn(1));
8753 continue;
8754 }
8755 else if (this.reader.peekn(1) == ",") {
8756 viml_add(tokens, this.reader.getn(1));
8757 continue;
8758 }
8759 break;
8760 }
8761 this.ea.range = tokens;
8762}
8763
8764// FIXME:
8765VimLParser.prototype.parse_pattern = function(delimiter) {
8766 var pattern = "";
8767 var endc = "";
8768 var inbracket = 0;
8769 while (TRUE) {
8770 var c = this.reader.getn(1);
8771 if (c == "") {
8772 break;
8773 }
8774 if (c == delimiter && inbracket == 0) {
8775 var endc = c;
8776 break;
8777 }
8778 pattern += c;
8779 if (c == "\\") {
8780 var c = this.reader.peekn(1);
8781 if (c == "") {
8782 throw Err("E682: Invalid search pattern or delimiter", this.reader.getpos());
8783 }
8784 this.reader.getn(1);
8785 pattern += c;
8786 }
8787 else if (c == "[") {
8788 inbracket += 1;
8789 }
8790 else if (c == "]") {
8791 inbracket -= 1;
8792 }
8793 }
8794 return [pattern, endc];
8795}
8796
8797VimLParser.prototype.parse_command = function() {
8798 this.reader.skip_white_and_colon();
8799 this.ea.cmdpos = this.reader.getpos();
8800 if (this.reader.peekn(1) == "" || this.reader.peekn(1) == "\"") {
8801 if (!viml_empty(this.ea.modifiers) || !viml_empty(this.ea.range)) {
8802 this.parse_cmd_modifier_range();
8803 }
8804 return;
8805 }
8806 this.ea.cmd = this.find_command();
8807 if (this.ea.cmd === NIL) {
8808 this.reader.setpos(this.ea.cmdpos);
8809 throw Err(viml_printf("E492: Not an editor command: %s", this.reader.peekline()), this.ea.cmdpos);
8810 }
8811 if (this.reader.peekn(1) == "!" && this.ea.cmd.name != "substitute" && this.ea.cmd.name != "smagic" && this.ea.cmd.name != "snomagic") {
8812 this.reader.getn(1);
8813 this.ea.forceit = TRUE;
8814 }
8815 else {
8816 this.ea.forceit = FALSE;
8817 }
8818 if (!viml_eqregh(this.ea.cmd.flags, "\\<BANG\\>") && this.ea.forceit && !viml_eqregh(this.ea.cmd.flags, "\\<USERCMD\\>")) {
8819 throw Err("E477: No ! allowed", this.ea.cmdpos);
8820 }
8821 if (this.ea.cmd.name != "!") {
8822 this.reader.skip_white();
8823 }
8824 this.ea.argpos = this.reader.getpos();
8825 if (viml_eqregh(this.ea.cmd.flags, "\\<ARGOPT\\>")) {
8826 this.parse_argopt();
8827 }
8828 if (this.ea.cmd.name == "write" || this.ea.cmd.name == "update") {
8829 if (this.reader.p(0) == ">") {
8830 if (this.reader.p(1) != ">") {
8831 throw Err("E494: Use w or w>>", this.ea.cmdpos);
8832 }
8833 this.reader.seek_cur(2);
8834 this.reader.skip_white();
8835 this.ea.append = 1;
8836 }
8837 else if (this.reader.peekn(1) == "!" && this.ea.cmd.name == "write") {
8838 this.reader.getn(1);
8839 this.ea.usefilter = TRUE;
8840 }
8841 }
8842 if (this.ea.cmd.name == "read") {
8843 if (this.ea.forceit) {
8844 this.ea.usefilter = TRUE;
8845 this.ea.forceit = FALSE;
8846 }
8847 else if (this.reader.peekn(1) == "!") {
8848 this.reader.getn(1);
8849 this.ea.usefilter = TRUE;
8850 }
8851 }
8852 if (this.ea.cmd.name == "<" || this.ea.cmd.name == ">") {
8853 this.ea.amount = 1;
8854 while (this.reader.peekn(1) == this.ea.cmd.name) {
8855 this.reader.getn(1);
8856 this.ea.amount += 1;
8857 }
8858 this.reader.skip_white();
8859 }
8860 if (viml_eqregh(this.ea.cmd.flags, "\\<EDITCMD\\>") && !this.ea.usefilter) {
8861 this.parse_argcmd();
8862 }
8863 this._parse_command(this.ea.cmd.parser);
8864}
8865
8866// TODO: self[a:parser]
8867VimLParser.prototype._parse_command = function(parser) {
8868 if (parser == "parse_cmd_append") {
8869 this.parse_cmd_append();
8870 }
8871 else if (parser == "parse_cmd_break") {
8872 this.parse_cmd_break();
8873 }
8874 else if (parser == "parse_cmd_call") {
8875 this.parse_cmd_call();
8876 }
8877 else if (parser == "parse_cmd_catch") {
8878 this.parse_cmd_catch();
8879 }
8880 else if (parser == "parse_cmd_common") {
8881 this.parse_cmd_common();
8882 }
8883 else if (parser == "parse_cmd_continue") {
8884 this.parse_cmd_continue();
8885 }
8886 else if (parser == "parse_cmd_delfunction") {
8887 this.parse_cmd_delfunction();
8888 }
8889 else if (parser == "parse_cmd_echo") {
8890 this.parse_cmd_echo();
8891 }
8892 else if (parser == "parse_cmd_echoerr") {
8893 this.parse_cmd_echoerr();
8894 }
8895 else if (parser == "parse_cmd_echohl") {
8896 this.parse_cmd_echohl();
8897 }
8898 else if (parser == "parse_cmd_echomsg") {
8899 this.parse_cmd_echomsg();
8900 }
8901 else if (parser == "parse_cmd_echon") {
8902 this.parse_cmd_echon();
8903 }
8904 else if (parser == "parse_cmd_else") {
8905 this.parse_cmd_else();
8906 }
8907 else if (parser == "parse_cmd_elseif") {
8908 this.parse_cmd_elseif();
8909 }
8910 else if (parser == "parse_cmd_endfor") {
8911 this.parse_cmd_endfor();
8912 }
8913 else if (parser == "parse_cmd_endfunction") {
8914 this.parse_cmd_endfunction();
8915 }
8916 else if (parser == "parse_cmd_endif") {
8917 this.parse_cmd_endif();
8918 }
8919 else if (parser == "parse_cmd_endtry") {
8920 this.parse_cmd_endtry();
8921 }
8922 else if (parser == "parse_cmd_endwhile") {
8923 this.parse_cmd_endwhile();
8924 }
8925 else if (parser == "parse_cmd_execute") {
8926 this.parse_cmd_execute();
8927 }
8928 else if (parser == "parse_cmd_finally") {
8929 this.parse_cmd_finally();
8930 }
8931 else if (parser == "parse_cmd_finish") {
8932 this.parse_cmd_finish();
8933 }
8934 else if (parser == "parse_cmd_for") {
8935 this.parse_cmd_for();
8936 }
8937 else if (parser == "parse_cmd_function") {
8938 this.parse_cmd_function();
8939 }
8940 else if (parser == "parse_cmd_if") {
8941 this.parse_cmd_if();
8942 }
8943 else if (parser == "parse_cmd_insert") {
8944 this.parse_cmd_insert();
8945 }
8946 else if (parser == "parse_cmd_let") {
8947 this.parse_cmd_let();
8948 }
8949 else if (parser == "parse_cmd_const") {
8950 this.parse_cmd_const();
8951 }
8952 else if (parser == "parse_cmd_loadkeymap") {
8953 this.parse_cmd_loadkeymap();
8954 }
8955 else if (parser == "parse_cmd_lockvar") {
8956 this.parse_cmd_lockvar();
8957 }
8958 else if (parser == "parse_cmd_lua") {
8959 this.parse_cmd_lua();
8960 }
8961 else if (parser == "parse_cmd_modifier_range") {
8962 this.parse_cmd_modifier_range();
8963 }
8964 else if (parser == "parse_cmd_mzscheme") {
8965 this.parse_cmd_mzscheme();
8966 }
8967 else if (parser == "parse_cmd_perl") {
8968 this.parse_cmd_perl();
8969 }
8970 else if (parser == "parse_cmd_python") {
8971 this.parse_cmd_python();
8972 }
8973 else if (parser == "parse_cmd_python3") {
8974 this.parse_cmd_python3();
8975 }
8976 else if (parser == "parse_cmd_return") {
8977 this.parse_cmd_return();
8978 }
8979 else if (parser == "parse_cmd_ruby") {
8980 this.parse_cmd_ruby();
8981 }
8982 else if (parser == "parse_cmd_tcl") {
8983 this.parse_cmd_tcl();
8984 }
8985 else if (parser == "parse_cmd_throw") {
8986 this.parse_cmd_throw();
8987 }
8988 else if (parser == "parse_cmd_eval") {
8989 this.parse_cmd_eval();
8990 }
8991 else if (parser == "parse_cmd_try") {
8992 this.parse_cmd_try();
8993 }
8994 else if (parser == "parse_cmd_unlet") {
8995 this.parse_cmd_unlet();
8996 }
8997 else if (parser == "parse_cmd_unlockvar") {
8998 this.parse_cmd_unlockvar();
8999 }
9000 else if (parser == "parse_cmd_usercmd") {
9001 this.parse_cmd_usercmd();
9002 }
9003 else if (parser == "parse_cmd_while") {
9004 this.parse_cmd_while();
9005 }
9006 else if (parser == "parse_wincmd") {
9007 this.parse_wincmd();
9008 }
9009 else if (parser == "parse_cmd_syntax") {
9010 this.parse_cmd_syntax();
9011 }
9012 else {
9013 throw viml_printf("unknown parser: %s", viml_string(parser));
9014 }
9015}
9016
9017VimLParser.prototype.find_command = function() {
9018 var c = this.reader.peekn(1);
9019 var name = "";
9020 if (c == "k") {
9021 this.reader.getn(1);
9022 var name = "k";
9023 }
9024 else if (c == "s" && viml_eqregh(this.reader.peekn(5), "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])")) {
9025 this.reader.getn(1);
9026 var name = "substitute";
9027 }
9028 else if (viml_eqregh(c, "[@*!=><&~#]")) {
9029 this.reader.getn(1);
9030 var name = c;
9031 }
9032 else if (this.reader.peekn(2) == "py") {
9033 var name = this.reader.read_alnum();
9034 }
9035 else {
9036 var pos = this.reader.tell();
9037 var name = this.reader.read_alpha();
9038 if (name != "del" && viml_eqregh(name, "\\v^d%[elete][lp]$")) {
9039 this.reader.seek_set(pos);
9040 var name = this.reader.getn(viml_len(name) - 1);
9041 }
9042 }
9043 if (name == "") {
9044 return NIL;
9045 }
9046 if (viml_has_key(this.find_command_cache, name)) {
9047 return this.find_command_cache[name];
9048 }
9049 var cmd = NIL;
9050 var __c4 = this.builtin_commands;
9051 for (var __i4 = 0; __i4 < __c4.length; ++__i4) {
9052 var x = __c4[__i4];
9053 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9054 delete cmd;
9055 var cmd = x;
9056 break;
9057 }
9058 }
9059 if (this.neovim) {
9060 var __c5 = this.neovim_additional_commands;
9061 for (var __i5 = 0; __i5 < __c5.length; ++__i5) {
9062 var x = __c5[__i5];
9063 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9064 delete cmd;
9065 var cmd = x;
9066 break;
9067 }
9068 }
9069 var __c6 = this.neovim_removed_commands;
9070 for (var __i6 = 0; __i6 < __c6.length; ++__i6) {
9071 var x = __c6[__i6];
9072 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
9073 delete cmd;
9074 var cmd = NIL;
9075 break;
9076 }
9077 }
9078 }
9079 // FIXME: user defined command
9080 if ((cmd === NIL || cmd.name == "Print") && viml_eqregh(name, "^[A-Z]")) {
9081 name += this.reader.read_alnum();
9082 delete cmd;
9083 var cmd = {"name":name, "flags":"USERCMD", "parser":"parse_cmd_usercmd"};
9084 }
9085 this.find_command_cache[name] = cmd;
9086 return cmd;
9087}
9088
9089// TODO:
9090VimLParser.prototype.parse_hashbang = function() {
9091 this.reader.getn(-1);
9092}
9093
9094// TODO:
9095// ++opt=val
9096VimLParser.prototype.parse_argopt = function() {
9097 while (this.reader.p(0) == "+" && this.reader.p(1) == "+") {
9098 var s = this.reader.peekn(20);
9099 if (viml_eqregh(s, "^++bin\\>")) {
9100 this.reader.getn(5);
9101 this.ea.force_bin = 1;
9102 }
9103 else if (viml_eqregh(s, "^++nobin\\>")) {
9104 this.reader.getn(7);
9105 this.ea.force_bin = 2;
9106 }
9107 else if (viml_eqregh(s, "^++edit\\>")) {
9108 this.reader.getn(6);
9109 this.ea.read_edit = 1;
9110 }
9111 else if (viml_eqregh(s, "^++ff=\\(dos\\|unix\\|mac\\)\\>")) {
9112 this.reader.getn(5);
9113 this.ea.force_ff = this.reader.read_alpha();
9114 }
9115 else if (viml_eqregh(s, "^++fileformat=\\(dos\\|unix\\|mac\\)\\>")) {
9116 this.reader.getn(13);
9117 this.ea.force_ff = this.reader.read_alpha();
9118 }
9119 else if (viml_eqregh(s, "^++enc=\\S")) {
9120 this.reader.getn(6);
9121 this.ea.force_enc = this.reader.read_nonwhite();
9122 }
9123 else if (viml_eqregh(s, "^++encoding=\\S")) {
9124 this.reader.getn(11);
9125 this.ea.force_enc = this.reader.read_nonwhite();
9126 }
9127 else if (viml_eqregh(s, "^++bad=\\(keep\\|drop\\|.\\)\\>")) {
9128 this.reader.getn(6);
9129 if (viml_eqregh(s, "^++bad=keep")) {
9130 this.ea.bad_char = this.reader.getn(4);
9131 }
9132 else if (viml_eqregh(s, "^++bad=drop")) {
9133 this.ea.bad_char = this.reader.getn(4);
9134 }
9135 else {
9136 this.ea.bad_char = this.reader.getn(1);
9137 }
9138 }
9139 else if (viml_eqregh(s, "^++")) {
9140 throw Err("E474: Invalid Argument", this.reader.getpos());
9141 }
9142 else {
9143 break;
9144 }
9145 this.reader.skip_white();
9146 }
9147}
9148
9149// TODO:
9150// +command
9151VimLParser.prototype.parse_argcmd = function() {
9152 if (this.reader.peekn(1) == "+") {
9153 this.reader.getn(1);
9154 if (this.reader.peekn(1) == " ") {
9155 this.ea.do_ecmd_cmd = "$";
9156 }
9157 else {
9158 this.ea.do_ecmd_cmd = this.read_cmdarg();
9159 }
9160 }
9161}
9162
9163VimLParser.prototype.read_cmdarg = function() {
9164 var r = "";
9165 while (TRUE) {
9166 var c = this.reader.peekn(1);
9167 if (c == "" || iswhite(c)) {
9168 break;
9169 }
9170 this.reader.getn(1);
9171 if (c == "\\") {
9172 var c = this.reader.getn(1);
9173 }
9174 r += c;
9175 }
9176 return r;
9177}
9178
9179VimLParser.prototype.parse_comment = function() {
9180 var npos = this.reader.getpos();
9181 var c = this.reader.get();
9182 if (c != "\"") {
9183 throw Err(viml_printf("unexpected character: %s", c), npos);
9184 }
9185 var node = Node(NODE_COMMENT);
9186 node.pos = npos;
9187 node.str = this.reader.getn(-1);
9188 this.add_node(node);
9189}
9190
9191VimLParser.prototype.parse_trail = function() {
9192 this.reader.skip_white();
9193 var c = this.reader.peek();
9194 if (c == "<EOF>") {
9195 // pass
9196 }
9197 else if (c == "<EOL>") {
9198 this.reader.get();
9199 }
9200 else if (c == "|") {
9201 this.reader.get();
9202 }
9203 else if (c == "\"") {
9204 this.parse_comment();
9205 this.reader.get();
9206 }
9207 else {
9208 throw Err(viml_printf("E488: Trailing characters: %s", c), this.reader.getpos());
9209 }
9210}
9211
9212// modifier or range only command line
9213VimLParser.prototype.parse_cmd_modifier_range = function() {
9214 var node = Node(NODE_EXCMD);
9215 node.pos = this.ea.cmdpos;
9216 node.ea = this.ea;
9217 node.str = this.reader.getstr(this.ea.linepos, this.reader.getpos());
9218 this.add_node(node);
9219}
9220
9221// TODO:
9222VimLParser.prototype.parse_cmd_common = function() {
9223 var end = this.reader.getpos();
9224 if (viml_eqregh(this.ea.cmd.flags, "\\<TRLBAR\\>") && !this.ea.usefilter) {
9225 var end = this.separate_nextcmd();
9226 }
9227 else if (this.ea.cmd.name == "!" || this.ea.cmd.name == "global" || this.ea.cmd.name == "vglobal" || this.ea.usefilter) {
9228 while (TRUE) {
9229 var end = this.reader.getpos();
9230 if (this.reader.getn(1) == "") {
9231 break;
9232 }
9233 }
9234 }
9235 else {
9236 while (TRUE) {
9237 var end = this.reader.getpos();
9238 if (this.reader.getn(1) == "") {
9239 break;
9240 }
9241 }
9242 }
9243 var node = Node(NODE_EXCMD);
9244 node.pos = this.ea.cmdpos;
9245 node.ea = this.ea;
9246 node.str = this.reader.getstr(this.ea.linepos, end);
9247 this.add_node(node);
9248}
9249
9250VimLParser.prototype.separate_nextcmd = function() {
9251 if (this.ea.cmd.name == "vimgrep" || this.ea.cmd.name == "vimgrepadd" || this.ea.cmd.name == "lvimgrep" || this.ea.cmd.name == "lvimgrepadd") {
9252 this.skip_vimgrep_pat();
9253 }
9254 var pc = "";
9255 var end = this.reader.getpos();
9256 var nospend = end;
9257 while (TRUE) {
9258 var end = this.reader.getpos();
9259 if (!iswhite(pc)) {
9260 var nospend = end;
9261 }
9262 var c = this.reader.peek();
9263 if (c == "<EOF>" || c == "<EOL>") {
9264 break;
9265 }
9266 else if (c == "\x16") {
9267 // <C-V>
9268 this.reader.get();
9269 var end = this.reader.getpos();
9270 var nospend = this.reader.getpos();
9271 var c = this.reader.peek();
9272 if (c == "<EOF>" || c == "<EOL>") {
9273 break;
9274 }
9275 this.reader.get();
9276 }
9277 else if (this.reader.peekn(2) == "`=" && viml_eqregh(this.ea.cmd.flags, "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>")) {
9278 this.reader.getn(2);
9279 this.parse_expr();
9280 var c = this.reader.peekn(1);
9281 if (c != "`") {
9282 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9283 }
9284 this.reader.getn(1);
9285 }
9286 else if (c == "|" || c == "\n" || c == "\"" && !viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>") && (this.ea.cmd.name != "@" && this.ea.cmd.name != "*" || this.reader.getpos() != this.ea.argpos) && (this.ea.cmd.name != "redir" || this.reader.getpos().i != this.ea.argpos.i + 1 || pc != "@")) {
9287 var has_cpo_bar = FALSE;
9288 // &cpoptions =~ 'b'
9289 if ((!has_cpo_bar || !viml_eqregh(this.ea.cmd.flags, "\\<USECTRLV\\>")) && pc == "\\") {
9290 this.reader.get();
9291 }
9292 else {
9293 break;
9294 }
9295 }
9296 else {
9297 this.reader.get();
9298 }
9299 var pc = c;
9300 }
9301 if (!viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>")) {
9302 var end = nospend;
9303 }
9304 return end;
9305}
9306
9307// FIXME
9308VimLParser.prototype.skip_vimgrep_pat = function() {
9309 if (this.reader.peekn(1) == "") {
9310 // pass
9311 }
9312 else if (isidc(this.reader.peekn(1))) {
9313 // :vimgrep pattern fname
9314 this.reader.read_nonwhite();
9315 }
9316 else {
9317 // :vimgrep /pattern/[g][j] fname
9318 var c = this.reader.getn(1);
9319 var __tmp = this.parse_pattern(c);
9320 var _ = __tmp[0];
9321 var endc = __tmp[1];
9322 if (c != endc) {
9323 return;
9324 }
9325 while (this.reader.p(0) == "g" || this.reader.p(0) == "j") {
9326 this.reader.getn(1);
9327 }
9328 }
9329}
9330
9331VimLParser.prototype.parse_cmd_append = function() {
9332 this.reader.setpos(this.ea.linepos);
9333 var cmdline = this.reader.readline();
9334 var lines = [cmdline];
9335 var m = ".";
9336 while (TRUE) {
9337 if (this.reader.peek() == "<EOF>") {
9338 break;
9339 }
9340 var line = this.reader.getn(-1);
9341 viml_add(lines, line);
9342 if (line == m) {
9343 break;
9344 }
9345 this.reader.get();
9346 }
9347 var node = Node(NODE_EXCMD);
9348 node.pos = this.ea.cmdpos;
9349 node.ea = this.ea;
9350 node.str = viml_join(lines, "\n");
9351 this.add_node(node);
9352}
9353
9354VimLParser.prototype.parse_cmd_insert = function() {
9355 this.parse_cmd_append();
9356}
9357
9358VimLParser.prototype.parse_cmd_loadkeymap = function() {
9359 this.reader.setpos(this.ea.linepos);
9360 var cmdline = this.reader.readline();
9361 var lines = [cmdline];
9362 while (TRUE) {
9363 if (this.reader.peek() == "<EOF>") {
9364 break;
9365 }
9366 var line = this.reader.readline();
9367 viml_add(lines, line);
9368 }
9369 var node = Node(NODE_EXCMD);
9370 node.pos = this.ea.cmdpos;
9371 node.ea = this.ea;
9372 node.str = viml_join(lines, "\n");
9373 this.add_node(node);
9374}
9375
9376VimLParser.prototype.parse_cmd_lua = function() {
9377 var lines = [];
9378 this.reader.skip_white();
9379 if (this.reader.peekn(2) == "<<") {
9380 this.reader.getn(2);
9381 this.reader.skip_white();
9382 var m = this.reader.readline();
9383 if (m == "") {
9384 var m = ".";
9385 }
9386 this.reader.setpos(this.ea.linepos);
9387 var cmdline = this.reader.getn(-1);
9388 var lines = [cmdline];
9389 this.reader.get();
9390 while (TRUE) {
9391 if (this.reader.peek() == "<EOF>") {
9392 break;
9393 }
9394 var line = this.reader.getn(-1);
9395 viml_add(lines, line);
9396 if (line == m) {
9397 break;
9398 }
9399 this.reader.get();
9400 }
9401 }
9402 else {
9403 this.reader.setpos(this.ea.linepos);
9404 var cmdline = this.reader.getn(-1);
9405 var lines = [cmdline];
9406 }
9407 var node = Node(NODE_EXCMD);
9408 node.pos = this.ea.cmdpos;
9409 node.ea = this.ea;
9410 node.str = viml_join(lines, "\n");
9411 this.add_node(node);
9412}
9413
9414VimLParser.prototype.parse_cmd_mzscheme = function() {
9415 this.parse_cmd_lua();
9416}
9417
9418VimLParser.prototype.parse_cmd_perl = function() {
9419 this.parse_cmd_lua();
9420}
9421
9422VimLParser.prototype.parse_cmd_python = function() {
9423 this.parse_cmd_lua();
9424}
9425
9426VimLParser.prototype.parse_cmd_python3 = function() {
9427 this.parse_cmd_lua();
9428}
9429
9430VimLParser.prototype.parse_cmd_ruby = function() {
9431 this.parse_cmd_lua();
9432}
9433
9434VimLParser.prototype.parse_cmd_tcl = function() {
9435 this.parse_cmd_lua();
9436}
9437
9438VimLParser.prototype.parse_cmd_finish = function() {
9439 this.parse_cmd_common();
9440 if (this.context[0].type == NODE_TOPLEVEL) {
9441 this.reader.seek_end(0);
9442 }
9443}
9444
9445// FIXME
9446VimLParser.prototype.parse_cmd_usercmd = function() {
9447 this.parse_cmd_common();
9448}
9449
9450VimLParser.prototype.parse_cmd_function = function() {
9451 var pos = this.reader.tell();
9452 this.reader.skip_white();
9453 // :function
9454 if (this.ends_excmds(this.reader.peek())) {
9455 this.reader.seek_set(pos);
9456 this.parse_cmd_common();
9457 return;
9458 }
9459 // :function /pattern
9460 if (this.reader.peekn(1) == "/") {
9461 this.reader.seek_set(pos);
9462 this.parse_cmd_common();
9463 return;
9464 }
9465 var left = this.parse_lvalue_func();
9466 this.reader.skip_white();
9467 if (left.type == NODE_IDENTIFIER) {
9468 var s = left.value;
9469 var ss = viml_split(s, "\\zs");
9470 if (ss[0] != "<" && ss[0] != "_" && !isupper(ss[0]) && viml_stridx(s, ":") == -1 && viml_stridx(s, "#") == -1) {
9471 throw Err(viml_printf("E128: Function name must start with a capital or contain a colon: %s", s), left.pos);
9472 }
9473 }
9474 // :function {name}
9475 if (this.reader.peekn(1) != "(") {
9476 this.reader.seek_set(pos);
9477 this.parse_cmd_common();
9478 return;
9479 }
9480 // :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
9481 var node = Node(NODE_FUNCTION);
9482 node.pos = this.ea.cmdpos;
9483 node.body = [];
9484 node.ea = this.ea;
9485 node.left = left;
9486 node.rlist = [];
9487 node.default_args = [];
9488 node.attr = {"range":0, "abort":0, "dict":0, "closure":0};
9489 node.endfunction = NIL;
9490 this.reader.getn(1);
9491 var tokenizer = new ExprTokenizer(this.reader);
9492 if (tokenizer.peek().type == TOKEN_PCLOSE) {
9493 tokenizer.get();
9494 }
9495 else {
9496 var named = {};
9497 while (TRUE) {
9498 var varnode = Node(NODE_IDENTIFIER);
9499 var token = tokenizer.get();
9500 if (token.type == TOKEN_IDENTIFIER) {
9501 if (!isargname(token.value) || token.value == "firstline" || token.value == "lastline") {
9502 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
9503 }
9504 else if (viml_has_key(named, token.value)) {
9505 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
9506 }
9507 named[token.value] = 1;
9508 varnode.pos = token.pos;
9509 varnode.value = token.value;
9510 viml_add(node.rlist, varnode);
9511 if (tokenizer.peek().type == TOKEN_EQ) {
9512 tokenizer.get();
9513 viml_add(node.default_args, this.parse_expr());
9514 }
9515 else if (viml_len(node.default_args) > 0) {
9516 throw Err("E989: Non-default argument follows default argument", varnode.pos);
9517 }
9518 // XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
9519 if (iswhite(this.reader.p(0)) && tokenizer.peek().type == TOKEN_COMMA) {
9520 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
9521 }
9522 var token = tokenizer.get();
9523 if (token.type == TOKEN_COMMA) {
9524 // XXX: Vim allows last comma. F(a, b, ) => OK
9525 if (tokenizer.peek().type == TOKEN_PCLOSE) {
9526 tokenizer.get();
9527 break;
9528 }
9529 }
9530 else if (token.type == TOKEN_PCLOSE) {
9531 break;
9532 }
9533 else {
9534 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9535 }
9536 }
9537 else if (token.type == TOKEN_DOTDOTDOT) {
9538 varnode.pos = token.pos;
9539 varnode.value = token.value;
9540 viml_add(node.rlist, varnode);
9541 var token = tokenizer.get();
9542 if (token.type == TOKEN_PCLOSE) {
9543 break;
9544 }
9545 else {
9546 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9547 }
9548 }
9549 else {
9550 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9551 }
9552 }
9553 }
9554 while (TRUE) {
9555 this.reader.skip_white();
9556 var epos = this.reader.getpos();
9557 var key = this.reader.read_alpha();
9558 if (key == "") {
9559 break;
9560 }
9561 else if (key == "range") {
9562 node.attr.range = TRUE;
9563 }
9564 else if (key == "abort") {
9565 node.attr.abort = TRUE;
9566 }
9567 else if (key == "dict") {
9568 node.attr.dict = TRUE;
9569 }
9570 else if (key == "closure") {
9571 node.attr.closure = TRUE;
9572 }
9573 else {
9574 throw Err(viml_printf("unexpected token: %s", key), epos);
9575 }
9576 }
9577 this.add_node(node);
9578 this.push_context(node);
9579}
9580
9581VimLParser.prototype.parse_cmd_endfunction = function() {
9582 this.check_missing_endif("ENDFUNCTION", this.ea.cmdpos);
9583 this.check_missing_endtry("ENDFUNCTION", this.ea.cmdpos);
9584 this.check_missing_endwhile("ENDFUNCTION", this.ea.cmdpos);
9585 this.check_missing_endfor("ENDFUNCTION", this.ea.cmdpos);
9586 if (this.context[0].type != NODE_FUNCTION) {
9587 throw Err("E193: :endfunction not inside a function", this.ea.cmdpos);
9588 }
9589 this.reader.getn(-1);
9590 var node = Node(NODE_ENDFUNCTION);
9591 node.pos = this.ea.cmdpos;
9592 node.ea = this.ea;
9593 this.context[0].endfunction = node;
9594 this.pop_context();
9595}
9596
9597VimLParser.prototype.parse_cmd_delfunction = function() {
9598 var node = Node(NODE_DELFUNCTION);
9599 node.pos = this.ea.cmdpos;
9600 node.ea = this.ea;
9601 node.left = this.parse_lvalue_func();
9602 this.add_node(node);
9603}
9604
9605VimLParser.prototype.parse_cmd_return = function() {
9606 if (this.find_context(NODE_FUNCTION) == -1) {
9607 throw Err("E133: :return not inside a function", this.ea.cmdpos);
9608 }
9609 var node = Node(NODE_RETURN);
9610 node.pos = this.ea.cmdpos;
9611 node.ea = this.ea;
9612 node.left = NIL;
9613 this.reader.skip_white();
9614 var c = this.reader.peek();
9615 if (c == "\"" || !this.ends_excmds(c)) {
9616 node.left = this.parse_expr();
9617 }
9618 this.add_node(node);
9619}
9620
9621VimLParser.prototype.parse_cmd_call = function() {
9622 var node = Node(NODE_EXCALL);
9623 node.pos = this.ea.cmdpos;
9624 node.ea = this.ea;
9625 this.reader.skip_white();
9626 var c = this.reader.peek();
9627 if (this.ends_excmds(c)) {
9628 throw Err("E471: Argument required", this.reader.getpos());
9629 }
9630 node.left = this.parse_expr();
9631 if (node.left.type != NODE_CALL) {
9632 throw Err("Not a function call", node.left.pos);
9633 }
9634 this.add_node(node);
9635}
9636
9637VimLParser.prototype.parse_heredoc = function() {
9638 var node = Node(NODE_HEREDOC);
9639 node.pos = this.ea.cmdpos;
9640 node.op = "";
9641 node.rlist = [];
9642 node.body = [];
9643 while (TRUE) {
9644 this.reader.skip_white();
9645 var key = this.reader.read_word();
9646 if (key == "") {
9647 break;
9648 }
9649 if (!islower(key[0])) {
9650 node.op = key;
9651 break;
9652 }
9653 else {
9654 viml_add(node.rlist, key);
9655 }
9656 }
9657 if (node.op == "") {
9658 throw Err("E172: Missing marker", this.reader.getpos());
9659 }
9660 this.parse_trail();
9661 while (TRUE) {
9662 if (this.reader.peek() == "<EOF>") {
9663 break;
9664 }
9665 var line = this.reader.getn(-1);
9666 if (line == node.op) {
9667 return node;
9668 }
9669 viml_add(node.body, line);
9670 this.reader.get();
9671 }
9672 throw Err(viml_printf("E990: Missing end marker '%s'", node.op), this.reader.getpos());
9673}
9674
9675VimLParser.prototype.parse_cmd_let = function() {
9676 var pos = this.reader.tell();
9677 this.reader.skip_white();
9678 // :let
9679 if (this.ends_excmds(this.reader.peek())) {
9680 this.reader.seek_set(pos);
9681 this.parse_cmd_common();
9682 return;
9683 }
9684 var lhs = this.parse_letlhs();
9685 this.reader.skip_white();
9686 var s1 = this.reader.peekn(1);
9687 var s2 = this.reader.peekn(2);
9688 // TODO check scriptversion?
9689 if (s2 == "..") {
9690 var s2 = this.reader.peekn(3);
9691 }
9692 else if (s2 == "=<") {
9693 var s2 = this.reader.peekn(3);
9694 }
9695 // :let {var-name} ..
9696 if (this.ends_excmds(s1) || s2 != "+=" && s2 != "-=" && s2 != ".=" && s2 != "..=" && s2 != "*=" && s2 != "/=" && s2 != "%=" && s2 != "=<<" && s1 != "=") {
9697 this.reader.seek_set(pos);
9698 this.parse_cmd_common();
9699 return;
9700 }
9701 // :let left op right
9702 var node = Node(NODE_LET);
9703 node.pos = this.ea.cmdpos;
9704 node.ea = this.ea;
9705 node.op = "";
9706 node.left = lhs.left;
9707 node.list = lhs.list;
9708 node.rest = lhs.rest;
9709 node.right = NIL;
9710 if (s2 == "+=" || s2 == "-=" || s2 == ".=" || s2 == "..=" || s2 == "*=" || s2 == "/=" || s2 == "%=") {
9711 this.reader.getn(viml_len(s2));
9712 node.op = s2;
9713 }
9714 else if (s2 == "=<<") {
9715 this.reader.getn(viml_len(s2));
9716 this.reader.skip_white();
9717 node.op = s2;
9718 node.right = this.parse_heredoc();
9719 this.add_node(node);
9720 return;
9721 }
9722 else if (s1 == "=") {
9723 this.reader.getn(1);
9724 node.op = s1;
9725 }
9726 else {
9727 throw "NOT REACHED";
9728 }
9729 node.right = this.parse_expr();
9730 this.add_node(node);
9731}
9732
9733VimLParser.prototype.parse_cmd_const = function() {
9734 var pos = this.reader.tell();
9735 this.reader.skip_white();
9736 // :const
9737 if (this.ends_excmds(this.reader.peek())) {
9738 this.reader.seek_set(pos);
9739 this.parse_cmd_common();
9740 return;
9741 }
9742 var lhs = this.parse_constlhs();
9743 this.reader.skip_white();
9744 var s1 = this.reader.peekn(1);
9745 // :const {var-name}
9746 if (this.ends_excmds(s1) || s1 != "=") {
9747 this.reader.seek_set(pos);
9748 this.parse_cmd_common();
9749 return;
9750 }
9751 // :const left op right
9752 var node = Node(NODE_CONST);
9753 node.pos = this.ea.cmdpos;
9754 node.ea = this.ea;
9755 this.reader.getn(1);
9756 node.op = s1;
9757 node.left = lhs.left;
9758 node.list = lhs.list;
9759 node.rest = lhs.rest;
9760 node.right = this.parse_expr();
9761 this.add_node(node);
9762}
9763
9764VimLParser.prototype.parse_cmd_unlet = function() {
9765 var node = Node(NODE_UNLET);
9766 node.pos = this.ea.cmdpos;
9767 node.ea = this.ea;
9768 node.list = this.parse_lvaluelist();
9769 this.add_node(node);
9770}
9771
9772VimLParser.prototype.parse_cmd_lockvar = function() {
9773 var node = Node(NODE_LOCKVAR);
9774 node.pos = this.ea.cmdpos;
9775 node.ea = this.ea;
9776 node.depth = NIL;
9777 node.list = [];
9778 this.reader.skip_white();
9779 if (isdigit(this.reader.peekn(1))) {
9780 node.depth = viml_str2nr(this.reader.read_digit(), 10);
9781 }
9782 node.list = this.parse_lvaluelist();
9783 this.add_node(node);
9784}
9785
9786VimLParser.prototype.parse_cmd_unlockvar = function() {
9787 var node = Node(NODE_UNLOCKVAR);
9788 node.pos = this.ea.cmdpos;
9789 node.ea = this.ea;
9790 node.depth = NIL;
9791 node.list = [];
9792 this.reader.skip_white();
9793 if (isdigit(this.reader.peekn(1))) {
9794 node.depth = viml_str2nr(this.reader.read_digit(), 10);
9795 }
9796 node.list = this.parse_lvaluelist();
9797 this.add_node(node);
9798}
9799
9800VimLParser.prototype.parse_cmd_if = function() {
9801 var node = Node(NODE_IF);
9802 node.pos = this.ea.cmdpos;
9803 node.body = [];
9804 node.ea = this.ea;
9805 node.cond = this.parse_expr();
9806 node.elseif = [];
9807 node._else = NIL;
9808 node.endif = NIL;
9809 this.add_node(node);
9810 this.push_context(node);
9811}
9812
9813VimLParser.prototype.parse_cmd_elseif = function() {
9814 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9815 throw Err("E582: :elseif without :if", this.ea.cmdpos);
9816 }
9817 if (this.context[0].type != NODE_IF) {
9818 this.pop_context();
9819 }
9820 var node = Node(NODE_ELSEIF);
9821 node.pos = this.ea.cmdpos;
9822 node.body = [];
9823 node.ea = this.ea;
9824 node.cond = this.parse_expr();
9825 viml_add(this.context[0].elseif, node);
9826 this.push_context(node);
9827}
9828
9829VimLParser.prototype.parse_cmd_else = function() {
9830 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9831 throw Err("E581: :else without :if", this.ea.cmdpos);
9832 }
9833 if (this.context[0].type != NODE_IF) {
9834 this.pop_context();
9835 }
9836 var node = Node(NODE_ELSE);
9837 node.pos = this.ea.cmdpos;
9838 node.body = [];
9839 node.ea = this.ea;
9840 this.context[0]._else = node;
9841 this.push_context(node);
9842}
9843
9844VimLParser.prototype.parse_cmd_endif = function() {
9845 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF && this.context[0].type != NODE_ELSE) {
9846 throw Err("E580: :endif without :if", this.ea.cmdpos);
9847 }
9848 if (this.context[0].type != NODE_IF) {
9849 this.pop_context();
9850 }
9851 var node = Node(NODE_ENDIF);
9852 node.pos = this.ea.cmdpos;
9853 node.ea = this.ea;
9854 this.context[0].endif = node;
9855 this.pop_context();
9856}
9857
9858VimLParser.prototype.parse_cmd_while = function() {
9859 var node = Node(NODE_WHILE);
9860 node.pos = this.ea.cmdpos;
9861 node.body = [];
9862 node.ea = this.ea;
9863 node.cond = this.parse_expr();
9864 node.endwhile = NIL;
9865 this.add_node(node);
9866 this.push_context(node);
9867}
9868
9869VimLParser.prototype.parse_cmd_endwhile = function() {
9870 if (this.context[0].type != NODE_WHILE) {
9871 throw Err("E588: :endwhile without :while", this.ea.cmdpos);
9872 }
9873 var node = Node(NODE_ENDWHILE);
9874 node.pos = this.ea.cmdpos;
9875 node.ea = this.ea;
9876 this.context[0].endwhile = node;
9877 this.pop_context();
9878}
9879
9880VimLParser.prototype.parse_cmd_for = function() {
9881 var node = Node(NODE_FOR);
9882 node.pos = this.ea.cmdpos;
9883 node.body = [];
9884 node.ea = this.ea;
9885 node.left = NIL;
9886 node.right = NIL;
9887 node.endfor = NIL;
9888 var lhs = this.parse_letlhs();
9889 node.left = lhs.left;
9890 node.list = lhs.list;
9891 node.rest = lhs.rest;
9892 this.reader.skip_white();
9893 var epos = this.reader.getpos();
9894 if (this.reader.read_alpha() != "in") {
9895 throw Err("Missing \"in\" after :for", epos);
9896 }
9897 node.right = this.parse_expr();
9898 this.add_node(node);
9899 this.push_context(node);
9900}
9901
9902VimLParser.prototype.parse_cmd_endfor = function() {
9903 if (this.context[0].type != NODE_FOR) {
9904 throw Err("E588: :endfor without :for", this.ea.cmdpos);
9905 }
9906 var node = Node(NODE_ENDFOR);
9907 node.pos = this.ea.cmdpos;
9908 node.ea = this.ea;
9909 this.context[0].endfor = node;
9910 this.pop_context();
9911}
9912
9913VimLParser.prototype.parse_cmd_continue = function() {
9914 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9915 throw Err("E586: :continue without :while or :for", this.ea.cmdpos);
9916 }
9917 var node = Node(NODE_CONTINUE);
9918 node.pos = this.ea.cmdpos;
9919 node.ea = this.ea;
9920 this.add_node(node);
9921}
9922
9923VimLParser.prototype.parse_cmd_break = function() {
9924 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9925 throw Err("E587: :break without :while or :for", this.ea.cmdpos);
9926 }
9927 var node = Node(NODE_BREAK);
9928 node.pos = this.ea.cmdpos;
9929 node.ea = this.ea;
9930 this.add_node(node);
9931}
9932
9933VimLParser.prototype.parse_cmd_try = function() {
9934 var node = Node(NODE_TRY);
9935 node.pos = this.ea.cmdpos;
9936 node.body = [];
9937 node.ea = this.ea;
9938 node.catch = [];
9939 node._finally = NIL;
9940 node.endtry = NIL;
9941 this.add_node(node);
9942 this.push_context(node);
9943}
9944
9945VimLParser.prototype.parse_cmd_catch = function() {
9946 if (this.context[0].type == NODE_FINALLY) {
9947 throw Err("E604: :catch after :finally", this.ea.cmdpos);
9948 }
9949 else if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
9950 throw Err("E603: :catch without :try", this.ea.cmdpos);
9951 }
9952 if (this.context[0].type != NODE_TRY) {
9953 this.pop_context();
9954 }
9955 var node = Node(NODE_CATCH);
9956 node.pos = this.ea.cmdpos;
9957 node.body = [];
9958 node.ea = this.ea;
9959 node.pattern = NIL;
9960 this.reader.skip_white();
9961 if (!this.ends_excmds(this.reader.peek())) {
9962 var __tmp = this.parse_pattern(this.reader.get());
9963 node.pattern = __tmp[0];
9964 var _ = __tmp[1];
9965 }
9966 viml_add(this.context[0].catch, node);
9967 this.push_context(node);
9968}
9969
9970VimLParser.prototype.parse_cmd_finally = function() {
9971 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
9972 throw Err("E606: :finally without :try", this.ea.cmdpos);
9973 }
9974 if (this.context[0].type != NODE_TRY) {
9975 this.pop_context();
9976 }
9977 var node = Node(NODE_FINALLY);
9978 node.pos = this.ea.cmdpos;
9979 node.body = [];
9980 node.ea = this.ea;
9981 this.context[0]._finally = node;
9982 this.push_context(node);
9983}
9984
9985VimLParser.prototype.parse_cmd_endtry = function() {
9986 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH && this.context[0].type != NODE_FINALLY) {
9987 throw Err("E602: :endtry without :try", this.ea.cmdpos);
9988 }
9989 if (this.context[0].type != NODE_TRY) {
9990 this.pop_context();
9991 }
9992 var node = Node(NODE_ENDTRY);
9993 node.pos = this.ea.cmdpos;
9994 node.ea = this.ea;
9995 this.context[0].endtry = node;
9996 this.pop_context();
9997}
9998
9999VimLParser.prototype.parse_cmd_throw = function() {
10000 var node = Node(NODE_THROW);
10001 node.pos = this.ea.cmdpos;
10002 node.ea = this.ea;
10003 node.left = this.parse_expr();
10004 this.add_node(node);
10005}
10006
10007VimLParser.prototype.parse_cmd_eval = function() {
10008 var node = Node(NODE_EVAL);
10009 node.pos = this.ea.cmdpos;
10010 node.ea = this.ea;
10011 node.left = this.parse_expr();
10012 this.add_node(node);
10013}
10014
10015VimLParser.prototype.parse_cmd_echo = function() {
10016 var node = Node(NODE_ECHO);
10017 node.pos = this.ea.cmdpos;
10018 node.ea = this.ea;
10019 node.list = this.parse_exprlist();
10020 this.add_node(node);
10021}
10022
10023VimLParser.prototype.parse_cmd_echon = function() {
10024 var node = Node(NODE_ECHON);
10025 node.pos = this.ea.cmdpos;
10026 node.ea = this.ea;
10027 node.list = this.parse_exprlist();
10028 this.add_node(node);
10029}
10030
10031VimLParser.prototype.parse_cmd_echohl = function() {
10032 var node = Node(NODE_ECHOHL);
10033 node.pos = this.ea.cmdpos;
10034 node.ea = this.ea;
10035 node.str = "";
10036 while (!this.ends_excmds(this.reader.peek())) {
10037 node.str += this.reader.get();
10038 }
10039 this.add_node(node);
10040}
10041
10042VimLParser.prototype.parse_cmd_echomsg = function() {
10043 var node = Node(NODE_ECHOMSG);
10044 node.pos = this.ea.cmdpos;
10045 node.ea = this.ea;
10046 node.list = this.parse_exprlist();
10047 this.add_node(node);
10048}
10049
10050VimLParser.prototype.parse_cmd_echoerr = function() {
10051 var node = Node(NODE_ECHOERR);
10052 node.pos = this.ea.cmdpos;
10053 node.ea = this.ea;
10054 node.list = this.parse_exprlist();
10055 this.add_node(node);
10056}
10057
10058VimLParser.prototype.parse_cmd_execute = function() {
10059 var node = Node(NODE_EXECUTE);
10060 node.pos = this.ea.cmdpos;
10061 node.ea = this.ea;
10062 node.list = this.parse_exprlist();
10063 this.add_node(node);
10064}
10065
10066VimLParser.prototype.parse_expr = function() {
10067 return new ExprParser(this.reader).parse();
10068}
10069
10070VimLParser.prototype.parse_exprlist = function() {
10071 var list = [];
10072 while (TRUE) {
10073 this.reader.skip_white();
10074 var c = this.reader.peek();
10075 if (c != "\"" && this.ends_excmds(c)) {
10076 break;
10077 }
10078 var node = this.parse_expr();
10079 viml_add(list, node);
10080 }
10081 return list;
10082}
10083
10084VimLParser.prototype.parse_lvalue_func = function() {
10085 var p = new LvalueParser(this.reader);
10086 var node = p.parse();
10087 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME || node.type == NODE_SUBSCRIPT || node.type == NODE_DOT || node.type == NODE_OPTION || node.type == NODE_ENV || node.type == NODE_REG) {
10088 return node;
10089 }
10090 throw Err("Invalid Expression", node.pos);
10091}
10092
10093// FIXME:
10094VimLParser.prototype.parse_lvalue = function() {
10095 var p = new LvalueParser(this.reader);
10096 var node = p.parse();
10097 if (node.type == NODE_IDENTIFIER) {
10098 if (!isvarname(node.value)) {
10099 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
10100 }
10101 }
10102 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME || node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT || node.type == NODE_OPTION || node.type == NODE_ENV || node.type == NODE_REG) {
10103 return node;
10104 }
10105 throw Err("Invalid Expression", node.pos);
10106}
10107
10108// TODO: merge with s:VimLParser.parse_lvalue()
10109VimLParser.prototype.parse_constlvalue = function() {
10110 var p = new LvalueParser(this.reader);
10111 var node = p.parse();
10112 if (node.type == NODE_IDENTIFIER) {
10113 if (!isvarname(node.value)) {
10114 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
10115 }
10116 }
10117 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME) {
10118 return node;
10119 }
10120 else if (node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT) {
10121 throw Err("E996: Cannot lock a list or dict", node.pos);
10122 }
10123 else if (node.type == NODE_OPTION) {
10124 throw Err("E996: Cannot lock an option", node.pos);
10125 }
10126 else if (node.type == NODE_ENV) {
10127 throw Err("E996: Cannot lock an environment variable", node.pos);
10128 }
10129 else if (node.type == NODE_REG) {
10130 throw Err("E996: Cannot lock a register", node.pos);
10131 }
10132 throw Err("Invalid Expression", node.pos);
10133}
10134
10135VimLParser.prototype.parse_lvaluelist = function() {
10136 var list = [];
10137 var node = this.parse_expr();
10138 viml_add(list, node);
10139 while (TRUE) {
10140 this.reader.skip_white();
10141 if (this.ends_excmds(this.reader.peek())) {
10142 break;
10143 }
10144 var node = this.parse_lvalue();
10145 viml_add(list, node);
10146 }
10147 return list;
10148}
10149
10150// FIXME:
10151VimLParser.prototype.parse_letlhs = function() {
10152 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
10153 var tokenizer = new ExprTokenizer(this.reader);
10154 if (tokenizer.peek().type == TOKEN_SQOPEN) {
10155 tokenizer.get();
10156 lhs.list = [];
10157 while (TRUE) {
10158 var node = this.parse_lvalue();
10159 viml_add(lhs.list, node);
10160 var token = tokenizer.get();
10161 if (token.type == TOKEN_SQCLOSE) {
10162 break;
10163 }
10164 else if (token.type == TOKEN_COMMA) {
10165 continue;
10166 }
10167 else if (token.type == TOKEN_SEMICOLON) {
10168 var node = this.parse_lvalue();
10169 lhs.rest = node;
10170 var token = tokenizer.get();
10171 if (token.type == TOKEN_SQCLOSE) {
10172 break;
10173 }
10174 else {
10175 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10176 }
10177 }
10178 else {
10179 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10180 }
10181 }
10182 }
10183 else {
10184 lhs.left = this.parse_lvalue();
10185 }
10186 return lhs;
10187}
10188
10189// TODO: merge with s:VimLParser.parse_letlhs() ?
10190VimLParser.prototype.parse_constlhs = function() {
10191 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
10192 var tokenizer = new ExprTokenizer(this.reader);
10193 if (tokenizer.peek().type == TOKEN_SQOPEN) {
10194 tokenizer.get();
10195 lhs.list = [];
10196 while (TRUE) {
10197 var node = this.parse_lvalue();
10198 viml_add(lhs.list, node);
10199 var token = tokenizer.get();
10200 if (token.type == TOKEN_SQCLOSE) {
10201 break;
10202 }
10203 else if (token.type == TOKEN_COMMA) {
10204 continue;
10205 }
10206 else if (token.type == TOKEN_SEMICOLON) {
10207 var node = this.parse_lvalue();
10208 lhs.rest = node;
10209 var token = tokenizer.get();
10210 if (token.type == TOKEN_SQCLOSE) {
10211 break;
10212 }
10213 else {
10214 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10215 }
10216 }
10217 else {
10218 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
10219 }
10220 }
10221 }
10222 else {
10223 lhs.left = this.parse_constlvalue();
10224 }
10225 return lhs;
10226}
10227
10228VimLParser.prototype.ends_excmds = function(c) {
10229 return c == "" || c == "|" || c == "\"" || c == "<EOF>" || c == "<EOL>";
10230}
10231
10232// FIXME: validate argument
10233VimLParser.prototype.parse_wincmd = function() {
10234 var c = this.reader.getn(1);
10235 if (c == "") {
10236 throw Err("E471: Argument required", this.reader.getpos());
10237 }
10238 else if (c == "g" || c == "\x07") {
10239 // <C-G>
10240 var c2 = this.reader.getn(1);
10241 if (c2 == "" || iswhite(c2)) {
10242 throw Err("E474: Invalid Argument", this.reader.getpos());
10243 }
10244 }
10245 var end = this.reader.getpos();
10246 this.reader.skip_white();
10247 if (!this.ends_excmds(this.reader.peek())) {
10248 throw Err("E474: Invalid Argument", this.reader.getpos());
10249 }
10250 var node = Node(NODE_EXCMD);
10251 node.pos = this.ea.cmdpos;
10252 node.ea = this.ea;
10253 node.str = this.reader.getstr(this.ea.linepos, end);
10254 this.add_node(node);
10255}
10256
10257// FIXME: validate argument
10258VimLParser.prototype.parse_cmd_syntax = function() {
10259 var end = this.reader.getpos();
10260 while (TRUE) {
10261 var end = this.reader.getpos();
10262 var c = this.reader.peek();
10263 if (c == "/" || c == "'" || c == "\"") {
10264 this.reader.getn(1);
10265 this.parse_pattern(c);
10266 }
10267 else if (c == "=") {
10268 this.reader.getn(1);
10269 this.parse_pattern(" ");
10270 }
10271 else if (this.ends_excmds(c)) {
10272 break;
10273 }
10274 this.reader.getn(1);
10275 }
10276 var node = Node(NODE_EXCMD);
10277 node.pos = this.ea.cmdpos;
10278 node.ea = this.ea;
10279 node.str = this.reader.getstr(this.ea.linepos, end);
10280 this.add_node(node);
10281}
10282
10283VimLParser.prototype.neovim_additional_commands = [{"name":"rshada", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wshada", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}];
10284VimLParser.prototype.neovim_removed_commands = [{"name":"Print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"fixdel", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"helpfind", "minlen":5, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"open", "minlen":1, "flags":"RANGE|BANG|EXTRA", "parser":"parse_cmd_common"}, {"name":"shell", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tearoff", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"gvim", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}];
10285// To find new builtin_commands, run the below script.
10286// $ scripts/update_builtin_commands.sh /path/to/vim/src/ex_cmds.h
10287VimLParser.prototype.builtin_commands = [{"name":"append", "minlen":1, "flags":"BANG|RANGE|ZEROR|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_append"}, {"name":"abbreviate", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"abclear", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"aboveleft", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"all", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"amenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"anoremenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"args", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argadd", "minlen":4, "flags":"BANG|NEEDARG|RANGE|NOTADR|ZEROR|FILES|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argdelete", "minlen":4, "flags":"BANG|RANGE|NOTADR|FILES|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argedit", "minlen":4, "flags":"BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argdo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"argglobal", "minlen":4, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"arglocal", "minlen":4, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argument", "minlen":4, "flags":"BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ascii", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"autocmd", "minlen":2, "flags":"BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"augroup", "minlen":3, "flags":"BANG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"aunmenu", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"buffer", "minlen":1, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bNext", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ball", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"badd", "minlen":3, "flags":"NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bdelete", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"behave", "minlen":2, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"belowright", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"bfirst", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"blast", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bmodified", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bnext", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"botright", "minlen":2, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"bprevious", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"brewind", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"break", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_break"}, {"name":"breakadd", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"breakdel", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"breaklist", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"browse", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bufdo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"buffers", "minlen":7, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bunload", "minlen":3, "flags":"BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bwipeout", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"change", "minlen":1, "flags":"BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"cNext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cNfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cabbrev", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cabclear", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"caddbuffer", "minlen":3, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"caddexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"caddfile", "minlen":5, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"call", "minlen":3, "flags":"RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_call"}, {"name":"catch", "minlen":3, "flags":"EXTRA|SBOXOK|CMDWIN", "parser":"parse_cmd_catch"}, {"name":"cbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cc", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cclose", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cd", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"center", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"cexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cfile", "minlen":2, "flags":"TRLBAR|FILE1|BANG", "parser":"parse_cmd_common"}, {"name":"cfirst", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cgetbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cgetexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cgetfile", "minlen":2, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"changes", "minlen":7, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"chdir", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"checkpath", "minlen":3, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"checktime", "minlen":6, "flags":"RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"clist", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"clast", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"close", "minlen":3, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cnewer", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cnfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cnoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnoreabbrev", "minlen":6, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"copy", "minlen":2, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"colder", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"colorscheme", "minlen":4, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"command", "minlen":3, "flags":"EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"comclear", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"compiler", "minlen":4, "flags":"BANG|TRLBAR|WORD1|CMDWIN", "parser":"parse_cmd_common"}, {"name":"continue", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_continue"}, {"name":"confirm", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"copen", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cprevious", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cpfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cquit", "minlen":2, "flags":"TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"crewind", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cscope", "minlen":2, "flags":"EXTRA|NOTRLCOM|XFILE", "parser":"parse_cmd_common"}, {"name":"cstag", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"cunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cunabbrev", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cwindow", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"delete", "minlen":1, "flags":"RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"delmarks", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"debug", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"debuggreedy", "minlen":6, "flags":"RANGE|NOTADR|ZEROR|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"delcommand", "minlen":4, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"delfunction", "minlen":4, "flags":"BANG|NEEDARG|WORD1|CMDWIN", "parser":"parse_cmd_delfunction"}, {"name":"diffupdate", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffget", "minlen":5, "flags":"RANGE|EXTRA|TRLBAR|MODIFY", "parser":"parse_cmd_common"}, {"name":"diffoff", "minlen":5, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffpatch", "minlen":5, "flags":"EXTRA|FILE1|TRLBAR|MODIFY", "parser":"parse_cmd_common"}, {"name":"diffput", "minlen":6, "flags":"RANGE|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffsplit", "minlen":5, "flags":"EXTRA|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffthis", "minlen":5, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"digraphs", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"display", "minlen":2, "flags":"EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"djump", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"dlist", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"doautocmd", "minlen":2, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"doautoall", "minlen":7, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"drop", "minlen":2, "flags":"FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"dsearch", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"dsplit", "minlen":3, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"edit", "minlen":1, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"earlier", "minlen":2, "flags":"TRLBAR|EXTRA|NOSPC|CMDWIN", "parser":"parse_cmd_common"}, {"name":"echo", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echo"}, {"name":"echoerr", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echoerr"}, {"name":"echohl", "minlen":5, "flags":"EXTRA|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_echohl"}, {"name":"echomsg", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echomsg"}, {"name":"echon", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echon"}, {"name":"else", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_else"}, {"name":"elseif", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_elseif"}, {"name":"emenu", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|NOTADR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"endif", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endif"}, {"name":"endfor", "minlen":5, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endfor"}, {"name":"endfunction", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_endfunction"}, {"name":"endtry", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endtry"}, {"name":"endwhile", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endwhile"}, {"name":"enew", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"eval", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_eval"}, {"name":"ex", "minlen":2, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"execute", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_execute"}, {"name":"exit", "minlen":3, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"exusage", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"file", "minlen":1, "flags":"RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"files", "minlen":5, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"filetype", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"find", "minlen":3, "flags":"RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"finally", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_finally"}, {"name":"finish", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_finish"}, {"name":"first", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"fixdel", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"fold", "minlen":2, "flags":"RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"foldclose", "minlen":5, "flags":"RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"folddoopen", "minlen":5, "flags":"RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"folddoclosed", "minlen":7, "flags":"RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"foldopen", "minlen":5, "flags":"RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"for", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_for"}, {"name":"function", "minlen":2, "flags":"EXTRA|BANG|CMDWIN", "parser":"parse_cmd_function"}, {"name":"global", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"goto", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"grep", "minlen":2, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"grepadd", "minlen":5, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"gui", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"gvim", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"hardcopy", "minlen":2, "flags":"RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG", "parser":"parse_cmd_common"}, {"name":"help", "minlen":1, "flags":"BANG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"helpfind", "minlen":5, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"helpgrep", "minlen":5, "flags":"EXTRA|NOTRLCOM|NEEDARG", "parser":"parse_cmd_common"}, {"name":"helptags", "minlen":5, "flags":"NEEDARG|FILES|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"highlight", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"hide", "minlen":3, "flags":"BANG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"history", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"insert", "minlen":1, "flags":"BANG|RANGE|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_insert"}, {"name":"iabbrev", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iabclear", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"if", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_if"}, {"name":"ijump", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"ilist", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoreabbrev", "minlen":6, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"intro", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"isearch", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"isplit", "minlen":3, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"iunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iunabbrev", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"join", "minlen":1, "flags":"BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"jumps", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"k", "minlen":1, "flags":"RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"keepalt", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keepmarks", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keepjumps", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keeppatterns", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"lNext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lNfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"list", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"laddexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"laddbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"laddfile", "minlen":5, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"last", "minlen":2, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"language", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"later", "minlen":3, "flags":"TRLBAR|EXTRA|NOSPC|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lcd", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lchdir", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lclose", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lcscope", "minlen":3, "flags":"EXTRA|NOTRLCOM|XFILE", "parser":"parse_cmd_common"}, {"name":"left", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"leftabove", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"let", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_let"}, {"name":"const", "minlen":4, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_const"}, {"name":"lexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lfile", "minlen":2, "flags":"TRLBAR|FILE1|BANG", "parser":"parse_cmd_common"}, {"name":"lfirst", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lgetbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lgetexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lgetfile", "minlen":2, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"lgrep", "minlen":3, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lgrepadd", "minlen":6, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lhelpgrep", "minlen":2, "flags":"EXTRA|NOTRLCOM|NEEDARG", "parser":"parse_cmd_common"}, {"name":"ll", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"llast", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"list", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lmake", "minlen":4, "flags":"BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lnext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lnewer", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lnfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"loadkeymap", "minlen":5, "flags":"CMDWIN", "parser":"parse_cmd_loadkeymap"}, {"name":"loadview", "minlen":2, "flags":"FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lockmarks", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"lockvar", "minlen":5, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_lockvar"}, {"name":"lolder", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lopen", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lprevious", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lpfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lrewind", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"ls", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ltag", "minlen":2, "flags":"NOTADR|TRLBAR|BANG|WORD1", "parser":"parse_cmd_common"}, {"name":"lunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lua", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_lua"}, {"name":"luado", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"luafile", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lvimgrep", "minlen":2, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lvimgrepadd", "minlen":9, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lwindow", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"move", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"mark", "minlen":2, "flags":"RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"make", "minlen":3, "flags":"BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"map", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mapclear", "minlen":4, "flags":"EXTRA|BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"marks", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"match", "minlen":3, "flags":"RANGE|NOTADR|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"menu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"menutranslate", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"messages", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mkexrc", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mksession", "minlen":3, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"mkspell", "minlen":4, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"mkvimrc", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mkview", "minlen":5, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"mode", "minlen":3, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mzscheme", "minlen":2, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK", "parser":"parse_cmd_mzscheme"}, {"name":"mzfile", "minlen":3, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nbclose", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nbkey", "minlen":2, "flags":"EXTRA|NOTADR|NEEDARG", "parser":"parse_cmd_common"}, {"name":"nbstart", "minlen":3, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"next", "minlen":1, "flags":"RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"new", "minlen":3, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"nmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noautocmd", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"noremap", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nohlsearch", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noreabbrev", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noremenu", "minlen":6, "flags":"RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"normal", "minlen":4, "flags":"RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"number", "minlen":2, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nunmap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"oldfiles", "minlen":2, "flags":"BANG|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"open", "minlen":1, "flags":"RANGE|BANG|EXTRA", "parser":"parse_cmd_common"}, {"name":"omap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"omapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"omenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"only", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"onoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"onoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"options", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"ounmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ounmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ownsyntax", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pclose", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"pedit", "minlen":3, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"perl", "minlen":2, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_perl"}, {"name":"print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"profdel", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"profile", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"promptfind", "minlen":3, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"promptrepl", "minlen":7, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"perldo", "minlen":5, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pop", "minlen":2, "flags":"RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"popup", "minlen":4, "flags":"NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ppop", "minlen":2, "flags":"RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"preserve", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"previous", "minlen":4, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"psearch", "minlen":2, "flags":"BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA", "parser":"parse_cmd_common"}, {"name":"ptag", "minlen":2, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptNext", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptfirst", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptjump", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"ptlast", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ptnext", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptprevious", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptrewind", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptselect", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"put", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"pwd", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"py3", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python3"}, {"name":"python3", "minlen":7, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python3"}, {"name":"py3file", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"python", "minlen":2, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python"}, {"name":"pyfile", "minlen":3, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pydo", "minlen":3, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"py3do", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"quit", "minlen":1, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"quitall", "minlen":5, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"qall", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"read", "minlen":1, "flags":"BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"recover", "minlen":3, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"redo", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redir", "minlen":4, "flags":"BANG|FILES|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redraw", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redrawstatus", "minlen":7, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"registers", "minlen":3, "flags":"EXTRA|NOTRLCOM|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"resize", "minlen":3, "flags":"RANGE|NOTADR|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"retab", "minlen":3, "flags":"TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"return", "minlen":4, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_return"}, {"name":"rewind", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"right", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"rightbelow", "minlen":6, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"ruby", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_ruby"}, {"name":"rubydo", "minlen":5, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rubyfile", "minlen":5, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rundo", "minlen":4, "flags":"NEEDARG|FILE1", "parser":"parse_cmd_common"}, {"name":"runtime", "minlen":2, "flags":"BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rviminfo", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"substitute", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sNext", "minlen":2, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sandbox", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"sargument", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sall", "minlen":3, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"saveas", "minlen":3, "flags":"BANG|DFLALL|FILE1|ARGOPT|CMDWIN|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbNext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sball", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbfirst", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"sblast", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbmodified", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbnext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbprevious", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbrewind", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"scriptnames", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"scriptencoding", "minlen":7, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"scscope", "minlen":3, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"set", "minlen":2, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"setfiletype", "minlen":4, "flags":"TRLBAR|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"setglobal", "minlen":4, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"setlocal", "minlen":4, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"sfind", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sfirst", "minlen":4, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"shell", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"simalt", "minlen":3, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sign", "minlen":3, "flags":"NEEDARG|RANGE|NOTADR|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"silent", "minlen":3, "flags":"NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sleep", "minlen":2, "flags":"RANGE|NOTADR|COUNT|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"slast", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"smagic", "minlen":2, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snext", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sniff", "minlen":3, "flags":"EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"snomagic", "minlen":3, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snoremap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sort", "minlen":3, "flags":"RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY", "parser":"parse_cmd_common"}, {"name":"source", "minlen":2, "flags":"BANG|FILE1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"spelldump", "minlen":6, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellgood", "minlen":3, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellinfo", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellrepall", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellundo", "minlen":6, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellwrong", "minlen":6, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"split", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sprevious", "minlen":3, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"srewind", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"stop", "minlen":2, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stag", "minlen":3, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"startinsert", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"startgreplace", "minlen":6, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"startreplace", "minlen":6, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stopinsert", "minlen":5, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stjump", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"stselect", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"sunhide", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sunmap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"suspend", "minlen":3, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sview", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"swapname", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"syntax", "minlen":2, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_syntax"}, {"name":"syntime", "minlen":5, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"syncbind", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"t", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"tNext", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"tabNext", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabclose", "minlen":4, "flags":"RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tabdo", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tabedit", "minlen":4, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabfind", "minlen":4, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabfirst", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tablast", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabmove", "minlen":4, "flags":"RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabnew", "minlen":6, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabnext", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabonly", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tabprevious", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabrewind", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabs", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tab", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tag", "minlen":2, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"tags", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tcl", "minlen":2, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_tcl"}, {"name":"tcldo", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tclfile", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tearoff", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tfirst", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"throw", "minlen":2, "flags":"EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_throw"}, {"name":"tjump", "minlen":2, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"tlast", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tmenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tnext", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"topleft", "minlen":2, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tprevious", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"trewind", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"try", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_try"}, {"name":"tselect", "minlen":2, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"tunmenu", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undo", "minlen":1, "flags":"RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undojoin", "minlen":5, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undolist", "minlen":5, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unabbreviate", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unhide", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"unlet", "minlen":3, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_unlet"}, {"name":"unlockvar", "minlen":4, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_unlockvar"}, {"name":"unmap", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unmenu", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unsilent", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"update", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vglobal", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|DFLALL|CMDWIN", "parser":"parse_cmd_common"}, {"name":"version", "minlen":2, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"verbose", "minlen":4, "flags":"NEEDARG|RANGE|NOTADR|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vertical", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"vimgrep", "minlen":3, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"vimgrepadd", "minlen":8, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"visual", "minlen":2, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"viusage", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"view", "minlen":3, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vnew", "minlen":3, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vsplit", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"windo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"write", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wNext", "minlen":2, "flags":"RANGE|WHOLEFOLD|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wall", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"while", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_while"}, {"name":"winsize", "minlen":2, "flags":"EXTRA|NEEDARG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wincmd", "minlen":4, "flags":"NEEDARG|WORD1|RANGE|NOTADR", "parser":"parse_wincmd"}, {"name":"winpos", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wnext", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wprevious", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wq", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wqall", "minlen":3, "flags":"BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wsverb", "minlen":2, "flags":"EXTRA|NOTADR|NEEDARG", "parser":"parse_cmd_common"}, {"name":"wundo", "minlen":2, "flags":"BANG|NEEDARG|FILE1", "parser":"parse_cmd_common"}, {"name":"wviminfo", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xit", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xall", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"xmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"yank", "minlen":1, "flags":"RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"z", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"!", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILES|CMDWIN", "parser":"parse_cmd_common"}, {"name":"#", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"&", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"*", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"<", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"=", "minlen":1, "flags":"RANGE|TRLBAR|DFLALL|EXFLAGS|CMDWIN", "parser":"parse_cmd_common"}, {"name":">", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"@", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"Next", "minlen":1, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"Print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"X", "minlen":1, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"~", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"cbottom", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"cdo", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"cfdo", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"chistory", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":3, "name":"clearjumps", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "minlen":4, "name":"filter", "parser":"parse_cmd_common"}, {"flags":"RANGE|NOTADR|COUNT|TRLBAR", "minlen":5, "name":"helpclose", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"lbottom", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":2, "name":"ldo", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"lfdo", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"lhistory", "parser":"parse_cmd_common"}, {"flags":"BANG|EXTRA|TRLBAR|CMDWIN", "minlen":3, "name":"llist", "parser":"parse_cmd_common"}, {"flags":"NEEDARG|EXTRA|NOTRLCOM", "minlen":3, "name":"noswapfile", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|NEEDARG|TRLBAR|SBOXOK|CMDWIN", "minlen":2, "name":"packadd", "parser":"parse_cmd_common"}, {"flags":"BANG|TRLBAR|SBOXOK|CMDWIN", "minlen":5, "name":"packloadall", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN|SBOXOK", "minlen":3, "name":"smile", "parser":"parse_cmd_common"}, {"flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "minlen":3, "name":"pyx", "parser":"parse_cmd_common"}, {"flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "minlen":4, "name":"pyxdo", "parser":"parse_cmd_common"}, {"flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "minlen":7, "name":"pythonx", "parser":"parse_cmd_common"}, {"flags":"RANGE|FILE1|NEEDARG|CMDWIN", "minlen":4, "name":"pyxfile", "parser":"parse_cmd_common"}, {"flags":"RANGE|BANG|FILES|CMDWIN", "minlen":3, "name":"terminal", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":3, "name":"tmap", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|CMDWIN", "minlen":5, "name":"tmapclear", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":3, "name":"tnoremap", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":5, "name":"tunmap", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"cabove", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"cafter", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"cbefore", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"cbelow", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "minlen":4, "name":"const", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"labove", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"lafter", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"lbefore", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"lbelow", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":7, "name":"redrawtabline", "parser":"parse_cmd_common"}, {"flags":"WORD1|TRLBAR|CMDWIN", "minlen":7, "name":"scriptversion", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|TRLBAR|CMDWIN", "minlen":2, "name":"tcd", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|TRLBAR|CMDWIN", "minlen":3, "name":"tchdir", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlmenu", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlnoremenu", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlunmenu", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|CMDWIN", "minlen":2, "name":"xrestore", "parser":"parse_cmd_common"}, {"flags":"EXTRA|BANG|SBOXOK|CMDWIN", "minlen":3, "name":"def", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NEEDARG|TRLBAR|CMDWIN", "minlen":4, "name":"disassemble", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":4, "name":"enddef", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM", "minlen":3, "name":"export", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM", "minlen":3, "name":"import", "parser":"parse_cmd_common"}, {"flags":"BANG|RANGE|NEEDARG|EXTRA|TRLBAR", "minlen":7, "name":"spellrare", "parser":"parse_cmd_common"}, {"flags":"", "minlen":4, "name":"vim9script", "parser":"parse_cmd_common"}];
10288// To find new builtin_functions, run the below script.
10289// $ scripts/update_builtin_functions.sh /path/to/vim/src/evalfunc.c
10290VimLParser.prototype.builtin_functions = [{"name":"abs", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"acos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"add", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"and", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"append", "min_argc":2, "max_argc":2, "argtype":"FEARG_LAST"}, {"name":"appendbufline", "min_argc":3, "max_argc":3, "argtype":"FEARG_LAST"}, {"name":"argc", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"argidx", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"arglistid", "min_argc":0, "max_argc":2, "argtype":"0"}, {"name":"argv", "min_argc":0, "max_argc":2, "argtype":"0"}, {"name":"asin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"assert_beeps", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_equal", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_equalfile", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_exception", "min_argc":1, "max_argc":2, "argtype":"0"}, {"name":"assert_fails", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"assert_false", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_inrange", "min_argc":3, "max_argc":4, "argtype":"FEARG_3"}, {"name":"assert_match", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_notequal", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_notmatch", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_report", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"assert_true", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"atan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"atan2", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"balloon_gettext", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"balloon_show", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"balloon_split", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"browse", "min_argc":4, "max_argc":4, "argtype":"0"}, {"name":"browsedir", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"bufadd", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufexists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_name", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_number", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buflisted", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufload", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufloaded", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufname", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufnr", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"bufwinid", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufwinnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"byte2line", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"byteidx", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"byteidxcomp", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"call", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ceil", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_canread", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_close", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_close_in", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_evalexpr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_evalraw", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_getbufnr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_getjob", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_info", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_log", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_logfile", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_open", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_read", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_readblob", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_readraw", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_sendexpr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_sendraw", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_status", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"changenr", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"char2nr", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"chdir", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cindent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"clearmatches", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"col", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"complete", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"complete_add", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"complete_check", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"complete_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"confirm", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"copy", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cosh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"count", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"cscope_connection", "min_argc":0, "max_argc":3, "argtype":"0"}, {"name":"cursor", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"debugbreak", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"deepcopy", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"delete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"deletebufline", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"did_filetype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"diff_filler", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"diff_hlID", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"echoraw", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"empty", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"environ", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"escape", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"eval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"eventhandler", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"executable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"execute", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"exepath", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"exp", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"expand", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"expandcmd", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"extend", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"feedkeys", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"file_readable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filereadable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filewritable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filter", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"finddir", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"findfile", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"float2nr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"floor", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"fmod", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"fnameescape", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"fnamemodify", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"foldclosed", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldclosedend", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldlevel", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldtext", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"foldtextresult", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foreground", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"funcref", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"function", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"garbagecollect", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"get", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getbufinfo", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getbufline", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getbufvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getchangelist", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getchar", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getcharmod", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcharsearch", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdline", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdtype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdwintype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcompletion", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getcurpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcwd", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getenv", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getfontname", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getfperm", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getfsize", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getftime", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getftype", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getimstatus", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getjumplist", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getline", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getloclist", "min_argc":1, "max_argc":2, "argtype":"0"}, {"name":"getmatches", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getmousepos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getpid", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getqflist", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getreg", "min_argc":0, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getregtype", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"gettabinfo", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"gettabvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"gettabwinvar", "min_argc":3, "max_argc":4, "argtype":"FEARG_1"}, {"name":"gettagstack", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwininfo", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwinpos", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwinposx", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getwinposy", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getwinvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"glob", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"glob2regpat", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"globpath", "min_argc":2, "max_argc":5, "argtype":"FEARG_2"}, {"name":"has", "min_argc":1, "max_argc":1, "argtype":"0"}, {"name":"has_key", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"haslocaldir", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"hasmapto", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"highlightID", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"highlight_exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"histadd", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"histdel", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"histget", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"histnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hlID", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hlexists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hostname", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"iconv", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"indent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"index", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"input", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"inputdialog", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"inputlist", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"inputrestore", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"inputsave", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"inputsecret", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"insert", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"interrupt", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"invert", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isdirectory", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isinf", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"islocked", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isnan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"items", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_getchannel", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"job_start", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"job_status", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_stop", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"join", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"js_decode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"js_encode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"json_decode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"json_encode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"keys", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"last_buffer_nr", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"len", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"libcall", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"libcallnr", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"line", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"line2byte", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"lispindent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"list2str", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"listener_add", "min_argc":1, "max_argc":2, "argtype":"FEARG_2"}, {"name":"listener_flush", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"listener_remove", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"localtime", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"log", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"log10", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"luaeval", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"map", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"maparg", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"mapcheck", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"match", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchadd", "min_argc":2, "max_argc":5, "argtype":"FEARG_1"}, {"name":"matchaddpos", "min_argc":2, "max_argc":5, "argtype":"FEARG_1"}, {"name":"matcharg", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"matchdelete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"matchend", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchlist", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchstr", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchstrpos", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"max", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"min", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"mkdir", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"mode", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"mzeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"nextnonblank", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"nr2char", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"or", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"pathshorten", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"perleval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_atcursor", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_beval", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_clear", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_close", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_create", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_dialog", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_filter_menu", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_filter_yesno", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_findinfo", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_findpreview", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_getoptions", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_getpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_hide", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_locate", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_menu", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_move", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_notification", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_settext", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_show", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pow", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prevnonblank", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"printf", "min_argc":1, "max_argc":19, "argtype":"FEARG_2"}, {"name":"prompt_setcallback", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prompt_setinterrupt", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prompt_setprompt", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_add", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_clear", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_find", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_list", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_remove", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_type_add", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_change", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_delete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_get", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_list", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pum_getpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"pumvisible", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"py3eval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pyeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pyxeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"rand", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"range", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"readdir", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"readfile", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"reg_executing", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"reg_recording", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"reltime", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"reltimefloat", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"reltimestr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remote_expr", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"remote_foreground", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remote_peek", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"remote_read", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"remote_send", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"remote_startserver", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remove", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"rename", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"repeat", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"resolve", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"reverse", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"round", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"rubyeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"screenattr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screenchar", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screenchars", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screencol", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"screenpos", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"screenrow", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"screenstring", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"search", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"searchdecl", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"searchpair", "min_argc":3, "max_argc":7, "argtype":"0"}, {"name":"searchpairpos", "min_argc":3, "max_argc":7, "argtype":"0"}, {"name":"searchpos", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"server2client", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"serverlist", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"setbufline", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"setbufvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"setcharsearch", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"setcmdpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"setenv", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setfperm", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"setline", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setloclist", "min_argc":2, "max_argc":4, "argtype":"FEARG_2"}, {"name":"setmatches", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"setpos", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setqflist", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"setreg", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"settabvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"settabwinvar", "min_argc":4, "max_argc":4, "argtype":"FEARG_4"}, {"name":"settagstack", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"setwinvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"sha256", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"shellescape", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"shiftwidth", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_define", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_getdefined", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_getplaced", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_jump", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sign_place", "min_argc":4, "max_argc":5, "argtype":"FEARG_1"}, {"name":"sign_placelist", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_undefine", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_unplace", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_unplacelist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"simplify", "min_argc":1, "max_argc":1, "argtype":"0"}, {"name":"sin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sinh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sort", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sound_clear", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"sound_playevent", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sound_playfile", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sound_stop", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"soundfold", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"spellbadword", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"spellsuggest", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"split", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sqrt", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"srand", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"state", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"str2float", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"str2list", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"str2nr", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strcharpart", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strchars", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strdisplaywidth", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strftime", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strgetchar", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"stridx", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"string", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strlen", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strpart", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strptime", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strridx", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strtrans", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strwidth", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"submatch", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"substitute", "min_argc":4, "max_argc":4, "argtype":"FEARG_1"}, {"name":"swapinfo", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"swapname", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"synID", "min_argc":3, "max_argc":3, "argtype":"0"}, {"name":"synIDattr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"synIDtrans", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"synconcealed", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"synstack", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"system", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"systemlist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tabpagebuflist", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tabpagenr", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"tabpagewinnr", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tagfiles", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"taglist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tanh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tempname", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"term_dumpdiff", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"term_dumpload", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_dumpwrite", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"term_getaltscreen", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getansicolors", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getattr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_getcursor", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getjob", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getline", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_getscrolled", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getsize", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getstatus", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_gettitle", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_gettty", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_list", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"term_scrape", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_sendkeys", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setansicolors", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setapi", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setkill", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setrestore", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setsize", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"term_start", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_wait", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"test_alloc_fail", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"test_autochdir", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_feedinput", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_garbagecollect_now", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_garbagecollect_soon", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_getvalue", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_ignore_error", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_null_blob", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_channel", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_dict", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_job", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_list", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_partial", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_string", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_option_not_set", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_override", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"test_refcount", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_scrollbar", "min_argc":3, "max_argc":3, "argtype":"FEARG_2"}, {"name":"test_setmouse", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"test_settime", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_srand_seed", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_unknown", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_void", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"timer_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"timer_pause", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"timer_start", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"timer_stop", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"timer_stopall", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"tolower", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"toupper", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tr", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"trim", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"trunc", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"type", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"undofile", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"undotree", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"uniq", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"values", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"virtcol", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"visualmode", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"wildmenumode", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"win_execute", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"win_findbuf", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_getid", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"win_gettype", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_gotoid", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_id2tabwin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_id2win", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_screenpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_splitmove", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"winbufnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"wincol", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"windowsversion", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winheight", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winlayout", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winline", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winnr", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winrestcmd", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winrestview", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winsaveview", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winwidth", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"wordcount", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"writefile", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"xor", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}];
10291function ExprTokenizer() { this.__init__.apply(this, arguments); }
10292ExprTokenizer.prototype.__init__ = function(reader) {
10293 this.reader = reader;
10294 this.cache = {};
10295}
10296
10297ExprTokenizer.prototype.token = function(type, value, pos) {
10298 return {"type":type, "value":value, "pos":pos};
10299}
10300
10301ExprTokenizer.prototype.peek = function() {
10302 var pos = this.reader.tell();
10303 var r = this.get();
10304 this.reader.seek_set(pos);
10305 return r;
10306}
10307
10308ExprTokenizer.prototype.get = function() {
10309 // FIXME: remove dirty hack
10310 if (viml_has_key(this.cache, this.reader.tell())) {
10311 var x = this.cache[this.reader.tell()];
10312 this.reader.seek_set(x[0]);
10313 return x[1];
10314 }
10315 var pos = this.reader.tell();
10316 this.reader.skip_white();
10317 var r = this.get2();
10318 this.cache[pos] = [this.reader.tell(), r];
10319 return r;
10320}
10321
10322ExprTokenizer.prototype.get2 = function() {
10323 var r = this.reader;
10324 var pos = r.getpos();
10325 var c = r.peek();
10326 if (c == "<EOF>") {
10327 return this.token(TOKEN_EOF, c, pos);
10328 }
10329 else if (c == "<EOL>") {
10330 r.seek_cur(1);
10331 return this.token(TOKEN_EOL, c, pos);
10332 }
10333 else if (iswhite(c)) {
10334 var s = r.read_white();
10335 return this.token(TOKEN_SPACE, s, pos);
10336 }
10337 else if (c == "0" && (r.p(1) == "X" || r.p(1) == "x") && isxdigit(r.p(2))) {
10338 var s = r.getn(3);
10339 s += r.read_xdigit();
10340 return this.token(TOKEN_NUMBER, s, pos);
10341 }
10342 else if (c == "0" && (r.p(1) == "B" || r.p(1) == "b") && (r.p(2) == "0" || r.p(2) == "1")) {
10343 var s = r.getn(3);
10344 s += r.read_bdigit();
10345 return this.token(TOKEN_NUMBER, s, pos);
10346 }
10347 else if (c == "0" && (r.p(1) == "Z" || r.p(1) == "z") && r.p(2) != ".") {
10348 var s = r.getn(2);
10349 s += r.read_blob();
10350 return this.token(TOKEN_BLOB, s, pos);
10351 }
10352 else if (isdigit(c)) {
10353 var s = r.read_digit();
10354 if (r.p(0) == "." && isdigit(r.p(1))) {
10355 s += r.getn(1);
10356 s += r.read_digit();
10357 if ((r.p(0) == "E" || r.p(0) == "e") && (isdigit(r.p(1)) || (r.p(1) == "-" || r.p(1) == "+") && isdigit(r.p(2)))) {
10358 s += r.getn(2);
10359 s += r.read_digit();
10360 }
10361 }
10362 return this.token(TOKEN_NUMBER, s, pos);
10363 }
10364 else if (c == "i" && r.p(1) == "s" && !isidc(r.p(2))) {
10365 if (r.p(2) == "?") {
10366 r.seek_cur(3);
10367 return this.token(TOKEN_ISCI, "is?", pos);
10368 }
10369 else if (r.p(2) == "#") {
10370 r.seek_cur(3);
10371 return this.token(TOKEN_ISCS, "is#", pos);
10372 }
10373 else {
10374 r.seek_cur(2);
10375 return this.token(TOKEN_IS, "is", pos);
10376 }
10377 }
10378 else if (c == "i" && r.p(1) == "s" && r.p(2) == "n" && r.p(3) == "o" && r.p(4) == "t" && !isidc(r.p(5))) {
10379 if (r.p(5) == "?") {
10380 r.seek_cur(6);
10381 return this.token(TOKEN_ISNOTCI, "isnot?", pos);
10382 }
10383 else if (r.p(5) == "#") {
10384 r.seek_cur(6);
10385 return this.token(TOKEN_ISNOTCS, "isnot#", pos);
10386 }
10387 else {
10388 r.seek_cur(5);
10389 return this.token(TOKEN_ISNOT, "isnot", pos);
10390 }
10391 }
10392 else if (isnamec1(c)) {
10393 var s = r.read_name();
10394 return this.token(TOKEN_IDENTIFIER, s, pos);
10395 }
10396 else if (c == "|" && r.p(1) == "|") {
10397 r.seek_cur(2);
10398 return this.token(TOKEN_OROR, "||", pos);
10399 }
10400 else if (c == "&" && r.p(1) == "&") {
10401 r.seek_cur(2);
10402 return this.token(TOKEN_ANDAND, "&&", pos);
10403 }
10404 else if (c == "=" && r.p(1) == "=") {
10405 if (r.p(2) == "?") {
10406 r.seek_cur(3);
10407 return this.token(TOKEN_EQEQCI, "==?", pos);
10408 }
10409 else if (r.p(2) == "#") {
10410 r.seek_cur(3);
10411 return this.token(TOKEN_EQEQCS, "==#", pos);
10412 }
10413 else {
10414 r.seek_cur(2);
10415 return this.token(TOKEN_EQEQ, "==", pos);
10416 }
10417 }
10418 else if (c == "!" && r.p(1) == "=") {
10419 if (r.p(2) == "?") {
10420 r.seek_cur(3);
10421 return this.token(TOKEN_NEQCI, "!=?", pos);
10422 }
10423 else if (r.p(2) == "#") {
10424 r.seek_cur(3);
10425 return this.token(TOKEN_NEQCS, "!=#", pos);
10426 }
10427 else {
10428 r.seek_cur(2);
10429 return this.token(TOKEN_NEQ, "!=", pos);
10430 }
10431 }
10432 else if (c == ">" && r.p(1) == "=") {
10433 if (r.p(2) == "?") {
10434 r.seek_cur(3);
10435 return this.token(TOKEN_GTEQCI, ">=?", pos);
10436 }
10437 else if (r.p(2) == "#") {
10438 r.seek_cur(3);
10439 return this.token(TOKEN_GTEQCS, ">=#", pos);
10440 }
10441 else {
10442 r.seek_cur(2);
10443 return this.token(TOKEN_GTEQ, ">=", pos);
10444 }
10445 }
10446 else if (c == "<" && r.p(1) == "=") {
10447 if (r.p(2) == "?") {
10448 r.seek_cur(3);
10449 return this.token(TOKEN_LTEQCI, "<=?", pos);
10450 }
10451 else if (r.p(2) == "#") {
10452 r.seek_cur(3);
10453 return this.token(TOKEN_LTEQCS, "<=#", pos);
10454 }
10455 else {
10456 r.seek_cur(2);
10457 return this.token(TOKEN_LTEQ, "<=", pos);
10458 }
10459 }
10460 else if (c == "=" && r.p(1) == "~") {
10461 if (r.p(2) == "?") {
10462 r.seek_cur(3);
10463 return this.token(TOKEN_MATCHCI, "=~?", pos);
10464 }
10465 else if (r.p(2) == "#") {
10466 r.seek_cur(3);
10467 return this.token(TOKEN_MATCHCS, "=~#", pos);
10468 }
10469 else {
10470 r.seek_cur(2);
10471 return this.token(TOKEN_MATCH, "=~", pos);
10472 }
10473 }
10474 else if (c == "!" && r.p(1) == "~") {
10475 if (r.p(2) == "?") {
10476 r.seek_cur(3);
10477 return this.token(TOKEN_NOMATCHCI, "!~?", pos);
10478 }
10479 else if (r.p(2) == "#") {
10480 r.seek_cur(3);
10481 return this.token(TOKEN_NOMATCHCS, "!~#", pos);
10482 }
10483 else {
10484 r.seek_cur(2);
10485 return this.token(TOKEN_NOMATCH, "!~", pos);
10486 }
10487 }
10488 else if (c == ">") {
10489 if (r.p(1) == "?") {
10490 r.seek_cur(2);
10491 return this.token(TOKEN_GTCI, ">?", pos);
10492 }
10493 else if (r.p(1) == "#") {
10494 r.seek_cur(2);
10495 return this.token(TOKEN_GTCS, ">#", pos);
10496 }
10497 else {
10498 r.seek_cur(1);
10499 return this.token(TOKEN_GT, ">", pos);
10500 }
10501 }
10502 else if (c == "<") {
10503 if (r.p(1) == "?") {
10504 r.seek_cur(2);
10505 return this.token(TOKEN_LTCI, "<?", pos);
10506 }
10507 else if (r.p(1) == "#") {
10508 r.seek_cur(2);
10509 return this.token(TOKEN_LTCS, "<#", pos);
10510 }
10511 else {
10512 r.seek_cur(1);
10513 return this.token(TOKEN_LT, "<", pos);
10514 }
10515 }
10516 else if (c == "+") {
10517 r.seek_cur(1);
10518 return this.token(TOKEN_PLUS, "+", pos);
10519 }
10520 else if (c == "-") {
10521 if (r.p(1) == ">") {
10522 r.seek_cur(2);
10523 return this.token(TOKEN_ARROW, "->", pos);
10524 }
10525 else {
10526 r.seek_cur(1);
10527 return this.token(TOKEN_MINUS, "-", pos);
10528 }
10529 }
10530 else if (c == ".") {
10531 if (r.p(1) == "." && r.p(2) == ".") {
10532 r.seek_cur(3);
10533 return this.token(TOKEN_DOTDOTDOT, "...", pos);
10534 }
10535 else if (r.p(1) == ".") {
10536 r.seek_cur(2);
10537 return this.token(TOKEN_DOTDOT, "..", pos);
10538 // TODO check scriptversion?
10539 }
10540 else {
10541 r.seek_cur(1);
10542 return this.token(TOKEN_DOT, ".", pos);
10543 // TODO check scriptversion?
10544 }
10545 }
10546 else if (c == "*") {
10547 r.seek_cur(1);
10548 return this.token(TOKEN_STAR, "*", pos);
10549 }
10550 else if (c == "/") {
10551 r.seek_cur(1);
10552 return this.token(TOKEN_SLASH, "/", pos);
10553 }
10554 else if (c == "%") {
10555 r.seek_cur(1);
10556 return this.token(TOKEN_PERCENT, "%", pos);
10557 }
10558 else if (c == "!") {
10559 r.seek_cur(1);
10560 return this.token(TOKEN_NOT, "!", pos);
10561 }
10562 else if (c == "?") {
10563 r.seek_cur(1);
10564 return this.token(TOKEN_QUESTION, "?", pos);
10565 }
10566 else if (c == ":") {
10567 r.seek_cur(1);
10568 return this.token(TOKEN_COLON, ":", pos);
10569 }
10570 else if (c == "#") {
10571 if (r.p(1) == "{") {
10572 r.seek_cur(2);
10573 return this.token(TOKEN_LITCOPEN, "#{", pos);
10574 }
10575 else {
10576 r.seek_cur(1);
10577 return this.token(TOKEN_SHARP, "#", pos);
10578 }
10579 }
10580 else if (c == "(") {
10581 r.seek_cur(1);
10582 return this.token(TOKEN_POPEN, "(", pos);
10583 }
10584 else if (c == ")") {
10585 r.seek_cur(1);
10586 return this.token(TOKEN_PCLOSE, ")", pos);
10587 }
10588 else if (c == "[") {
10589 r.seek_cur(1);
10590 return this.token(TOKEN_SQOPEN, "[", pos);
10591 }
10592 else if (c == "]") {
10593 r.seek_cur(1);
10594 return this.token(TOKEN_SQCLOSE, "]", pos);
10595 }
10596 else if (c == "{") {
10597 r.seek_cur(1);
10598 return this.token(TOKEN_COPEN, "{", pos);
10599 }
10600 else if (c == "}") {
10601 r.seek_cur(1);
10602 return this.token(TOKEN_CCLOSE, "}", pos);
10603 }
10604 else if (c == ",") {
10605 r.seek_cur(1);
10606 return this.token(TOKEN_COMMA, ",", pos);
10607 }
10608 else if (c == "'") {
10609 r.seek_cur(1);
10610 return this.token(TOKEN_SQUOTE, "'", pos);
10611 }
10612 else if (c == "\"") {
10613 r.seek_cur(1);
10614 return this.token(TOKEN_DQUOTE, "\"", pos);
10615 }
10616 else if (c == "$") {
10617 var s = r.getn(1);
10618 s += r.read_word();
10619 return this.token(TOKEN_ENV, s, pos);
10620 }
10621 else if (c == "@") {
10622 // @<EOL> is treated as @"
10623 return this.token(TOKEN_REG, r.getn(2), pos);
10624 }
10625 else if (c == "&") {
10626 var s = "";
10627 if ((r.p(1) == "g" || r.p(1) == "l") && r.p(2) == ":") {
10628 var s = r.getn(3) + r.read_word();
10629 }
10630 else {
10631 var s = r.getn(1) + r.read_word();
10632 }
10633 return this.token(TOKEN_OPTION, s, pos);
10634 }
10635 else if (c == "=") {
10636 r.seek_cur(1);
10637 return this.token(TOKEN_EQ, "=", pos);
10638 }
10639 else if (c == "|") {
10640 r.seek_cur(1);
10641 return this.token(TOKEN_OR, "|", pos);
10642 }
10643 else if (c == ";") {
10644 r.seek_cur(1);
10645 return this.token(TOKEN_SEMICOLON, ";", pos);
10646 }
10647 else if (c == "`") {
10648 r.seek_cur(1);
10649 return this.token(TOKEN_BACKTICK, "`", pos);
10650 }
10651 else {
10652 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10653 }
10654}
10655
10656ExprTokenizer.prototype.get_sstring = function() {
10657 this.reader.skip_white();
10658 var c = this.reader.p(0);
10659 if (c != "'") {
10660 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10661 }
10662 this.reader.seek_cur(1);
10663 var s = "";
10664 while (TRUE) {
10665 var c = this.reader.p(0);
10666 if (c == "<EOF>" || c == "<EOL>") {
10667 throw Err("unexpected EOL", this.reader.getpos());
10668 }
10669 else if (c == "'") {
10670 this.reader.seek_cur(1);
10671 if (this.reader.p(0) == "'") {
10672 this.reader.seek_cur(1);
10673 s += "''";
10674 }
10675 else {
10676 break;
10677 }
10678 }
10679 else {
10680 this.reader.seek_cur(1);
10681 s += c;
10682 }
10683 }
10684 return s;
10685}
10686
10687ExprTokenizer.prototype.get_dstring = function() {
10688 this.reader.skip_white();
10689 var c = this.reader.p(0);
10690 if (c != "\"") {
10691 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10692 }
10693 this.reader.seek_cur(1);
10694 var s = "";
10695 while (TRUE) {
10696 var c = this.reader.p(0);
10697 if (c == "<EOF>" || c == "<EOL>") {
10698 throw Err("unexpectd EOL", this.reader.getpos());
10699 }
10700 else if (c == "\"") {
10701 this.reader.seek_cur(1);
10702 break;
10703 }
10704 else if (c == "\\") {
10705 this.reader.seek_cur(1);
10706 s += c;
10707 var c = this.reader.p(0);
10708 if (c == "<EOF>" || c == "<EOL>") {
10709 throw Err("ExprTokenizer: unexpected EOL", this.reader.getpos());
10710 }
10711 this.reader.seek_cur(1);
10712 s += c;
10713 }
10714 else {
10715 this.reader.seek_cur(1);
10716 s += c;
10717 }
10718 }
10719 return s;
10720}
10721
10722ExprTokenizer.prototype.parse_dict_literal_key = function() {
10723 this.reader.skip_white();
10724 var c = this.reader.peek();
10725 if (!isalnum(c) && c != "_" && c != "-") {
10726 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
10727 }
10728 var node = Node(NODE_STRING);
10729 var s = c;
10730 this.reader.seek_cur(1);
10731 node.pos = this.reader.getpos();
10732 while (TRUE) {
10733 var c = this.reader.p(0);
10734 if (c == "<EOF>" || c == "<EOL>") {
10735 throw Err("unexpectd EOL", this.reader.getpos());
10736 }
10737 if (!isalnum(c) && c != "_" && c != "-") {
10738 break;
10739 }
10740 this.reader.seek_cur(1);
10741 s += c;
10742 }
10743 node.value = "'" + s + "'";
10744 return node;
10745}
10746
10747function ExprParser() { this.__init__.apply(this, arguments); }
10748ExprParser.prototype.__init__ = function(reader) {
10749 this.reader = reader;
10750 this.tokenizer = new ExprTokenizer(reader);
10751}
10752
10753ExprParser.prototype.parse = function() {
10754 return this.parse_expr1();
10755}
10756
10757// expr1: expr2 ? expr1 : expr1
10758ExprParser.prototype.parse_expr1 = function() {
10759 var left = this.parse_expr2();
10760 var pos = this.reader.tell();
10761 var token = this.tokenizer.get();
10762 if (token.type == TOKEN_QUESTION) {
10763 var node = Node(NODE_TERNARY);
10764 node.pos = token.pos;
10765 node.cond = left;
10766 node.left = this.parse_expr1();
10767 var token = this.tokenizer.get();
10768 if (token.type != TOKEN_COLON) {
10769 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10770 }
10771 node.right = this.parse_expr1();
10772 var left = node;
10773 }
10774 else {
10775 this.reader.seek_set(pos);
10776 }
10777 return left;
10778}
10779
10780// expr2: expr3 || expr3 ..
10781ExprParser.prototype.parse_expr2 = function() {
10782 var left = this.parse_expr3();
10783 while (TRUE) {
10784 var pos = this.reader.tell();
10785 var token = this.tokenizer.get();
10786 if (token.type == TOKEN_OROR) {
10787 var node = Node(NODE_OR);
10788 node.pos = token.pos;
10789 node.left = left;
10790 node.right = this.parse_expr3();
10791 var left = node;
10792 }
10793 else {
10794 this.reader.seek_set(pos);
10795 break;
10796 }
10797 }
10798 return left;
10799}
10800
10801// expr3: expr4 && expr4
10802ExprParser.prototype.parse_expr3 = function() {
10803 var left = this.parse_expr4();
10804 while (TRUE) {
10805 var pos = this.reader.tell();
10806 var token = this.tokenizer.get();
10807 if (token.type == TOKEN_ANDAND) {
10808 var node = Node(NODE_AND);
10809 node.pos = token.pos;
10810 node.left = left;
10811 node.right = this.parse_expr4();
10812 var left = node;
10813 }
10814 else {
10815 this.reader.seek_set(pos);
10816 break;
10817 }
10818 }
10819 return left;
10820}
10821
10822// expr4: expr5 == expr5
10823// expr5 != expr5
10824// expr5 > expr5
10825// expr5 >= expr5
10826// expr5 < expr5
10827// expr5 <= expr5
10828// expr5 =~ expr5
10829// expr5 !~ expr5
10830//
10831// expr5 ==? expr5
10832// expr5 ==# expr5
10833// etc.
10834//
10835// expr5 is expr5
10836// expr5 isnot expr5
10837ExprParser.prototype.parse_expr4 = function() {
10838 var left = this.parse_expr5();
10839 var pos = this.reader.tell();
10840 var token = this.tokenizer.get();
10841 if (token.type == TOKEN_EQEQ) {
10842 var node = Node(NODE_EQUAL);
10843 node.pos = token.pos;
10844 node.left = left;
10845 node.right = this.parse_expr5();
10846 var left = node;
10847 }
10848 else if (token.type == TOKEN_EQEQCI) {
10849 var node = Node(NODE_EQUALCI);
10850 node.pos = token.pos;
10851 node.left = left;
10852 node.right = this.parse_expr5();
10853 var left = node;
10854 }
10855 else if (token.type == TOKEN_EQEQCS) {
10856 var node = Node(NODE_EQUALCS);
10857 node.pos = token.pos;
10858 node.left = left;
10859 node.right = this.parse_expr5();
10860 var left = node;
10861 }
10862 else if (token.type == TOKEN_NEQ) {
10863 var node = Node(NODE_NEQUAL);
10864 node.pos = token.pos;
10865 node.left = left;
10866 node.right = this.parse_expr5();
10867 var left = node;
10868 }
10869 else if (token.type == TOKEN_NEQCI) {
10870 var node = Node(NODE_NEQUALCI);
10871 node.pos = token.pos;
10872 node.left = left;
10873 node.right = this.parse_expr5();
10874 var left = node;
10875 }
10876 else if (token.type == TOKEN_NEQCS) {
10877 var node = Node(NODE_NEQUALCS);
10878 node.pos = token.pos;
10879 node.left = left;
10880 node.right = this.parse_expr5();
10881 var left = node;
10882 }
10883 else if (token.type == TOKEN_GT) {
10884 var node = Node(NODE_GREATER);
10885 node.pos = token.pos;
10886 node.left = left;
10887 node.right = this.parse_expr5();
10888 var left = node;
10889 }
10890 else if (token.type == TOKEN_GTCI) {
10891 var node = Node(NODE_GREATERCI);
10892 node.pos = token.pos;
10893 node.left = left;
10894 node.right = this.parse_expr5();
10895 var left = node;
10896 }
10897 else if (token.type == TOKEN_GTCS) {
10898 var node = Node(NODE_GREATERCS);
10899 node.pos = token.pos;
10900 node.left = left;
10901 node.right = this.parse_expr5();
10902 var left = node;
10903 }
10904 else if (token.type == TOKEN_GTEQ) {
10905 var node = Node(NODE_GEQUAL);
10906 node.pos = token.pos;
10907 node.left = left;
10908 node.right = this.parse_expr5();
10909 var left = node;
10910 }
10911 else if (token.type == TOKEN_GTEQCI) {
10912 var node = Node(NODE_GEQUALCI);
10913 node.pos = token.pos;
10914 node.left = left;
10915 node.right = this.parse_expr5();
10916 var left = node;
10917 }
10918 else if (token.type == TOKEN_GTEQCS) {
10919 var node = Node(NODE_GEQUALCS);
10920 node.pos = token.pos;
10921 node.left = left;
10922 node.right = this.parse_expr5();
10923 var left = node;
10924 }
10925 else if (token.type == TOKEN_LT) {
10926 var node = Node(NODE_SMALLER);
10927 node.pos = token.pos;
10928 node.left = left;
10929 node.right = this.parse_expr5();
10930 var left = node;
10931 }
10932 else if (token.type == TOKEN_LTCI) {
10933 var node = Node(NODE_SMALLERCI);
10934 node.pos = token.pos;
10935 node.left = left;
10936 node.right = this.parse_expr5();
10937 var left = node;
10938 }
10939 else if (token.type == TOKEN_LTCS) {
10940 var node = Node(NODE_SMALLERCS);
10941 node.pos = token.pos;
10942 node.left = left;
10943 node.right = this.parse_expr5();
10944 var left = node;
10945 }
10946 else if (token.type == TOKEN_LTEQ) {
10947 var node = Node(NODE_SEQUAL);
10948 node.pos = token.pos;
10949 node.left = left;
10950 node.right = this.parse_expr5();
10951 var left = node;
10952 }
10953 else if (token.type == TOKEN_LTEQCI) {
10954 var node = Node(NODE_SEQUALCI);
10955 node.pos = token.pos;
10956 node.left = left;
10957 node.right = this.parse_expr5();
10958 var left = node;
10959 }
10960 else if (token.type == TOKEN_LTEQCS) {
10961 var node = Node(NODE_SEQUALCS);
10962 node.pos = token.pos;
10963 node.left = left;
10964 node.right = this.parse_expr5();
10965 var left = node;
10966 }
10967 else if (token.type == TOKEN_MATCH) {
10968 var node = Node(NODE_MATCH);
10969 node.pos = token.pos;
10970 node.left = left;
10971 node.right = this.parse_expr5();
10972 var left = node;
10973 }
10974 else if (token.type == TOKEN_MATCHCI) {
10975 var node = Node(NODE_MATCHCI);
10976 node.pos = token.pos;
10977 node.left = left;
10978 node.right = this.parse_expr5();
10979 var left = node;
10980 }
10981 else if (token.type == TOKEN_MATCHCS) {
10982 var node = Node(NODE_MATCHCS);
10983 node.pos = token.pos;
10984 node.left = left;
10985 node.right = this.parse_expr5();
10986 var left = node;
10987 }
10988 else if (token.type == TOKEN_NOMATCH) {
10989 var node = Node(NODE_NOMATCH);
10990 node.pos = token.pos;
10991 node.left = left;
10992 node.right = this.parse_expr5();
10993 var left = node;
10994 }
10995 else if (token.type == TOKEN_NOMATCHCI) {
10996 var node = Node(NODE_NOMATCHCI);
10997 node.pos = token.pos;
10998 node.left = left;
10999 node.right = this.parse_expr5();
11000 var left = node;
11001 }
11002 else if (token.type == TOKEN_NOMATCHCS) {
11003 var node = Node(NODE_NOMATCHCS);
11004 node.pos = token.pos;
11005 node.left = left;
11006 node.right = this.parse_expr5();
11007 var left = node;
11008 }
11009 else if (token.type == TOKEN_IS) {
11010 var node = Node(NODE_IS);
11011 node.pos = token.pos;
11012 node.left = left;
11013 node.right = this.parse_expr5();
11014 var left = node;
11015 }
11016 else if (token.type == TOKEN_ISCI) {
11017 var node = Node(NODE_ISCI);
11018 node.pos = token.pos;
11019 node.left = left;
11020 node.right = this.parse_expr5();
11021 var left = node;
11022 }
11023 else if (token.type == TOKEN_ISCS) {
11024 var node = Node(NODE_ISCS);
11025 node.pos = token.pos;
11026 node.left = left;
11027 node.right = this.parse_expr5();
11028 var left = node;
11029 }
11030 else if (token.type == TOKEN_ISNOT) {
11031 var node = Node(NODE_ISNOT);
11032 node.pos = token.pos;
11033 node.left = left;
11034 node.right = this.parse_expr5();
11035 var left = node;
11036 }
11037 else if (token.type == TOKEN_ISNOTCI) {
11038 var node = Node(NODE_ISNOTCI);
11039 node.pos = token.pos;
11040 node.left = left;
11041 node.right = this.parse_expr5();
11042 var left = node;
11043 }
11044 else if (token.type == TOKEN_ISNOTCS) {
11045 var node = Node(NODE_ISNOTCS);
11046 node.pos = token.pos;
11047 node.left = left;
11048 node.right = this.parse_expr5();
11049 var left = node;
11050 }
11051 else {
11052 this.reader.seek_set(pos);
11053 }
11054 return left;
11055}
11056
11057// expr5: expr6 + expr6 ..
11058// expr6 - expr6 ..
11059// expr6 . expr6 ..
11060// expr6 .. expr6 ..
11061ExprParser.prototype.parse_expr5 = function() {
11062 var left = this.parse_expr6();
11063 while (TRUE) {
11064 var pos = this.reader.tell();
11065 var token = this.tokenizer.get();
11066 if (token.type == TOKEN_PLUS) {
11067 var node = Node(NODE_ADD);
11068 node.pos = token.pos;
11069 node.left = left;
11070 node.right = this.parse_expr6();
11071 var left = node;
11072 }
11073 else if (token.type == TOKEN_MINUS) {
11074 var node = Node(NODE_SUBTRACT);
11075 node.pos = token.pos;
11076 node.left = left;
11077 node.right = this.parse_expr6();
11078 var left = node;
11079 }
11080 else if (token.type == TOKEN_DOTDOT) {
11081 // TODO check scriptversion?
11082 var node = Node(NODE_CONCAT);
11083 node.pos = token.pos;
11084 node.left = left;
11085 node.right = this.parse_expr6();
11086 var left = node;
11087 }
11088 else if (token.type == TOKEN_DOT) {
11089 // TODO check scriptversion?
11090 var node = Node(NODE_CONCAT);
11091 node.pos = token.pos;
11092 node.left = left;
11093 node.right = this.parse_expr6();
11094 var left = node;
11095 }
11096 else {
11097 this.reader.seek_set(pos);
11098 break;
11099 }
11100 }
11101 return left;
11102}
11103
11104// expr6: expr7 * expr7 ..
11105// expr7 / expr7 ..
11106// expr7 % expr7 ..
11107ExprParser.prototype.parse_expr6 = function() {
11108 var left = this.parse_expr7();
11109 while (TRUE) {
11110 var pos = this.reader.tell();
11111 var token = this.tokenizer.get();
11112 if (token.type == TOKEN_STAR) {
11113 var node = Node(NODE_MULTIPLY);
11114 node.pos = token.pos;
11115 node.left = left;
11116 node.right = this.parse_expr7();
11117 var left = node;
11118 }
11119 else if (token.type == TOKEN_SLASH) {
11120 var node = Node(NODE_DIVIDE);
11121 node.pos = token.pos;
11122 node.left = left;
11123 node.right = this.parse_expr7();
11124 var left = node;
11125 }
11126 else if (token.type == TOKEN_PERCENT) {
11127 var node = Node(NODE_REMAINDER);
11128 node.pos = token.pos;
11129 node.left = left;
11130 node.right = this.parse_expr7();
11131 var left = node;
11132 }
11133 else {
11134 this.reader.seek_set(pos);
11135 break;
11136 }
11137 }
11138 return left;
11139}
11140
11141// expr7: ! expr7
11142// - expr7
11143// + expr7
11144ExprParser.prototype.parse_expr7 = function() {
11145 var pos = this.reader.tell();
11146 var token = this.tokenizer.get();
11147 if (token.type == TOKEN_NOT) {
11148 var node = Node(NODE_NOT);
11149 node.pos = token.pos;
11150 node.left = this.parse_expr7();
11151 return node;
11152 }
11153 else if (token.type == TOKEN_MINUS) {
11154 var node = Node(NODE_MINUS);
11155 node.pos = token.pos;
11156 node.left = this.parse_expr7();
11157 return node;
11158 }
11159 else if (token.type == TOKEN_PLUS) {
11160 var node = Node(NODE_PLUS);
11161 node.pos = token.pos;
11162 node.left = this.parse_expr7();
11163 return node;
11164 }
11165 else {
11166 this.reader.seek_set(pos);
11167 var node = this.parse_expr8();
11168 return node;
11169 }
11170}
11171
11172// expr8: expr8[expr1]
11173// expr8[expr1 : expr1]
11174// expr8.name
11175// expr8->name(expr1, ...)
11176// expr8->s:user_func(expr1, ...)
11177// expr8->{lambda}(expr1, ...)
11178// expr8(expr1, ...)
11179ExprParser.prototype.parse_expr8 = function() {
11180 var left = this.parse_expr9();
11181 while (TRUE) {
11182 var pos = this.reader.tell();
11183 var c = this.reader.peek();
11184 var token = this.tokenizer.get();
11185 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
11186 var npos = token.pos;
11187 if (this.tokenizer.peek().type == TOKEN_COLON) {
11188 this.tokenizer.get();
11189 var node = Node(NODE_SLICE);
11190 node.pos = npos;
11191 node.left = left;
11192 node.rlist = [NIL, NIL];
11193 var token = this.tokenizer.peek();
11194 if (token.type != TOKEN_SQCLOSE) {
11195 node.rlist[1] = this.parse_expr1();
11196 }
11197 var token = this.tokenizer.get();
11198 if (token.type != TOKEN_SQCLOSE) {
11199 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11200 }
11201 var left = node;
11202 }
11203 else {
11204 var right = this.parse_expr1();
11205 if (this.tokenizer.peek().type == TOKEN_COLON) {
11206 this.tokenizer.get();
11207 var node = Node(NODE_SLICE);
11208 node.pos = npos;
11209 node.left = left;
11210 node.rlist = [right, NIL];
11211 var token = this.tokenizer.peek();
11212 if (token.type != TOKEN_SQCLOSE) {
11213 node.rlist[1] = this.parse_expr1();
11214 }
11215 var token = this.tokenizer.get();
11216 if (token.type != TOKEN_SQCLOSE) {
11217 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11218 }
11219 var left = node;
11220 }
11221 else {
11222 var node = Node(NODE_SUBSCRIPT);
11223 node.pos = npos;
11224 node.left = left;
11225 node.right = right;
11226 var token = this.tokenizer.get();
11227 if (token.type != TOKEN_SQCLOSE) {
11228 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11229 }
11230 var left = node;
11231 }
11232 }
11233 delete node;
11234 }
11235 else if (token.type == TOKEN_ARROW) {
11236 var funcname_or_lambda = this.parse_expr9();
11237 var token = this.tokenizer.get();
11238 if (token.type != TOKEN_POPEN) {
11239 throw Err("E107: Missing parentheses: lambda", token.pos);
11240 }
11241 var right = Node(NODE_CALL);
11242 right.pos = token.pos;
11243 right.left = funcname_or_lambda;
11244 right.rlist = this.parse_rlist();
11245 var node = Node(NODE_METHOD);
11246 node.pos = token.pos;
11247 node.left = left;
11248 node.right = right;
11249 var left = node;
11250 delete node;
11251 }
11252 else if (token.type == TOKEN_POPEN) {
11253 var node = Node(NODE_CALL);
11254 node.pos = token.pos;
11255 node.left = left;
11256 node.rlist = this.parse_rlist();
11257 var left = node;
11258 delete node;
11259 }
11260 else if (!iswhite(c) && token.type == TOKEN_DOT) {
11261 // TODO check scriptversion?
11262 var node = this.parse_dot(token, left);
11263 if (node === NIL) {
11264 this.reader.seek_set(pos);
11265 break;
11266 }
11267 var left = node;
11268 delete node;
11269 }
11270 else {
11271 this.reader.seek_set(pos);
11272 break;
11273 }
11274 }
11275 return left;
11276}
11277
11278ExprParser.prototype.parse_rlist = function() {
11279 var rlist = [];
11280 var token = this.tokenizer.peek();
11281 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
11282 this.tokenizer.get();
11283 }
11284 else {
11285 while (TRUE) {
11286 viml_add(rlist, this.parse_expr1());
11287 var token = this.tokenizer.get();
11288 if (token.type == TOKEN_COMMA) {
11289 // XXX: Vim allows foo(a, b, ). Lint should warn it.
11290 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
11291 this.tokenizer.get();
11292 break;
11293 }
11294 }
11295 else if (token.type == TOKEN_PCLOSE) {
11296 break;
11297 }
11298 else {
11299 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11300 }
11301 }
11302 }
11303 if (viml_len(rlist) > MAX_FUNC_ARGS) {
11304 // TODO: funcname E740: Too many arguments for function: %s
11305 throw Err("E740: Too many arguments for function", token.pos);
11306 }
11307 return rlist;
11308}
11309
11310// expr9: number
11311// "string"
11312// 'string'
11313// [expr1, ...]
11314// {expr1: expr1, ...}
11315// #{literal_key1: expr1, ...}
11316// {args -> expr1}
11317// &option
11318// (expr1)
11319// variable
11320// var{ria}ble
11321// $VAR
11322// @r
11323// function(expr1, ...)
11324// func{ti}on(expr1, ...)
11325ExprParser.prototype.parse_expr9 = function() {
11326 var pos = this.reader.tell();
11327 var token = this.tokenizer.get();
11328 var node = Node(-1);
11329 if (token.type == TOKEN_NUMBER) {
11330 var node = Node(NODE_NUMBER);
11331 node.pos = token.pos;
11332 node.value = token.value;
11333 }
11334 else if (token.type == TOKEN_BLOB) {
11335 var node = Node(NODE_BLOB);
11336 node.pos = token.pos;
11337 node.value = token.value;
11338 }
11339 else if (token.type == TOKEN_DQUOTE) {
11340 this.reader.seek_set(pos);
11341 var node = Node(NODE_STRING);
11342 node.pos = token.pos;
11343 node.value = "\"" + this.tokenizer.get_dstring() + "\"";
11344 }
11345 else if (token.type == TOKEN_SQUOTE) {
11346 this.reader.seek_set(pos);
11347 var node = Node(NODE_STRING);
11348 node.pos = token.pos;
11349 node.value = "'" + this.tokenizer.get_sstring() + "'";
11350 }
11351 else if (token.type == TOKEN_SQOPEN) {
11352 var node = Node(NODE_LIST);
11353 node.pos = token.pos;
11354 node.value = [];
11355 var token = this.tokenizer.peek();
11356 if (token.type == TOKEN_SQCLOSE) {
11357 this.tokenizer.get();
11358 }
11359 else {
11360 while (TRUE) {
11361 viml_add(node.value, this.parse_expr1());
11362 var token = this.tokenizer.peek();
11363 if (token.type == TOKEN_COMMA) {
11364 this.tokenizer.get();
11365 if (this.tokenizer.peek().type == TOKEN_SQCLOSE) {
11366 this.tokenizer.get();
11367 break;
11368 }
11369 }
11370 else if (token.type == TOKEN_SQCLOSE) {
11371 this.tokenizer.get();
11372 break;
11373 }
11374 else {
11375 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11376 }
11377 }
11378 }
11379 }
11380 else if (token.type == TOKEN_COPEN || token.type == TOKEN_LITCOPEN) {
11381 var is_litdict = token.type == TOKEN_LITCOPEN;
11382 var savepos = this.reader.tell();
11383 var nodepos = token.pos;
11384 var token = this.tokenizer.get();
11385 var lambda = token.type == TOKEN_ARROW;
11386 if (!lambda && !(token.type == TOKEN_SQUOTE || token.type == TOKEN_DQUOTE)) {
11387 // if the token type is stirng, we cannot peek next token and we can
11388 // assume it's not lambda.
11389 var token2 = this.tokenizer.peek();
11390 var lambda = token2.type == TOKEN_ARROW || token2.type == TOKEN_COMMA;
11391 }
11392 // fallback to dict or {expr} if true
11393 var fallback = FALSE;
11394 if (lambda) {
11395 // lambda {token,...} {->...} {token->...}
11396 var node = Node(NODE_LAMBDA);
11397 node.pos = nodepos;
11398 node.rlist = [];
11399 var named = {};
11400 while (TRUE) {
11401 if (token.type == TOKEN_ARROW) {
11402 break;
11403 }
11404 else if (token.type == TOKEN_IDENTIFIER) {
11405 if (!isargname(token.value)) {
11406 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
11407 }
11408 else if (viml_has_key(named, token.value)) {
11409 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
11410 }
11411 named[token.value] = 1;
11412 var varnode = Node(NODE_IDENTIFIER);
11413 varnode.pos = token.pos;
11414 varnode.value = token.value;
11415 // XXX: Vim doesn't skip white space before comma. {a ,b -> ...} => E475
11416 if (iswhite(this.reader.p(0)) && this.tokenizer.peek().type == TOKEN_COMMA) {
11417 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
11418 }
11419 var token = this.tokenizer.get();
11420 viml_add(node.rlist, varnode);
11421 if (token.type == TOKEN_COMMA) {
11422 // XXX: Vim allows last comma. {a, b, -> ...} => OK
11423 var token = this.tokenizer.peek();
11424 if (token.type == TOKEN_ARROW) {
11425 this.tokenizer.get();
11426 break;
11427 }
11428 }
11429 else if (token.type == TOKEN_ARROW) {
11430 break;
11431 }
11432 else {
11433 throw Err(viml_printf("unexpected token: %s, type: %d", token.value, token.type), token.pos);
11434 }
11435 }
11436 else if (token.type == TOKEN_DOTDOTDOT) {
11437 var varnode = Node(NODE_IDENTIFIER);
11438 varnode.pos = token.pos;
11439 varnode.value = token.value;
11440 viml_add(node.rlist, varnode);
11441 var token = this.tokenizer.peek();
11442 if (token.type == TOKEN_ARROW) {
11443 this.tokenizer.get();
11444 break;
11445 }
11446 else {
11447 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11448 }
11449 }
11450 else {
11451 var fallback = TRUE;
11452 break;
11453 }
11454 var token = this.tokenizer.get();
11455 }
11456 if (!fallback) {
11457 node.left = this.parse_expr1();
11458 var token = this.tokenizer.get();
11459 if (token.type != TOKEN_CCLOSE) {
11460 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11461 }
11462 return node;
11463 }
11464 }
11465 // dict
11466 var node = Node(NODE_DICT);
11467 node.pos = nodepos;
11468 node.value = [];
11469 this.reader.seek_set(savepos);
11470 var token = this.tokenizer.peek();
11471 if (token.type == TOKEN_CCLOSE) {
11472 this.tokenizer.get();
11473 return node;
11474 }
11475 while (1) {
11476 var key = is_litdict ? this.tokenizer.parse_dict_literal_key() : this.parse_expr1();
11477 var token = this.tokenizer.get();
11478 if (token.type == TOKEN_CCLOSE) {
11479 if (!viml_empty(node.value)) {
11480 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11481 }
11482 this.reader.seek_set(pos);
11483 var node = this.parse_identifier();
11484 break;
11485 }
11486 if (token.type != TOKEN_COLON) {
11487 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11488 }
11489 var val = this.parse_expr1();
11490 viml_add(node.value, [key, val]);
11491 var token = this.tokenizer.get();
11492 if (token.type == TOKEN_COMMA) {
11493 if (this.tokenizer.peek().type == TOKEN_CCLOSE) {
11494 this.tokenizer.get();
11495 break;
11496 }
11497 }
11498 else if (token.type == TOKEN_CCLOSE) {
11499 break;
11500 }
11501 else {
11502 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11503 }
11504 }
11505 return node;
11506 }
11507 else if (token.type == TOKEN_POPEN) {
11508 var node = this.parse_expr1();
11509 var token = this.tokenizer.get();
11510 if (token.type != TOKEN_PCLOSE) {
11511 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11512 }
11513 }
11514 else if (token.type == TOKEN_OPTION) {
11515 var node = Node(NODE_OPTION);
11516 node.pos = token.pos;
11517 node.value = token.value;
11518 }
11519 else if (token.type == TOKEN_IDENTIFIER) {
11520 this.reader.seek_set(pos);
11521 var node = this.parse_identifier();
11522 }
11523 else if (FALSE && (token.type == TOKEN_COLON || token.type == TOKEN_SHARP)) {
11524 // XXX: no parse error but invalid expression
11525 this.reader.seek_set(pos);
11526 var node = this.parse_identifier();
11527 }
11528 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
11529 this.reader.seek_set(pos);
11530 var node = this.parse_identifier();
11531 }
11532 else if (token.type == TOKEN_IS || token.type == TOKEN_ISCS || token.type == TOKEN_ISNOT || token.type == TOKEN_ISNOTCS) {
11533 this.reader.seek_set(pos);
11534 var node = this.parse_identifier();
11535 }
11536 else if (token.type == TOKEN_ENV) {
11537 var node = Node(NODE_ENV);
11538 node.pos = token.pos;
11539 node.value = token.value;
11540 }
11541 else if (token.type == TOKEN_REG) {
11542 var node = Node(NODE_REG);
11543 node.pos = token.pos;
11544 node.value = token.value;
11545 }
11546 else {
11547 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11548 }
11549 return node;
11550}
11551
11552// SUBSCRIPT or CONCAT
11553// dict "." [0-9A-Za-z_]+ => (subscript dict key)
11554// str "." expr6 => (concat str expr6)
11555ExprParser.prototype.parse_dot = function(token, left) {
11556 if (left.type != NODE_IDENTIFIER && left.type != NODE_CURLYNAME && left.type != NODE_DICT && left.type != NODE_SUBSCRIPT && left.type != NODE_CALL && left.type != NODE_DOT) {
11557 return NIL;
11558 }
11559 if (!iswordc(this.reader.p(0))) {
11560 return NIL;
11561 }
11562 var pos = this.reader.getpos();
11563 var name = this.reader.read_word();
11564 if (isnamec(this.reader.p(0))) {
11565 // XXX: foo is str => ok, foo is obj => invalid expression
11566 // foo.s:bar or foo.bar#baz
11567 return NIL;
11568 }
11569 var node = Node(NODE_DOT);
11570 node.pos = token.pos;
11571 node.left = left;
11572 node.right = Node(NODE_IDENTIFIER);
11573 node.right.pos = pos;
11574 node.right.value = name;
11575 return node;
11576}
11577
11578// CONCAT
11579// str ".." expr6 => (concat str expr6)
11580ExprParser.prototype.parse_concat = function(token, left) {
11581 if (left.type != NODE_IDENTIFIER && left.type != NODE_CURLYNAME && left.type != NODE_DICT && left.type != NODE_SUBSCRIPT && left.type != NODE_CALL && left.type != NODE_DOT) {
11582 return NIL;
11583 }
11584 if (!iswordc(this.reader.p(0))) {
11585 return NIL;
11586 }
11587 var pos = this.reader.getpos();
11588 var name = this.reader.read_word();
11589 if (isnamec(this.reader.p(0))) {
11590 // XXX: foo is str => ok, foo is obj => invalid expression
11591 // foo.s:bar or foo.bar#baz
11592 return NIL;
11593 }
11594 var node = Node(NODE_CONCAT);
11595 node.pos = token.pos;
11596 node.left = left;
11597 node.right = Node(NODE_IDENTIFIER);
11598 node.right.pos = pos;
11599 node.right.value = name;
11600 return node;
11601}
11602
11603ExprParser.prototype.parse_identifier = function() {
11604 this.reader.skip_white();
11605 var npos = this.reader.getpos();
11606 var curly_parts = this.parse_curly_parts();
11607 if (viml_len(curly_parts) == 1 && curly_parts[0].type == NODE_CURLYNAMEPART) {
11608 var node = Node(NODE_IDENTIFIER);
11609 node.pos = npos;
11610 node.value = curly_parts[0].value;
11611 return node;
11612 }
11613 else {
11614 var node = Node(NODE_CURLYNAME);
11615 node.pos = npos;
11616 node.value = curly_parts;
11617 return node;
11618 }
11619}
11620
11621ExprParser.prototype.parse_curly_parts = function() {
11622 var curly_parts = [];
11623 var c = this.reader.peek();
11624 var pos = this.reader.getpos();
11625 if (c == "<" && viml_equalci(this.reader.peekn(5), "<SID>")) {
11626 var name = this.reader.getn(5);
11627 var node = Node(NODE_CURLYNAMEPART);
11628 node.curly = FALSE;
11629 // Keep backword compatibility for the curly attribute
11630 node.pos = pos;
11631 node.value = name;
11632 viml_add(curly_parts, node);
11633 }
11634 while (TRUE) {
11635 var c = this.reader.peek();
11636 if (isnamec(c)) {
11637 var pos = this.reader.getpos();
11638 var name = this.reader.read_name();
11639 var node = Node(NODE_CURLYNAMEPART);
11640 node.curly = FALSE;
11641 // Keep backword compatibility for the curly attribute
11642 node.pos = pos;
11643 node.value = name;
11644 viml_add(curly_parts, node);
11645 }
11646 else if (c == "{") {
11647 this.reader.get();
11648 var pos = this.reader.getpos();
11649 var node = Node(NODE_CURLYNAMEEXPR);
11650 node.curly = TRUE;
11651 // Keep backword compatibility for the curly attribute
11652 node.pos = pos;
11653 node.value = this.parse_expr1();
11654 viml_add(curly_parts, node);
11655 this.reader.skip_white();
11656 var c = this.reader.p(0);
11657 if (c != "}") {
11658 throw Err(viml_printf("unexpected token: %s", c), this.reader.getpos());
11659 }
11660 this.reader.seek_cur(1);
11661 }
11662 else {
11663 break;
11664 }
11665 }
11666 return curly_parts;
11667}
11668
11669function LvalueParser() { ExprParser.apply(this, arguments); this.__init__.apply(this, arguments); }
11670LvalueParser.prototype = Object.create(ExprParser.prototype);
11671LvalueParser.prototype.parse = function() {
11672 return this.parse_lv8();
11673}
11674
11675// expr8: expr8[expr1]
11676// expr8[expr1 : expr1]
11677// expr8.name
11678LvalueParser.prototype.parse_lv8 = function() {
11679 var left = this.parse_lv9();
11680 while (TRUE) {
11681 var pos = this.reader.tell();
11682 var c = this.reader.peek();
11683 var token = this.tokenizer.get();
11684 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
11685 var npos = token.pos;
11686 var node = Node(-1);
11687 if (this.tokenizer.peek().type == TOKEN_COLON) {
11688 this.tokenizer.get();
11689 var node = Node(NODE_SLICE);
11690 node.pos = npos;
11691 node.left = left;
11692 node.rlist = [NIL, NIL];
11693 var token = this.tokenizer.peek();
11694 if (token.type != TOKEN_SQCLOSE) {
11695 node.rlist[1] = this.parse_expr1();
11696 }
11697 var token = this.tokenizer.get();
11698 if (token.type != TOKEN_SQCLOSE) {
11699 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11700 }
11701 }
11702 else {
11703 var right = this.parse_expr1();
11704 if (this.tokenizer.peek().type == TOKEN_COLON) {
11705 this.tokenizer.get();
11706 var node = Node(NODE_SLICE);
11707 node.pos = npos;
11708 node.left = left;
11709 node.rlist = [right, NIL];
11710 var token = this.tokenizer.peek();
11711 if (token.type != TOKEN_SQCLOSE) {
11712 node.rlist[1] = this.parse_expr1();
11713 }
11714 var token = this.tokenizer.get();
11715 if (token.type != TOKEN_SQCLOSE) {
11716 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11717 }
11718 }
11719 else {
11720 var node = Node(NODE_SUBSCRIPT);
11721 node.pos = npos;
11722 node.left = left;
11723 node.right = right;
11724 var token = this.tokenizer.get();
11725 if (token.type != TOKEN_SQCLOSE) {
11726 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11727 }
11728 }
11729 }
11730 var left = node;
11731 delete node;
11732 }
11733 else if (!iswhite(c) && token.type == TOKEN_DOT) {
11734 var node = this.parse_dot(token, left);
11735 if (node === NIL) {
11736 this.reader.seek_set(pos);
11737 break;
11738 }
11739 var left = node;
11740 delete node;
11741 }
11742 else {
11743 this.reader.seek_set(pos);
11744 break;
11745 }
11746 }
11747 return left;
11748}
11749
11750// expr9: &option
11751// variable
11752// var{ria}ble
11753// $VAR
11754// @r
11755LvalueParser.prototype.parse_lv9 = function() {
11756 var pos = this.reader.tell();
11757 var token = this.tokenizer.get();
11758 var node = Node(-1);
11759 if (token.type == TOKEN_COPEN) {
11760 this.reader.seek_set(pos);
11761 var node = this.parse_identifier();
11762 }
11763 else if (token.type == TOKEN_OPTION) {
11764 var node = Node(NODE_OPTION);
11765 node.pos = token.pos;
11766 node.value = token.value;
11767 }
11768 else if (token.type == TOKEN_IDENTIFIER) {
11769 this.reader.seek_set(pos);
11770 var node = this.parse_identifier();
11771 }
11772 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
11773 this.reader.seek_set(pos);
11774 var node = this.parse_identifier();
11775 }
11776 else if (token.type == TOKEN_ENV) {
11777 var node = Node(NODE_ENV);
11778 node.pos = token.pos;
11779 node.value = token.value;
11780 }
11781 else if (token.type == TOKEN_REG) {
11782 var node = Node(NODE_REG);
11783 node.pos = token.pos;
11784 node.pos = token.pos;
11785 node.value = token.value;
11786 }
11787 else {
11788 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
11789 }
11790 return node;
11791}
11792
11793function StringReader() { this.__init__.apply(this, arguments); }
11794StringReader.prototype.__init__ = function(lines) {
11795 this.buf = [];
11796 this.pos = [];
11797 var lnum = 0;
11798 var offset = 0;
11799 while (lnum < viml_len(lines)) {
11800 var col = 0;
11801 var __c7 = viml_split(lines[lnum], "\\zs");
11802 for (var __i7 = 0; __i7 < __c7.length; ++__i7) {
11803 var c = __c7[__i7];
11804 viml_add(this.buf, c);
11805 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11806 col += viml_len(c);
11807 offset += viml_len(c);
11808 }
11809 while (lnum + 1 < viml_len(lines) && viml_eqregh(lines[lnum + 1], "^\\s*\\\\")) {
11810 var skip = TRUE;
11811 var col = 0;
11812 var __c8 = viml_split(lines[lnum + 1], "\\zs");
11813 for (var __i8 = 0; __i8 < __c8.length; ++__i8) {
11814 var c = __c8[__i8];
11815 if (skip) {
11816 if (c == "\\") {
11817 var skip = FALSE;
11818 }
11819 }
11820 else {
11821 viml_add(this.buf, c);
11822 viml_add(this.pos, [lnum + 2, col + 1, offset]);
11823 }
11824 col += viml_len(c);
11825 offset += viml_len(c);
11826 }
11827 lnum += 1;
11828 offset += 1;
11829 }
11830 viml_add(this.buf, "<EOL>");
11831 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11832 lnum += 1;
11833 offset += 1;
11834 }
11835 // for <EOF>
11836 viml_add(this.pos, [lnum + 1, 0, offset]);
11837 this.i = 0;
11838}
11839
11840StringReader.prototype.eof = function() {
11841 return this.i >= viml_len(this.buf);
11842}
11843
11844StringReader.prototype.tell = function() {
11845 return this.i;
11846}
11847
11848StringReader.prototype.seek_set = function(i) {
11849 this.i = i;
11850}
11851
11852StringReader.prototype.seek_cur = function(i) {
11853 this.i = this.i + i;
11854}
11855
11856StringReader.prototype.seek_end = function(i) {
11857 this.i = viml_len(this.buf) + i;
11858}
11859
11860StringReader.prototype.p = function(i) {
11861 if (this.i >= viml_len(this.buf)) {
11862 return "<EOF>";
11863 }
11864 return this.buf[this.i + i];
11865}
11866
11867StringReader.prototype.peek = function() {
11868 if (this.i >= viml_len(this.buf)) {
11869 return "<EOF>";
11870 }
11871 return this.buf[this.i];
11872}
11873
11874StringReader.prototype.get = function() {
11875 if (this.i >= viml_len(this.buf)) {
11876 return "<EOF>";
11877 }
11878 this.i += 1;
11879 return this.buf[this.i - 1];
11880}
11881
11882StringReader.prototype.peekn = function(n) {
11883 var pos = this.tell();
11884 var r = this.getn(n);
11885 this.seek_set(pos);
11886 return r;
11887}
11888
11889StringReader.prototype.getn = function(n) {
11890 var r = "";
11891 var j = 0;
11892 while (this.i < viml_len(this.buf) && (n < 0 || j < n)) {
11893 var c = this.buf[this.i];
11894 if (c == "<EOL>") {
11895 break;
11896 }
11897 r += c;
11898 this.i += 1;
11899 j += 1;
11900 }
11901 return r;
11902}
11903
11904StringReader.prototype.peekline = function() {
11905 return this.peekn(-1);
11906}
11907
11908StringReader.prototype.readline = function() {
11909 var r = this.getn(-1);
11910 this.get();
11911 return r;
11912}
11913
11914StringReader.prototype.getstr = function(begin, end) {
11915 var r = "";
11916 var __c9 = viml_range(begin.i, end.i - 1);
11917 for (var __i9 = 0; __i9 < __c9.length; ++__i9) {
11918 var i = __c9[__i9];
11919 if (i >= viml_len(this.buf)) {
11920 break;
11921 }
11922 var c = this.buf[i];
11923 if (c == "<EOL>") {
11924 var c = "\n";
11925 }
11926 r += c;
11927 }
11928 return r;
11929}
11930
11931StringReader.prototype.getpos = function() {
11932 var __tmp = this.pos[this.i];
11933 var lnum = __tmp[0];
11934 var col = __tmp[1];
11935 var offset = __tmp[2];
11936 return {"i":this.i, "lnum":lnum, "col":col, "offset":offset};
11937}
11938
11939StringReader.prototype.setpos = function(pos) {
11940 this.i = pos.i;
11941}
11942
11943StringReader.prototype.read_alpha = function() {
11944 var r = "";
11945 while (isalpha(this.peekn(1))) {
11946 r += this.getn(1);
11947 }
11948 return r;
11949}
11950
11951StringReader.prototype.read_alnum = function() {
11952 var r = "";
11953 while (isalnum(this.peekn(1))) {
11954 r += this.getn(1);
11955 }
11956 return r;
11957}
11958
11959StringReader.prototype.read_digit = function() {
11960 var r = "";
11961 while (isdigit(this.peekn(1))) {
11962 r += this.getn(1);
11963 }
11964 return r;
11965}
11966
11967StringReader.prototype.read_odigit = function() {
11968 var r = "";
11969 while (isodigit(this.peekn(1))) {
11970 r += this.getn(1);
11971 }
11972 return r;
11973}
11974
11975StringReader.prototype.read_blob = function() {
11976 var r = "";
11977 while (1) {
11978 var s = this.peekn(2);
11979 if (viml_eqregh(s, "^[0-9A-Fa-f][0-9A-Fa-f]$")) {
11980 r += this.getn(2);
11981 }
11982 else if (viml_eqregh(s, "^\\.[0-9A-Fa-f]$")) {
11983 r += this.getn(1);
11984 }
11985 else if (viml_eqregh(s, "^[0-9A-Fa-f][^0-9A-Fa-f]$")) {
11986 throw Err("E973: Blob literal should have an even number of hex characters:" + s, this.getpos());
11987 }
11988 else {
11989 break;
11990 }
11991 }
11992 return r;
11993}
11994
11995StringReader.prototype.read_xdigit = function() {
11996 var r = "";
11997 while (isxdigit(this.peekn(1))) {
11998 r += this.getn(1);
11999 }
12000 return r;
12001}
12002
12003StringReader.prototype.read_bdigit = function() {
12004 var r = "";
12005 while (this.peekn(1) == "0" || this.peekn(1) == "1") {
12006 r += this.getn(1);
12007 }
12008 return r;
12009}
12010
12011StringReader.prototype.read_integer = function() {
12012 var r = "";
12013 var c = this.peekn(1);
12014 if (c == "-" || c == "+") {
12015 var r = this.getn(1);
12016 }
12017 return r + this.read_digit();
12018}
12019
12020StringReader.prototype.read_word = function() {
12021 var r = "";
12022 while (iswordc(this.peekn(1))) {
12023 r += this.getn(1);
12024 }
12025 return r;
12026}
12027
12028StringReader.prototype.read_white = function() {
12029 var r = "";
12030 while (iswhite(this.peekn(1))) {
12031 r += this.getn(1);
12032 }
12033 return r;
12034}
12035
12036StringReader.prototype.read_nonwhite = function() {
12037 var r = "";
12038 var ch = this.peekn(1);
12039 while (!iswhite(ch) && ch != "") {
12040 r += this.getn(1);
12041 var ch = this.peekn(1);
12042 }
12043 return r;
12044}
12045
12046StringReader.prototype.read_name = function() {
12047 var r = "";
12048 while (isnamec(this.peekn(1))) {
12049 r += this.getn(1);
12050 }
12051 return r;
12052}
12053
12054StringReader.prototype.skip_white = function() {
12055 while (iswhite(this.peekn(1))) {
12056 this.seek_cur(1);
12057 }
12058}
12059
12060StringReader.prototype.skip_white_and_colon = function() {
12061 while (TRUE) {
12062 var c = this.peekn(1);
12063 if (!iswhite(c) && c != ":") {
12064 break;
12065 }
12066 this.seek_cur(1);
12067 }
12068}
12069
12070function Compiler() { this.__init__.apply(this, arguments); }
12071Compiler.prototype.__init__ = function() {
12072 this.indent = [""];
12073 this.lines = [];
12074}
12075
12076Compiler.prototype.out = function() {
12077 var a000 = Array.prototype.slice.call(arguments, 0);
12078 if (viml_len(a000) == 1) {
12079 if (a000[0][0] == ")") {
12080 this.lines[this.lines.length - 1] += a000[0];
12081 }
12082 else {
12083 viml_add(this.lines, this.indent[0] + a000[0]);
12084 }
12085 }
12086 else {
12087 viml_add(this.lines, this.indent[0] + viml_printf.apply(null, a000));
12088 }
12089}
12090
12091Compiler.prototype.incindent = function(s) {
12092 viml_insert(this.indent, this.indent[0] + s);
12093}
12094
12095Compiler.prototype.decindent = function() {
12096 viml_remove(this.indent, 0);
12097}
12098
12099Compiler.prototype.compile = function(node) {
12100 if (node.type == NODE_TOPLEVEL) {
12101 return this.compile_toplevel(node);
12102 }
12103 else if (node.type == NODE_COMMENT) {
12104 this.compile_comment(node);
12105 return NIL;
12106 }
12107 else if (node.type == NODE_EXCMD) {
12108 this.compile_excmd(node);
12109 return NIL;
12110 }
12111 else if (node.type == NODE_FUNCTION) {
12112 this.compile_function(node);
12113 return NIL;
12114 }
12115 else if (node.type == NODE_DELFUNCTION) {
12116 this.compile_delfunction(node);
12117 return NIL;
12118 }
12119 else if (node.type == NODE_RETURN) {
12120 this.compile_return(node);
12121 return NIL;
12122 }
12123 else if (node.type == NODE_EXCALL) {
12124 this.compile_excall(node);
12125 return NIL;
12126 }
12127 else if (node.type == NODE_EVAL) {
12128 this.compile_eval(node);
12129 return NIL;
12130 }
12131 else if (node.type == NODE_LET) {
12132 this.compile_let(node);
12133 return NIL;
12134 }
12135 else if (node.type == NODE_CONST) {
12136 this.compile_const(node);
12137 return NIL;
12138 }
12139 else if (node.type == NODE_UNLET) {
12140 this.compile_unlet(node);
12141 return NIL;
12142 }
12143 else if (node.type == NODE_LOCKVAR) {
12144 this.compile_lockvar(node);
12145 return NIL;
12146 }
12147 else if (node.type == NODE_UNLOCKVAR) {
12148 this.compile_unlockvar(node);
12149 return NIL;
12150 }
12151 else if (node.type == NODE_IF) {
12152 this.compile_if(node);
12153 return NIL;
12154 }
12155 else if (node.type == NODE_WHILE) {
12156 this.compile_while(node);
12157 return NIL;
12158 }
12159 else if (node.type == NODE_FOR) {
12160 this.compile_for(node);
12161 return NIL;
12162 }
12163 else if (node.type == NODE_CONTINUE) {
12164 this.compile_continue(node);
12165 return NIL;
12166 }
12167 else if (node.type == NODE_BREAK) {
12168 this.compile_break(node);
12169 return NIL;
12170 }
12171 else if (node.type == NODE_TRY) {
12172 this.compile_try(node);
12173 return NIL;
12174 }
12175 else if (node.type == NODE_THROW) {
12176 this.compile_throw(node);
12177 return NIL;
12178 }
12179 else if (node.type == NODE_ECHO) {
12180 this.compile_echo(node);
12181 return NIL;
12182 }
12183 else if (node.type == NODE_ECHON) {
12184 this.compile_echon(node);
12185 return NIL;
12186 }
12187 else if (node.type == NODE_ECHOHL) {
12188 this.compile_echohl(node);
12189 return NIL;
12190 }
12191 else if (node.type == NODE_ECHOMSG) {
12192 this.compile_echomsg(node);
12193 return NIL;
12194 }
12195 else if (node.type == NODE_ECHOERR) {
12196 this.compile_echoerr(node);
12197 return NIL;
12198 }
12199 else if (node.type == NODE_EXECUTE) {
12200 this.compile_execute(node);
12201 return NIL;
12202 }
12203 else if (node.type == NODE_TERNARY) {
12204 return this.compile_ternary(node);
12205 }
12206 else if (node.type == NODE_OR) {
12207 return this.compile_or(node);
12208 }
12209 else if (node.type == NODE_AND) {
12210 return this.compile_and(node);
12211 }
12212 else if (node.type == NODE_EQUAL) {
12213 return this.compile_equal(node);
12214 }
12215 else if (node.type == NODE_EQUALCI) {
12216 return this.compile_equalci(node);
12217 }
12218 else if (node.type == NODE_EQUALCS) {
12219 return this.compile_equalcs(node);
12220 }
12221 else if (node.type == NODE_NEQUAL) {
12222 return this.compile_nequal(node);
12223 }
12224 else if (node.type == NODE_NEQUALCI) {
12225 return this.compile_nequalci(node);
12226 }
12227 else if (node.type == NODE_NEQUALCS) {
12228 return this.compile_nequalcs(node);
12229 }
12230 else if (node.type == NODE_GREATER) {
12231 return this.compile_greater(node);
12232 }
12233 else if (node.type == NODE_GREATERCI) {
12234 return this.compile_greaterci(node);
12235 }
12236 else if (node.type == NODE_GREATERCS) {
12237 return this.compile_greatercs(node);
12238 }
12239 else if (node.type == NODE_GEQUAL) {
12240 return this.compile_gequal(node);
12241 }
12242 else if (node.type == NODE_GEQUALCI) {
12243 return this.compile_gequalci(node);
12244 }
12245 else if (node.type == NODE_GEQUALCS) {
12246 return this.compile_gequalcs(node);
12247 }
12248 else if (node.type == NODE_SMALLER) {
12249 return this.compile_smaller(node);
12250 }
12251 else if (node.type == NODE_SMALLERCI) {
12252 return this.compile_smallerci(node);
12253 }
12254 else if (node.type == NODE_SMALLERCS) {
12255 return this.compile_smallercs(node);
12256 }
12257 else if (node.type == NODE_SEQUAL) {
12258 return this.compile_sequal(node);
12259 }
12260 else if (node.type == NODE_SEQUALCI) {
12261 return this.compile_sequalci(node);
12262 }
12263 else if (node.type == NODE_SEQUALCS) {
12264 return this.compile_sequalcs(node);
12265 }
12266 else if (node.type == NODE_MATCH) {
12267 return this.compile_match(node);
12268 }
12269 else if (node.type == NODE_MATCHCI) {
12270 return this.compile_matchci(node);
12271 }
12272 else if (node.type == NODE_MATCHCS) {
12273 return this.compile_matchcs(node);
12274 }
12275 else if (node.type == NODE_NOMATCH) {
12276 return this.compile_nomatch(node);
12277 }
12278 else if (node.type == NODE_NOMATCHCI) {
12279 return this.compile_nomatchci(node);
12280 }
12281 else if (node.type == NODE_NOMATCHCS) {
12282 return this.compile_nomatchcs(node);
12283 }
12284 else if (node.type == NODE_IS) {
12285 return this.compile_is(node);
12286 }
12287 else if (node.type == NODE_ISCI) {
12288 return this.compile_isci(node);
12289 }
12290 else if (node.type == NODE_ISCS) {
12291 return this.compile_iscs(node);
12292 }
12293 else if (node.type == NODE_ISNOT) {
12294 return this.compile_isnot(node);
12295 }
12296 else if (node.type == NODE_ISNOTCI) {
12297 return this.compile_isnotci(node);
12298 }
12299 else if (node.type == NODE_ISNOTCS) {
12300 return this.compile_isnotcs(node);
12301 }
12302 else if (node.type == NODE_ADD) {
12303 return this.compile_add(node);
12304 }
12305 else if (node.type == NODE_SUBTRACT) {
12306 return this.compile_subtract(node);
12307 }
12308 else if (node.type == NODE_CONCAT) {
12309 return this.compile_concat(node);
12310 }
12311 else if (node.type == NODE_MULTIPLY) {
12312 return this.compile_multiply(node);
12313 }
12314 else if (node.type == NODE_DIVIDE) {
12315 return this.compile_divide(node);
12316 }
12317 else if (node.type == NODE_REMAINDER) {
12318 return this.compile_remainder(node);
12319 }
12320 else if (node.type == NODE_NOT) {
12321 return this.compile_not(node);
12322 }
12323 else if (node.type == NODE_PLUS) {
12324 return this.compile_plus(node);
12325 }
12326 else if (node.type == NODE_MINUS) {
12327 return this.compile_minus(node);
12328 }
12329 else if (node.type == NODE_SUBSCRIPT) {
12330 return this.compile_subscript(node);
12331 }
12332 else if (node.type == NODE_SLICE) {
12333 return this.compile_slice(node);
12334 }
12335 else if (node.type == NODE_DOT) {
12336 return this.compile_dot(node);
12337 }
12338 else if (node.type == NODE_METHOD) {
12339 return this.compile_method(node);
12340 }
12341 else if (node.type == NODE_CALL) {
12342 return this.compile_call(node);
12343 }
12344 else if (node.type == NODE_NUMBER) {
12345 return this.compile_number(node);
12346 }
12347 else if (node.type == NODE_BLOB) {
12348 return this.compile_blob(node);
12349 }
12350 else if (node.type == NODE_STRING) {
12351 return this.compile_string(node);
12352 }
12353 else if (node.type == NODE_LIST) {
12354 return this.compile_list(node);
12355 }
12356 else if (node.type == NODE_DICT) {
12357 return this.compile_dict(node);
12358 }
12359 else if (node.type == NODE_OPTION) {
12360 return this.compile_option(node);
12361 }
12362 else if (node.type == NODE_IDENTIFIER) {
12363 return this.compile_identifier(node);
12364 }
12365 else if (node.type == NODE_CURLYNAME) {
12366 return this.compile_curlyname(node);
12367 }
12368 else if (node.type == NODE_ENV) {
12369 return this.compile_env(node);
12370 }
12371 else if (node.type == NODE_REG) {
12372 return this.compile_reg(node);
12373 }
12374 else if (node.type == NODE_CURLYNAMEPART) {
12375 return this.compile_curlynamepart(node);
12376 }
12377 else if (node.type == NODE_CURLYNAMEEXPR) {
12378 return this.compile_curlynameexpr(node);
12379 }
12380 else if (node.type == NODE_LAMBDA) {
12381 return this.compile_lambda(node);
12382 }
12383 else if (node.type == NODE_HEREDOC) {
12384 return this.compile_heredoc(node);
12385 }
12386 else {
12387 throw viml_printf("Compiler: unknown node: %s", viml_string(node));
12388 }
12389 return NIL;
12390}
12391
12392Compiler.prototype.compile_body = function(body) {
12393 var __c10 = body;
12394 for (var __i10 = 0; __i10 < __c10.length; ++__i10) {
12395 var node = __c10[__i10];
12396 this.compile(node);
12397 }
12398}
12399
12400Compiler.prototype.compile_toplevel = function(node) {
12401 this.compile_body(node.body);
12402 return this.lines;
12403}
12404
12405Compiler.prototype.compile_comment = function(node) {
12406 this.out(";%s", node.str);
12407}
12408
12409Compiler.prototype.compile_excmd = function(node) {
12410 this.out("(excmd \"%s\")", viml_escape(node.str, "\\\""));
12411}
12412
12413Compiler.prototype.compile_function = function(node) {
12414 var left = this.compile(node.left);
12415 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12416 var default_args = node.default_args.map((function(vval) { return this.compile(vval); }).bind(this));
12417 if (!viml_empty(rlist)) {
12418 var remaining = FALSE;
12419 if (rlist[rlist.length - 1] == "...") {
12420 viml_remove(rlist, -1);
12421 var remaining = TRUE;
12422 }
12423 var __c11 = viml_range(viml_len(rlist));
12424 for (var __i11 = 0; __i11 < __c11.length; ++__i11) {
12425 var i = __c11[__i11];
12426 if (i < viml_len(rlist) - viml_len(default_args)) {
12427 left += viml_printf(" %s", rlist[i]);
12428 }
12429 else {
12430 left += viml_printf(" (%s %s)", rlist[i], default_args[i + viml_len(default_args) - viml_len(rlist)]);
12431 }
12432 }
12433 if (remaining) {
12434 left += " . ...";
12435 }
12436 }
12437 this.out("(function (%s)", left);
12438 this.incindent(" ");
12439 this.compile_body(node.body);
12440 this.out(")");
12441 this.decindent();
12442}
12443
12444Compiler.prototype.compile_delfunction = function(node) {
12445 this.out("(delfunction %s)", this.compile(node.left));
12446}
12447
12448Compiler.prototype.compile_return = function(node) {
12449 if (node.left === NIL) {
12450 this.out("(return)");
12451 }
12452 else {
12453 this.out("(return %s)", this.compile(node.left));
12454 }
12455}
12456
12457Compiler.prototype.compile_excall = function(node) {
12458 this.out("(call %s)", this.compile(node.left));
12459}
12460
12461Compiler.prototype.compile_eval = function(node) {
12462 this.out("(eval %s)", this.compile(node.left));
12463}
12464
12465Compiler.prototype.compile_let = function(node) {
12466 var left = "";
12467 if (node.left !== NIL) {
12468 var left = this.compile(node.left);
12469 }
12470 else {
12471 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12472 if (node.rest !== NIL) {
12473 left += " . " + this.compile(node.rest);
12474 }
12475 var left = "(" + left + ")";
12476 }
12477 var right = this.compile(node.right);
12478 this.out("(let %s %s %s)", node.op, left, right);
12479}
12480
12481// TODO: merge with s:Compiler.compile_let() ?
12482Compiler.prototype.compile_const = function(node) {
12483 var left = "";
12484 if (node.left !== NIL) {
12485 var left = this.compile(node.left);
12486 }
12487 else {
12488 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12489 if (node.rest !== NIL) {
12490 left += " . " + this.compile(node.rest);
12491 }
12492 var left = "(" + left + ")";
12493 }
12494 var right = this.compile(node.right);
12495 this.out("(const %s %s %s)", node.op, left, right);
12496}
12497
12498Compiler.prototype.compile_unlet = function(node) {
12499 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12500 this.out("(unlet %s)", viml_join(list, " "));
12501}
12502
12503Compiler.prototype.compile_lockvar = function(node) {
12504 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12505 if (node.depth === NIL) {
12506 this.out("(lockvar %s)", viml_join(list, " "));
12507 }
12508 else {
12509 this.out("(lockvar %s %s)", node.depth, viml_join(list, " "));
12510 }
12511}
12512
12513Compiler.prototype.compile_unlockvar = function(node) {
12514 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12515 if (node.depth === NIL) {
12516 this.out("(unlockvar %s)", viml_join(list, " "));
12517 }
12518 else {
12519 this.out("(unlockvar %s %s)", node.depth, viml_join(list, " "));
12520 }
12521}
12522
12523Compiler.prototype.compile_if = function(node) {
12524 this.out("(if %s", this.compile(node.cond));
12525 this.incindent(" ");
12526 this.compile_body(node.body);
12527 this.decindent();
12528 var __c12 = node.elseif;
12529 for (var __i12 = 0; __i12 < __c12.length; ++__i12) {
12530 var enode = __c12[__i12];
12531 this.out(" elseif %s", this.compile(enode.cond));
12532 this.incindent(" ");
12533 this.compile_body(enode.body);
12534 this.decindent();
12535 }
12536 if (node._else !== NIL) {
12537 this.out(" else");
12538 this.incindent(" ");
12539 this.compile_body(node._else.body);
12540 this.decindent();
12541 }
12542 this.incindent(" ");
12543 this.out(")");
12544 this.decindent();
12545}
12546
12547Compiler.prototype.compile_while = function(node) {
12548 this.out("(while %s", this.compile(node.cond));
12549 this.incindent(" ");
12550 this.compile_body(node.body);
12551 this.out(")");
12552 this.decindent();
12553}
12554
12555Compiler.prototype.compile_for = function(node) {
12556 var left = "";
12557 if (node.left !== NIL) {
12558 var left = this.compile(node.left);
12559 }
12560 else {
12561 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
12562 if (node.rest !== NIL) {
12563 left += " . " + this.compile(node.rest);
12564 }
12565 var left = "(" + left + ")";
12566 }
12567 var right = this.compile(node.right);
12568 this.out("(for %s %s", left, right);
12569 this.incindent(" ");
12570 this.compile_body(node.body);
12571 this.out(")");
12572 this.decindent();
12573}
12574
12575Compiler.prototype.compile_continue = function(node) {
12576 this.out("(continue)");
12577}
12578
12579Compiler.prototype.compile_break = function(node) {
12580 this.out("(break)");
12581}
12582
12583Compiler.prototype.compile_try = function(node) {
12584 this.out("(try");
12585 this.incindent(" ");
12586 this.compile_body(node.body);
12587 var __c13 = node.catch;
12588 for (var __i13 = 0; __i13 < __c13.length; ++__i13) {
12589 var cnode = __c13[__i13];
12590 if (cnode.pattern !== NIL) {
12591 this.decindent();
12592 this.out(" catch /%s/", cnode.pattern);
12593 this.incindent(" ");
12594 this.compile_body(cnode.body);
12595 }
12596 else {
12597 this.decindent();
12598 this.out(" catch");
12599 this.incindent(" ");
12600 this.compile_body(cnode.body);
12601 }
12602 }
12603 if (node._finally !== NIL) {
12604 this.decindent();
12605 this.out(" finally");
12606 this.incindent(" ");
12607 this.compile_body(node._finally.body);
12608 }
12609 this.out(")");
12610 this.decindent();
12611}
12612
12613Compiler.prototype.compile_throw = function(node) {
12614 this.out("(throw %s)", this.compile(node.left));
12615}
12616
12617Compiler.prototype.compile_echo = function(node) {
12618 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12619 this.out("(echo %s)", viml_join(list, " "));
12620}
12621
12622Compiler.prototype.compile_echon = function(node) {
12623 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12624 this.out("(echon %s)", viml_join(list, " "));
12625}
12626
12627Compiler.prototype.compile_echohl = function(node) {
12628 this.out("(echohl \"%s\")", viml_escape(node.str, "\\\""));
12629}
12630
12631Compiler.prototype.compile_echomsg = function(node) {
12632 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12633 this.out("(echomsg %s)", viml_join(list, " "));
12634}
12635
12636Compiler.prototype.compile_echoerr = function(node) {
12637 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12638 this.out("(echoerr %s)", viml_join(list, " "));
12639}
12640
12641Compiler.prototype.compile_execute = function(node) {
12642 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
12643 this.out("(execute %s)", viml_join(list, " "));
12644}
12645
12646Compiler.prototype.compile_ternary = function(node) {
12647 return viml_printf("(?: %s %s %s)", this.compile(node.cond), this.compile(node.left), this.compile(node.right));
12648}
12649
12650Compiler.prototype.compile_or = function(node) {
12651 return viml_printf("(|| %s %s)", this.compile(node.left), this.compile(node.right));
12652}
12653
12654Compiler.prototype.compile_and = function(node) {
12655 return viml_printf("(&& %s %s)", this.compile(node.left), this.compile(node.right));
12656}
12657
12658Compiler.prototype.compile_equal = function(node) {
12659 return viml_printf("(== %s %s)", this.compile(node.left), this.compile(node.right));
12660}
12661
12662Compiler.prototype.compile_equalci = function(node) {
12663 return viml_printf("(==? %s %s)", this.compile(node.left), this.compile(node.right));
12664}
12665
12666Compiler.prototype.compile_equalcs = function(node) {
12667 return viml_printf("(==# %s %s)", this.compile(node.left), this.compile(node.right));
12668}
12669
12670Compiler.prototype.compile_nequal = function(node) {
12671 return viml_printf("(!= %s %s)", this.compile(node.left), this.compile(node.right));
12672}
12673
12674Compiler.prototype.compile_nequalci = function(node) {
12675 return viml_printf("(!=? %s %s)", this.compile(node.left), this.compile(node.right));
12676}
12677
12678Compiler.prototype.compile_nequalcs = function(node) {
12679 return viml_printf("(!=# %s %s)", this.compile(node.left), this.compile(node.right));
12680}
12681
12682Compiler.prototype.compile_greater = function(node) {
12683 return viml_printf("(> %s %s)", this.compile(node.left), this.compile(node.right));
12684}
12685
12686Compiler.prototype.compile_greaterci = function(node) {
12687 return viml_printf("(>? %s %s)", this.compile(node.left), this.compile(node.right));
12688}
12689
12690Compiler.prototype.compile_greatercs = function(node) {
12691 return viml_printf("(># %s %s)", this.compile(node.left), this.compile(node.right));
12692}
12693
12694Compiler.prototype.compile_gequal = function(node) {
12695 return viml_printf("(>= %s %s)", this.compile(node.left), this.compile(node.right));
12696}
12697
12698Compiler.prototype.compile_gequalci = function(node) {
12699 return viml_printf("(>=? %s %s)", this.compile(node.left), this.compile(node.right));
12700}
12701
12702Compiler.prototype.compile_gequalcs = function(node) {
12703 return viml_printf("(>=# %s %s)", this.compile(node.left), this.compile(node.right));
12704}
12705
12706Compiler.prototype.compile_smaller = function(node) {
12707 return viml_printf("(< %s %s)", this.compile(node.left), this.compile(node.right));
12708}
12709
12710Compiler.prototype.compile_smallerci = function(node) {
12711 return viml_printf("(<? %s %s)", this.compile(node.left), this.compile(node.right));
12712}
12713
12714Compiler.prototype.compile_smallercs = function(node) {
12715 return viml_printf("(<# %s %s)", this.compile(node.left), this.compile(node.right));
12716}
12717
12718Compiler.prototype.compile_sequal = function(node) {
12719 return viml_printf("(<= %s %s)", this.compile(node.left), this.compile(node.right));
12720}
12721
12722Compiler.prototype.compile_sequalci = function(node) {
12723 return viml_printf("(<=? %s %s)", this.compile(node.left), this.compile(node.right));
12724}
12725
12726Compiler.prototype.compile_sequalcs = function(node) {
12727 return viml_printf("(<=# %s %s)", this.compile(node.left), this.compile(node.right));
12728}
12729
12730Compiler.prototype.compile_match = function(node) {
12731 return viml_printf("(=~ %s %s)", this.compile(node.left), this.compile(node.right));
12732}
12733
12734Compiler.prototype.compile_matchci = function(node) {
12735 return viml_printf("(=~? %s %s)", this.compile(node.left), this.compile(node.right));
12736}
12737
12738Compiler.prototype.compile_matchcs = function(node) {
12739 return viml_printf("(=~# %s %s)", this.compile(node.left), this.compile(node.right));
12740}
12741
12742Compiler.prototype.compile_nomatch = function(node) {
12743 return viml_printf("(!~ %s %s)", this.compile(node.left), this.compile(node.right));
12744}
12745
12746Compiler.prototype.compile_nomatchci = function(node) {
12747 return viml_printf("(!~? %s %s)", this.compile(node.left), this.compile(node.right));
12748}
12749
12750Compiler.prototype.compile_nomatchcs = function(node) {
12751 return viml_printf("(!~# %s %s)", this.compile(node.left), this.compile(node.right));
12752}
12753
12754Compiler.prototype.compile_is = function(node) {
12755 return viml_printf("(is %s %s)", this.compile(node.left), this.compile(node.right));
12756}
12757
12758Compiler.prototype.compile_isci = function(node) {
12759 return viml_printf("(is? %s %s)", this.compile(node.left), this.compile(node.right));
12760}
12761
12762Compiler.prototype.compile_iscs = function(node) {
12763 return viml_printf("(is# %s %s)", this.compile(node.left), this.compile(node.right));
12764}
12765
12766Compiler.prototype.compile_isnot = function(node) {
12767 return viml_printf("(isnot %s %s)", this.compile(node.left), this.compile(node.right));
12768}
12769
12770Compiler.prototype.compile_isnotci = function(node) {
12771 return viml_printf("(isnot? %s %s)", this.compile(node.left), this.compile(node.right));
12772}
12773
12774Compiler.prototype.compile_isnotcs = function(node) {
12775 return viml_printf("(isnot# %s %s)", this.compile(node.left), this.compile(node.right));
12776}
12777
12778Compiler.prototype.compile_add = function(node) {
12779 return viml_printf("(+ %s %s)", this.compile(node.left), this.compile(node.right));
12780}
12781
12782Compiler.prototype.compile_subtract = function(node) {
12783 return viml_printf("(- %s %s)", this.compile(node.left), this.compile(node.right));
12784}
12785
12786Compiler.prototype.compile_concat = function(node) {
12787 return viml_printf("(concat %s %s)", this.compile(node.left), this.compile(node.right));
12788}
12789
12790Compiler.prototype.compile_multiply = function(node) {
12791 return viml_printf("(* %s %s)", this.compile(node.left), this.compile(node.right));
12792}
12793
12794Compiler.prototype.compile_divide = function(node) {
12795 return viml_printf("(/ %s %s)", this.compile(node.left), this.compile(node.right));
12796}
12797
12798Compiler.prototype.compile_remainder = function(node) {
12799 return viml_printf("(%% %s %s)", this.compile(node.left), this.compile(node.right));
12800}
12801
12802Compiler.prototype.compile_not = function(node) {
12803 return viml_printf("(! %s)", this.compile(node.left));
12804}
12805
12806Compiler.prototype.compile_plus = function(node) {
12807 return viml_printf("(+ %s)", this.compile(node.left));
12808}
12809
12810Compiler.prototype.compile_minus = function(node) {
12811 return viml_printf("(- %s)", this.compile(node.left));
12812}
12813
12814Compiler.prototype.compile_subscript = function(node) {
12815 return viml_printf("(subscript %s %s)", this.compile(node.left), this.compile(node.right));
12816}
12817
12818Compiler.prototype.compile_slice = function(node) {
12819 var r0 = node.rlist[0] === NIL ? "nil" : this.compile(node.rlist[0]);
12820 var r1 = node.rlist[1] === NIL ? "nil" : this.compile(node.rlist[1]);
12821 return viml_printf("(slice %s %s %s)", this.compile(node.left), r0, r1);
12822}
12823
12824Compiler.prototype.compile_dot = function(node) {
12825 return viml_printf("(dot %s %s)", this.compile(node.left), this.compile(node.right));
12826}
12827
12828Compiler.prototype.compile_method = function(node) {
12829 return viml_printf("(method %s %s)", this.compile(node.left), this.compile(node.right));
12830}
12831
12832Compiler.prototype.compile_call = function(node) {
12833 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12834 if (viml_empty(rlist)) {
12835 return viml_printf("(%s)", this.compile(node.left));
12836 }
12837 else {
12838 return viml_printf("(%s %s)", this.compile(node.left), viml_join(rlist, " "));
12839 }
12840}
12841
12842Compiler.prototype.compile_number = function(node) {
12843 return node.value;
12844}
12845
12846Compiler.prototype.compile_blob = function(node) {
12847 return node.value;
12848}
12849
12850Compiler.prototype.compile_string = function(node) {
12851 return node.value;
12852}
12853
12854Compiler.prototype.compile_list = function(node) {
12855 var value = node.value.map((function(vval) { return this.compile(vval); }).bind(this));
12856 if (viml_empty(value)) {
12857 return "(list)";
12858 }
12859 else {
12860 return viml_printf("(list %s)", viml_join(value, " "));
12861 }
12862}
12863
12864Compiler.prototype.compile_dict = function(node) {
12865 var value = node.value.map((function(vval) { return "(" + this.compile(vval[0]) + " " + this.compile(vval[1]) + ")"; }).bind(this));
12866 if (viml_empty(value)) {
12867 return "(dict)";
12868 }
12869 else {
12870 return viml_printf("(dict %s)", viml_join(value, " "));
12871 }
12872}
12873
12874Compiler.prototype.compile_option = function(node) {
12875 return node.value;
12876}
12877
12878Compiler.prototype.compile_identifier = function(node) {
12879 return node.value;
12880}
12881
12882Compiler.prototype.compile_curlyname = function(node) {
12883 return viml_join(node.value.map((function(vval) { return this.compile(vval); }).bind(this)), "");
12884}
12885
12886Compiler.prototype.compile_env = function(node) {
12887 return node.value;
12888}
12889
12890Compiler.prototype.compile_reg = function(node) {
12891 return node.value;
12892}
12893
12894Compiler.prototype.compile_curlynamepart = function(node) {
12895 return node.value;
12896}
12897
12898Compiler.prototype.compile_curlynameexpr = function(node) {
12899 return "{" + this.compile(node.value) + "}";
12900}
12901
12902Compiler.prototype.escape_string = function(str) {
12903 var m = {"\n":"\\n", "\t":"\\t", "\r":"\\r"};
12904 var out = "\"";
12905 var __c14 = viml_range(viml_len(str));
12906 for (var __i14 = 0; __i14 < __c14.length; ++__i14) {
12907 var i = __c14[__i14];
12908 var c = str[i];
12909 if (viml_has_key(m, c)) {
12910 out += m[c];
12911 }
12912 else {
12913 out += c;
12914 }
12915 }
12916 out += "\"";
12917 return out;
12918}
12919
12920Compiler.prototype.compile_lambda = function(node) {
12921 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12922 return viml_printf("(lambda (%s) %s)", viml_join(rlist, " "), this.compile(node.left));
12923}
12924
12925Compiler.prototype.compile_heredoc = function(node) {
12926 if (viml_empty(node.rlist)) {
12927 var rlist = "(list)";
12928 }
12929 else {
12930 var rlist = "(list " + viml_join(node.rlist.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
12931 }
12932 if (viml_empty(node.body)) {
12933 var body = "(list)";
12934 }
12935 else {
12936 var body = "(list " + viml_join(node.body.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
12937 }
12938 var op = this.escape_string(node.op);
12939 return viml_printf("(heredoc %s %s %s)", rlist, op, body);
12940}
12941
12942// TODO: under construction
12943function RegexpParser() { this.__init__.apply(this, arguments); }
12944RegexpParser.prototype.RE_VERY_NOMAGIC = 1;
12945RegexpParser.prototype.RE_NOMAGIC = 2;
12946RegexpParser.prototype.RE_MAGIC = 3;
12947RegexpParser.prototype.RE_VERY_MAGIC = 4;
12948RegexpParser.prototype.__init__ = function(reader, cmd, delim) {
12949 this.reader = reader;
12950 this.cmd = cmd;
12951 this.delim = delim;
12952 this.reg_magic = this.RE_MAGIC;
12953}
12954
12955RegexpParser.prototype.isend = function(c) {
12956 return c == "<EOF>" || c == "<EOL>" || c == this.delim;
12957}
12958
12959RegexpParser.prototype.parse_regexp = function() {
12960 var prevtoken = "";
12961 var ntoken = "";
12962 var ret = [];
12963 if (this.reader.peekn(4) == "\\%#=") {
12964 var epos = this.reader.getpos();
12965 var token = this.reader.getn(5);
12966 if (token != "\\%#=0" && token != "\\%#=1" && token != "\\%#=2") {
12967 throw Err("E864: \\%#= can only be followed by 0, 1, or 2", epos);
12968 }
12969 viml_add(ret, token);
12970 }
12971 while (!this.isend(this.reader.peek())) {
12972 var prevtoken = ntoken;
12973 var __tmp = this.get_token();
12974 var token = __tmp[0];
12975 var ntoken = __tmp[1];
12976 if (ntoken == "\\m") {
12977 this.reg_magic = this.RE_MAGIC;
12978 }
12979 else if (ntoken == "\\M") {
12980 this.reg_magic = this.RE_NOMAGIC;
12981 }
12982 else if (ntoken == "\\v") {
12983 this.reg_magic = this.RE_VERY_MAGIC;
12984 }
12985 else if (ntoken == "\\V") {
12986 this.reg_magic = this.RE_VERY_NOMAGIC;
12987 }
12988 else if (ntoken == "\\*") {
12989 // '*' is not magic as the very first character.
12990 if (prevtoken == "" || prevtoken == "\\^" || prevtoken == "\\&" || prevtoken == "\\|" || prevtoken == "\\(") {
12991 var ntoken = "*";
12992 }
12993 }
12994 else if (ntoken == "\\^") {
12995 // '^' is only magic as the very first character.
12996 if (this.reg_magic != this.RE_VERY_MAGIC && prevtoken != "" && prevtoken != "\\&" && prevtoken != "\\|" && prevtoken != "\\n" && prevtoken != "\\(" && prevtoken != "\\%(") {
12997 var ntoken = "^";
12998 }
12999 }
13000 else if (ntoken == "\\$") {
13001 // '$' is only magic as the very last character
13002 var pos = this.reader.tell();
13003 if (this.reg_magic != this.RE_VERY_MAGIC) {
13004 while (!this.isend(this.reader.peek())) {
13005 var __tmp = this.get_token();
13006 var t = __tmp[0];
13007 var n = __tmp[1];
13008 // XXX: Vim doesn't check \v and \V?
13009 if (n == "\\c" || n == "\\C" || n == "\\m" || n == "\\M" || n == "\\Z") {
13010 continue;
13011 }
13012 if (n != "\\|" && n != "\\&" && n != "\\n" && n != "\\)") {
13013 var ntoken = "$";
13014 }
13015 break;
13016 }
13017 }
13018 this.reader.seek_set(pos);
13019 }
13020 else if (ntoken == "\\?") {
13021 // '?' is literal in '?' command.
13022 if (this.cmd == "?") {
13023 var ntoken = "?";
13024 }
13025 }
13026 viml_add(ret, ntoken);
13027 }
13028 return ret;
13029}
13030
13031// @return [actual_token, normalized_token]
13032RegexpParser.prototype.get_token = function() {
13033 if (this.reg_magic == this.RE_VERY_MAGIC) {
13034 return this.get_token_very_magic();
13035 }
13036 else if (this.reg_magic == this.RE_MAGIC) {
13037 return this.get_token_magic();
13038 }
13039 else if (this.reg_magic == this.RE_NOMAGIC) {
13040 return this.get_token_nomagic();
13041 }
13042 else if (this.reg_magic == this.RE_VERY_NOMAGIC) {
13043 return this.get_token_very_nomagic();
13044 }
13045}
13046
13047RegexpParser.prototype.get_token_very_magic = function() {
13048 if (this.isend(this.reader.peek())) {
13049 return ["<END>", "<END>"];
13050 }
13051 var c = this.reader.get();
13052 if (c == "\\") {
13053 return this.get_token_backslash_common();
13054 }
13055 else if (c == "*") {
13056 return ["*", "\\*"];
13057 }
13058 else if (c == "+") {
13059 return ["+", "\\+"];
13060 }
13061 else if (c == "=") {
13062 return ["=", "\\="];
13063 }
13064 else if (c == "?") {
13065 return ["?", "\\?"];
13066 }
13067 else if (c == "{") {
13068 return this.get_token_brace("{");
13069 }
13070 else if (c == "@") {
13071 return this.get_token_at("@");
13072 }
13073 else if (c == "^") {
13074 return ["^", "\\^"];
13075 }
13076 else if (c == "$") {
13077 return ["$", "\\$"];
13078 }
13079 else if (c == ".") {
13080 return [".", "\\."];
13081 }
13082 else if (c == "<") {
13083 return ["<", "\\<"];
13084 }
13085 else if (c == ">") {
13086 return [">", "\\>"];
13087 }
13088 else if (c == "%") {
13089 return this.get_token_percent("%");
13090 }
13091 else if (c == "[") {
13092 return this.get_token_sq("[");
13093 }
13094 else if (c == "~") {
13095 return ["~", "\\~"];
13096 }
13097 else if (c == "|") {
13098 return ["|", "\\|"];
13099 }
13100 else if (c == "&") {
13101 return ["&", "\\&"];
13102 }
13103 else if (c == "(") {
13104 return ["(", "\\("];
13105 }
13106 else if (c == ")") {
13107 return [")", "\\)"];
13108 }
13109 return [c, c];
13110}
13111
13112RegexpParser.prototype.get_token_magic = function() {
13113 if (this.isend(this.reader.peek())) {
13114 return ["<END>", "<END>"];
13115 }
13116 var c = this.reader.get();
13117 if (c == "\\") {
13118 var pos = this.reader.tell();
13119 var c = this.reader.get();
13120 if (c == "+") {
13121 return ["\\+", "\\+"];
13122 }
13123 else if (c == "=") {
13124 return ["\\=", "\\="];
13125 }
13126 else if (c == "?") {
13127 return ["\\?", "\\?"];
13128 }
13129 else if (c == "{") {
13130 return this.get_token_brace("\\{");
13131 }
13132 else if (c == "@") {
13133 return this.get_token_at("\\@");
13134 }
13135 else if (c == "<") {
13136 return ["\\<", "\\<"];
13137 }
13138 else if (c == ">") {
13139 return ["\\>", "\\>"];
13140 }
13141 else if (c == "%") {
13142 return this.get_token_percent("\\%");
13143 }
13144 else if (c == "|") {
13145 return ["\\|", "\\|"];
13146 }
13147 else if (c == "&") {
13148 return ["\\&", "\\&"];
13149 }
13150 else if (c == "(") {
13151 return ["\\(", "\\("];
13152 }
13153 else if (c == ")") {
13154 return ["\\)", "\\)"];
13155 }
13156 this.reader.seek_set(pos);
13157 return this.get_token_backslash_common();
13158 }
13159 else if (c == "*") {
13160 return ["*", "\\*"];
13161 }
13162 else if (c == "^") {
13163 return ["^", "\\^"];
13164 }
13165 else if (c == "$") {
13166 return ["$", "\\$"];
13167 }
13168 else if (c == ".") {
13169 return [".", "\\."];
13170 }
13171 else if (c == "[") {
13172 return this.get_token_sq("[");
13173 }
13174 else if (c == "~") {
13175 return ["~", "\\~"];
13176 }
13177 return [c, c];
13178}
13179
13180RegexpParser.prototype.get_token_nomagic = function() {
13181 if (this.isend(this.reader.peek())) {
13182 return ["<END>", "<END>"];
13183 }
13184 var c = this.reader.get();
13185 if (c == "\\") {
13186 var pos = this.reader.tell();
13187 var c = this.reader.get();
13188 if (c == "*") {
13189 return ["\\*", "\\*"];
13190 }
13191 else if (c == "+") {
13192 return ["\\+", "\\+"];
13193 }
13194 else if (c == "=") {
13195 return ["\\=", "\\="];
13196 }
13197 else if (c == "?") {
13198 return ["\\?", "\\?"];
13199 }
13200 else if (c == "{") {
13201 return this.get_token_brace("\\{");
13202 }
13203 else if (c == "@") {
13204 return this.get_token_at("\\@");
13205 }
13206 else if (c == ".") {
13207 return ["\\.", "\\."];
13208 }
13209 else if (c == "<") {
13210 return ["\\<", "\\<"];
13211 }
13212 else if (c == ">") {
13213 return ["\\>", "\\>"];
13214 }
13215 else if (c == "%") {
13216 return this.get_token_percent("\\%");
13217 }
13218 else if (c == "~") {
13219 return ["\\~", "\\^"];
13220 }
13221 else if (c == "[") {
13222 return this.get_token_sq("\\[");
13223 }
13224 else if (c == "|") {
13225 return ["\\|", "\\|"];
13226 }
13227 else if (c == "&") {
13228 return ["\\&", "\\&"];
13229 }
13230 else if (c == "(") {
13231 return ["\\(", "\\("];
13232 }
13233 else if (c == ")") {
13234 return ["\\)", "\\)"];
13235 }
13236 this.reader.seek_set(pos);
13237 return this.get_token_backslash_common();
13238 }
13239 else if (c == "^") {
13240 return ["^", "\\^"];
13241 }
13242 else if (c == "$") {
13243 return ["$", "\\$"];
13244 }
13245 return [c, c];
13246}
13247
13248RegexpParser.prototype.get_token_very_nomagic = function() {
13249 if (this.isend(this.reader.peek())) {
13250 return ["<END>", "<END>"];
13251 }
13252 var c = this.reader.get();
13253 if (c == "\\") {
13254 var pos = this.reader.tell();
13255 var c = this.reader.get();
13256 if (c == "*") {
13257 return ["\\*", "\\*"];
13258 }
13259 else if (c == "+") {
13260 return ["\\+", "\\+"];
13261 }
13262 else if (c == "=") {
13263 return ["\\=", "\\="];
13264 }
13265 else if (c == "?") {
13266 return ["\\?", "\\?"];
13267 }
13268 else if (c == "{") {
13269 return this.get_token_brace("\\{");
13270 }
13271 else if (c == "@") {
13272 return this.get_token_at("\\@");
13273 }
13274 else if (c == "^") {
13275 return ["\\^", "\\^"];
13276 }
13277 else if (c == "$") {
13278 return ["\\$", "\\$"];
13279 }
13280 else if (c == "<") {
13281 return ["\\<", "\\<"];
13282 }
13283 else if (c == ">") {
13284 return ["\\>", "\\>"];
13285 }
13286 else if (c == "%") {
13287 return this.get_token_percent("\\%");
13288 }
13289 else if (c == "~") {
13290 return ["\\~", "\\~"];
13291 }
13292 else if (c == "[") {
13293 return this.get_token_sq("\\[");
13294 }
13295 else if (c == "|") {
13296 return ["\\|", "\\|"];
13297 }
13298 else if (c == "&") {
13299 return ["\\&", "\\&"];
13300 }
13301 else if (c == "(") {
13302 return ["\\(", "\\("];
13303 }
13304 else if (c == ")") {
13305 return ["\\)", "\\)"];
13306 }
13307 this.reader.seek_set(pos);
13308 return this.get_token_backslash_common();
13309 }
13310 return [c, c];
13311}
13312
13313RegexpParser.prototype.get_token_backslash_common = function() {
13314 var cclass = "iIkKfFpPsSdDxXoOwWhHaAlLuU";
13315 var c = this.reader.get();
13316 if (c == "\\") {
13317 return ["\\\\", "\\\\"];
13318 }
13319 else if (viml_stridx(cclass, c) != -1) {
13320 return ["\\" + c, "\\" + c];
13321 }
13322 else if (c == "_") {
13323 var epos = this.reader.getpos();
13324 var c = this.reader.get();
13325 if (viml_stridx(cclass, c) != -1) {
13326 return ["\\_" + c, "\\_ . c"];
13327 }
13328 else if (c == "^") {
13329 return ["\\_^", "\\_^"];
13330 }
13331 else if (c == "$") {
13332 return ["\\_$", "\\_$"];
13333 }
13334 else if (c == ".") {
13335 return ["\\_.", "\\_."];
13336 }
13337 else if (c == "[") {
13338 return this.get_token_sq("\\_[");
13339 }
13340 throw Err("E63: Invalid use of \\_", epos);
13341 }
13342 else if (viml_stridx("etrb", c) != -1) {
13343 return ["\\" + c, "\\" + c];
13344 }
13345 else if (viml_stridx("123456789", c) != -1) {
13346 return ["\\" + c, "\\" + c];
13347 }
13348 else if (c == "z") {
13349 var epos = this.reader.getpos();
13350 var c = this.reader.get();
13351 if (viml_stridx("123456789", c) != -1) {
13352 return ["\\z" + c, "\\z" + c];
13353 }
13354 else if (c == "s") {
13355 return ["\\zs", "\\zs"];
13356 }
13357 else if (c == "e") {
13358 return ["\\ze", "\\ze"];
13359 }
13360 else if (c == "(") {
13361 return ["\\z(", "\\z("];
13362 }
13363 throw Err("E68: Invalid character after \\z", epos);
13364 }
13365 else if (viml_stridx("cCmMvVZ", c) != -1) {
13366 return ["\\" + c, "\\" + c];
13367 }
13368 else if (c == "%") {
13369 var epos = this.reader.getpos();
13370 var c = this.reader.get();
13371 if (c == "d") {
13372 var r = this.getdecchrs();
13373 if (r != "") {
13374 return ["\\%d" + r, "\\%d" + r];
13375 }
13376 }
13377 else if (c == "o") {
13378 var r = this.getoctchrs();
13379 if (r != "") {
13380 return ["\\%o" + r, "\\%o" + r];
13381 }
13382 }
13383 else if (c == "x") {
13384 var r = this.gethexchrs(2);
13385 if (r != "") {
13386 return ["\\%x" + r, "\\%x" + r];
13387 }
13388 }
13389 else if (c == "u") {
13390 var r = this.gethexchrs(4);
13391 if (r != "") {
13392 return ["\\%u" + r, "\\%u" + r];
13393 }
13394 }
13395 else if (c == "U") {
13396 var r = this.gethexchrs(8);
13397 if (r != "") {
13398 return ["\\%U" + r, "\\%U" + r];
13399 }
13400 }
13401 throw Err("E678: Invalid character after \\%[dxouU]", epos);
13402 }
13403 return ["\\" + c, c];
13404}
13405
13406// \{}
13407RegexpParser.prototype.get_token_brace = function(pre) {
13408 var r = "";
13409 var minus = "";
13410 var comma = "";
13411 var n = "";
13412 var m = "";
13413 if (this.reader.p(0) == "-") {
13414 var minus = this.reader.get();
13415 r += minus;
13416 }
13417 if (isdigit(this.reader.p(0))) {
13418 var n = this.reader.read_digit();
13419 r += n;
13420 }
13421 if (this.reader.p(0) == ",") {
13422 var comma = this.rader.get();
13423 r += comma;
13424 }
13425 if (isdigit(this.reader.p(0))) {
13426 var m = this.reader.read_digit();
13427 r += m;
13428 }
13429 if (this.reader.p(0) == "\\") {
13430 r += this.reader.get();
13431 }
13432 if (this.reader.p(0) != "}") {
13433 throw Err("E554: Syntax error in \\{...}", this.reader.getpos());
13434 }
13435 this.reader.get();
13436 return [pre + r, "\\{" + minus + n + comma + m + "}"];
13437}
13438
13439// \[]
13440RegexpParser.prototype.get_token_sq = function(pre) {
13441 var start = this.reader.tell();
13442 var r = "";
13443 // Complement of range
13444 if (this.reader.p(0) == "^") {
13445 r += this.reader.get();
13446 }
13447 // At the start ']' and '-' mean the literal character.
13448 if (this.reader.p(0) == "]" || this.reader.p(0) == "-") {
13449 r += this.reader.get();
13450 }
13451 while (TRUE) {
13452 var startc = 0;
13453 var c = this.reader.p(0);
13454 if (this.isend(c)) {
13455 // If there is no matching ']', we assume the '[' is a normal character.
13456 this.reader.seek_set(start);
13457 return [pre, "["];
13458 }
13459 else if (c == "]") {
13460 this.reader.seek_cur(1);
13461 return [pre + r + "]", "\\[" + r + "]"];
13462 }
13463 else if (c == "[") {
13464 var e = this.get_token_sq_char_class();
13465 if (e == "") {
13466 var e = this.get_token_sq_equi_class();
13467 if (e == "") {
13468 var e = this.get_token_sq_coll_element();
13469 if (e == "") {
13470 var __tmp = this.get_token_sq_c();
13471 var e = __tmp[0];
13472 var startc = __tmp[1];
13473 }
13474 }
13475 }
13476 r += e;
13477 }
13478 else {
13479 var __tmp = this.get_token_sq_c();
13480 var e = __tmp[0];
13481 var startc = __tmp[1];
13482 r += e;
13483 }
13484 if (startc != 0 && this.reader.p(0) == "-" && !this.isend(this.reader.p(1)) && !(this.reader.p(1) == "\\" && this.reader.p(2) == "n")) {
13485 this.reader.seek_cur(1);
13486 r += "-";
13487 var c = this.reader.p(0);
13488 if (c == "[") {
13489 var e = this.get_token_sq_coll_element();
13490 if (e != "") {
13491 var endc = viml_char2nr(e[2]);
13492 }
13493 else {
13494 var __tmp = this.get_token_sq_c();
13495 var e = __tmp[0];
13496 var endc = __tmp[1];
13497 }
13498 r += e;
13499 }
13500 else {
13501 var __tmp = this.get_token_sq_c();
13502 var e = __tmp[0];
13503 var endc = __tmp[1];
13504 r += e;
13505 }
13506 if (startc > endc || endc > startc + 256) {
13507 throw Err("E16: Invalid range", this.reader.getpos());
13508 }
13509 }
13510 }
13511}
13512
13513// [c]
13514RegexpParser.prototype.get_token_sq_c = function() {
13515 var c = this.reader.p(0);
13516 if (c == "\\") {
13517 this.reader.seek_cur(1);
13518 var c = this.reader.p(0);
13519 if (c == "n") {
13520 this.reader.seek_cur(1);
13521 return ["\\n", 0];
13522 }
13523 else if (c == "r") {
13524 this.reader.seek_cur(1);
13525 return ["\\r", 13];
13526 }
13527 else if (c == "t") {
13528 this.reader.seek_cur(1);
13529 return ["\\t", 9];
13530 }
13531 else if (c == "e") {
13532 this.reader.seek_cur(1);
13533 return ["\\e", 27];
13534 }
13535 else if (c == "b") {
13536 this.reader.seek_cur(1);
13537 return ["\\b", 8];
13538 }
13539 else if (viml_stridx("]^-\\", c) != -1) {
13540 this.reader.seek_cur(1);
13541 return ["\\" + c, viml_char2nr(c)];
13542 }
13543 else if (viml_stridx("doxuU", c) != -1) {
13544 var __tmp = this.get_token_sq_coll_char();
13545 var c = __tmp[0];
13546 var n = __tmp[1];
13547 return [c, n];
13548 }
13549 else {
13550 return ["\\", viml_char2nr("\\")];
13551 }
13552 }
13553 else if (c == "-") {
13554 this.reader.seek_cur(1);
13555 return ["-", viml_char2nr("-")];
13556 }
13557 else {
13558 this.reader.seek_cur(1);
13559 return [c, viml_char2nr(c)];
13560 }
13561}
13562
13563// [\d123]
13564RegexpParser.prototype.get_token_sq_coll_char = function() {
13565 var pos = this.reader.tell();
13566 var c = this.reader.get();
13567 if (c == "d") {
13568 var r = this.getdecchrs();
13569 var n = viml_str2nr(r, 10);
13570 }
13571 else if (c == "o") {
13572 var r = this.getoctchrs();
13573 var n = viml_str2nr(r, 8);
13574 }
13575 else if (c == "x") {
13576 var r = this.gethexchrs(2);
13577 var n = viml_str2nr(r, 16);
13578 }
13579 else if (c == "u") {
13580 var r = this.gethexchrs(4);
13581 var n = viml_str2nr(r, 16);
13582 }
13583 else if (c == "U") {
13584 var r = this.gethexchrs(8);
13585 var n = viml_str2nr(r, 16);
13586 }
13587 else {
13588 var r = "";
13589 }
13590 if (r == "") {
13591 this.reader.seek_set(pos);
13592 return "\\";
13593 }
13594 return ["\\" + c + r, n];
13595}
13596
13597// [[.a.]]
13598RegexpParser.prototype.get_token_sq_coll_element = function() {
13599 if (this.reader.p(0) == "[" && this.reader.p(1) == "." && !this.isend(this.reader.p(2)) && this.reader.p(3) == "." && this.reader.p(4) == "]") {
13600 return this.reader.getn(5);
13601 }
13602 return "";
13603}
13604
13605// [[=a=]]
13606RegexpParser.prototype.get_token_sq_equi_class = function() {
13607 if (this.reader.p(0) == "[" && this.reader.p(1) == "=" && !this.isend(this.reader.p(2)) && this.reader.p(3) == "=" && this.reader.p(4) == "]") {
13608 return this.reader.getn(5);
13609 }
13610 return "";
13611}
13612
13613// [[:alpha:]]
13614RegexpParser.prototype.get_token_sq_char_class = function() {
13615 var class_names = ["alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "xdigit", "tab", "return", "backspace", "escape"];
13616 var pos = this.reader.tell();
13617 if (this.reader.p(0) == "[" && this.reader.p(1) == ":") {
13618 this.reader.seek_cur(2);
13619 var r = this.reader.read_alpha();
13620 if (this.reader.p(0) == ":" && this.reader.p(1) == "]") {
13621 this.reader.seek_cur(2);
13622 var __c15 = class_names;
13623 for (var __i15 = 0; __i15 < __c15.length; ++__i15) {
13624 var name = __c15[__i15];
13625 if (r == name) {
13626 return "[:" + name + ":]";
13627 }
13628 }
13629 }
13630 }
13631 this.reader.seek_set(pos);
13632 return "";
13633}
13634
13635// \@...
13636RegexpParser.prototype.get_token_at = function(pre) {
13637 var epos = this.reader.getpos();
13638 var c = this.reader.get();
13639 if (c == ">") {
13640 return [pre + ">", "\\@>"];
13641 }
13642 else if (c == "=") {
13643 return [pre + "=", "\\@="];
13644 }
13645 else if (c == "!") {
13646 return [pre + "!", "\\@!"];
13647 }
13648 else if (c == "<") {
13649 var c = this.reader.get();
13650 if (c == "=") {
13651 return [pre + "<=", "\\@<="];
13652 }
13653 else if (c == "!") {
13654 return [pre + "<!", "\\@<!"];
13655 }
13656 }
13657 throw Err("E64: @ follows nothing", epos);
13658}
13659
13660// \%...
13661RegexpParser.prototype.get_token_percent = function(pre) {
13662 var c = this.reader.get();
13663 if (c == "^") {
13664 return [pre + "^", "\\%^"];
13665 }
13666 else if (c == "$") {
13667 return [pre + "$", "\\%$"];
13668 }
13669 else if (c == "V") {
13670 return [pre + "V", "\\%V"];
13671 }
13672 else if (c == "#") {
13673 return [pre + "#", "\\%#"];
13674 }
13675 else if (c == "[") {
13676 return this.get_token_percent_sq(pre + "[");
13677 }
13678 else if (c == "(") {
13679 return [pre + "(", "\\%("];
13680 }
13681 else {
13682 return this.get_token_mlcv(pre);
13683 }
13684}
13685
13686// \%[]
13687RegexpParser.prototype.get_token_percent_sq = function(pre) {
13688 var r = "";
13689 while (TRUE) {
13690 var c = this.reader.peek();
13691 if (this.isend(c)) {
13692 throw Err("E69: Missing ] after \\%[", this.reader.getpos());
13693 }
13694 else if (c == "]") {
13695 if (r == "") {
13696 throw Err("E70: Empty \\%[", this.reader.getpos());
13697 }
13698 this.reader.seek_cur(1);
13699 break;
13700 }
13701 this.reader.seek_cur(1);
13702 r += c;
13703 }
13704 return [pre + r + "]", "\\%[" + r + "]"];
13705}
13706
13707// \%'m \%l \%c \%v
13708RegexpParser.prototype.get_token_mlvc = function(pre) {
13709 var r = "";
13710 var cmp = "";
13711 if (this.reader.p(0) == "<" || this.reader.p(0) == ">") {
13712 var cmp = this.reader.get();
13713 r += cmp;
13714 }
13715 if (this.reader.p(0) == "'") {
13716 r += this.reader.get();
13717 var c = this.reader.p(0);
13718 if (this.isend(c)) {
13719 // FIXME: Should be error? Vim allow this.
13720 var c = "";
13721 }
13722 else {
13723 var c = this.reader.get();
13724 }
13725 return [pre + r + c, "\\%" + cmp + "'" + c];
13726 }
13727 else if (isdigit(this.reader.p(0))) {
13728 var d = this.reader.read_digit();
13729 r += d;
13730 var c = this.reader.p(0);
13731 if (c == "l") {
13732 this.reader.get();
13733 return [pre + r + "l", "\\%" + cmp + d + "l"];
13734 }
13735 else if (c == "c") {
13736 this.reader.get();
13737 return [pre + r + "c", "\\%" + cmp + d + "c"];
13738 }
13739 else if (c == "v") {
13740 this.reader.get();
13741 return [pre + r + "v", "\\%" + cmp + d + "v"];
13742 }
13743 }
13744 throw Err("E71: Invalid character after %", this.reader.getpos());
13745}
13746
13747RegexpParser.prototype.getdecchrs = function() {
13748 return this.reader.read_digit();
13749}
13750
13751RegexpParser.prototype.getoctchrs = function() {
13752 return this.reader.read_odigit();
13753}
13754
13755RegexpParser.prototype.gethexchrs = function(n) {
13756 var r = "";
13757 var __c16 = viml_range(n);
13758 for (var __i16 = 0; __i16 < __c16.length; ++__i16) {
13759 var i = __c16[__i16];
13760 var c = this.reader.peek();
13761 if (!isxdigit(c)) {
13762 break;
13763 }
13764 r += this.reader.get();
13765 }
13766 return r;
13767}
13768
13769if (__webpack_require__.c[__webpack_require__.s] === module) {
13770 main();
13771}
13772else {
13773 module.exports = {
13774 VimLParser: VimLParser,
13775 StringReader: StringReader,
13776 Compiler: Compiler
13777 };
13778}
13779
13780
13781/***/ }),
13782/* 53 */
13783/***/ ((__unused_webpack_module, exports) => {
13784
13785"use strict";
13786
13787Object.defineProperty(exports, "__esModule", ({ value: true }));
13788exports.notIdentifierPattern = exports.expandPattern = exports.featurePattern = exports.commandPattern = exports.notFunctionPattern = exports.optionPattern = exports.builtinVariablePattern = exports.autocmdPattern = exports.highlightValuePattern = exports.highlightPattern = exports.highlightLinkPattern = exports.mapCommandPattern = exports.colorschemePattern = exports.wordNextPattern = exports.wordPrePattern = exports.builtinFunctionPattern = exports.keywordPattern = exports.commentPattern = exports.errorLinePattern = void 0;
13789exports.errorLinePattern = /[^:]+:\s*(.+?):\s*line\s*([0-9]+)\s*col\s*([0-9]+)/;
13790exports.commentPattern = /^[ \t]*("|')/;
13791exports.keywordPattern = /[\w#&$<>.:]/;
13792exports.builtinFunctionPattern = /^((<SID>|\b(v|g|b|s|l|a):)?[\w#&]+)[ \t]*\([^)]*\)/;
13793exports.wordPrePattern = /^.*?(((<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+)|(<SID>|<SID|<SI|<S|<|\b(v|g|b|s|l|a):))$/;
13794exports.wordNextPattern = /^((SID>|ID>|D>|>|<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+|(:[\w#&$.]+)).*?(\r\n|\r|\n)?$/;
13795exports.colorschemePattern = /\bcolorscheme[ \t]+\w*$/;
13796exports.mapCommandPattern = /^([ \t]*(\[ \t]*)?)\w*map[ \t]+/;
13797exports.highlightLinkPattern = /^[ \t]*(hi|highlight)[ \t]+link([ \t]+[^ \t]+)*[ \t]*$/;
13798exports.highlightPattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]*$/;
13799exports.highlightValuePattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]+([^ \t=]+)=[^ \t=]*$/;
13800exports.autocmdPattern = /^[ \t]*(au|autocmd)!?[ \t]+([^ \t,]+,)*[^ \t,]*$/;
13801exports.builtinVariablePattern = [
13802 /\bv:\w*$/,
13803];
13804exports.optionPattern = [
13805 /(^|[ \t]+)&\w*$/,
13806 /(^|[ \t]+)set(l|local|g|global)?[ \t]+\w+$/,
13807];
13808exports.notFunctionPattern = [
13809 /^[ \t]*\\$/,
13810 /^[ \t]*\w+$/,
13811 /^[ \t]*"/,
13812 /(let|set|colorscheme)[ \t][^ \t]*$/,
13813 /[^([,\\ \t\w#>]\w*$/,
13814 /^[ \t]*(hi|highlight)([ \t]+link)?([ \t]+[^ \t]+)*[ \t]*$/,
13815 exports.autocmdPattern,
13816];
13817exports.commandPattern = [
13818 /(^|[ \t]):\w+$/,
13819 /^[ \t]*\w+$/,
13820 /:?silent!?[ \t]\w+/,
13821];
13822exports.featurePattern = [
13823 /\bhas\([ \t]*["']\w*/,
13824];
13825exports.expandPattern = [
13826 /\bexpand\(['"]<\w*$/,
13827 /\bexpand\([ \t]*['"]\w*$/,
13828];
13829exports.notIdentifierPattern = [
13830 exports.commentPattern,
13831 /("|'):\w*$/,
13832 /^[ \t]*\\$/,
13833 /^[ \t]*call[ \t]+[^ \t()]*$/,
13834 /('|"|#|&|\$|<)\w*$/,
13835];
13836
13837
13838/***/ }),
13839/* 54 */,
13840/* 55 */,
13841/* 56 */,
13842/* 57 */,
13843/* 58 */,
13844/* 59 */
13845/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
13846
13847"use strict";
13848
13849const taskManager = __webpack_require__(60);
13850const async_1 = __webpack_require__(97);
13851const stream_1 = __webpack_require__(132);
13852const sync_1 = __webpack_require__(133);
13853const settings_1 = __webpack_require__(135);
13854const utils = __webpack_require__(61);
13855async function FastGlob(source, options) {
13856 assertPatternsInput(source);
13857 const works = getWorks(source, async_1.default, options);
13858 const result = await Promise.all(works);
13859 return utils.array.flatten(result);
13860}
13861// https://github.com/typescript-eslint/typescript-eslint/issues/60
13862// eslint-disable-next-line no-redeclare
13863(function (FastGlob) {
13864 function sync(source, options) {
13865 assertPatternsInput(source);
13866 const works = getWorks(source, sync_1.default, options);
13867 return utils.array.flatten(works);
13868 }
13869 FastGlob.sync = sync;
13870 function stream(source, options) {
13871 assertPatternsInput(source);
13872 const works = getWorks(source, stream_1.default, options);
13873 /**
13874 * The stream returned by the provider cannot work with an asynchronous iterator.
13875 * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
13876 * This affects performance (+25%). I don't see best solution right now.
13877 */
13878 return utils.stream.merge(works);
13879 }
13880 FastGlob.stream = stream;
13881 function generateTasks(source, options) {
13882 assertPatternsInput(source);
13883 const patterns = [].concat(source);
13884 const settings = new settings_1.default(options);
13885 return taskManager.generate(patterns, settings);
13886 }
13887 FastGlob.generateTasks = generateTasks;
13888 function isDynamicPattern(source, options) {
13889 assertPatternsInput(source);
13890 const settings = new settings_1.default(options);
13891 return utils.pattern.isDynamicPattern(source, settings);
13892 }
13893 FastGlob.isDynamicPattern = isDynamicPattern;
13894 function escapePath(source) {
13895 assertPatternsInput(source);
13896 return utils.path.escape(source);
13897 }
13898 FastGlob.escapePath = escapePath;
13899})(FastGlob || (FastGlob = {}));
13900function getWorks(source, _Provider, options) {
13901 const patterns = [].concat(source);
13902 const settings = new settings_1.default(options);
13903 const tasks = taskManager.generate(patterns, settings);
13904 const provider = new _Provider(settings);
13905 return tasks.map(provider.read, provider);
13906}
13907function assertPatternsInput(input) {
13908 const source = [].concat(input);
13909 const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
13910 if (!isValidSource) {
13911 throw new TypeError('Patterns must be a string (non empty) or an array of strings');
13912 }
13913}
13914module.exports = FastGlob;
13915
13916
13917/***/ }),
13918/* 60 */
13919/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13920
13921"use strict";
13922
13923Object.defineProperty(exports, "__esModule", ({ value: true }));
13924exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
13925const utils = __webpack_require__(61);
13926function generate(patterns, settings) {
13927 const positivePatterns = getPositivePatterns(patterns);
13928 const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
13929 const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
13930 const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
13931 const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
13932 const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
13933 return staticTasks.concat(dynamicTasks);
13934}
13935exports.generate = generate;
13936function convertPatternsToTasks(positive, negative, dynamic) {
13937 const positivePatternsGroup = groupPatternsByBaseDirectory(positive);
13938 // When we have a global group – there is no reason to divide the patterns into independent tasks.
13939 // In this case, the global task covers the rest.
13940 if ('.' in positivePatternsGroup) {
13941 const task = convertPatternGroupToTask('.', positive, negative, dynamic);
13942 return [task];
13943 }
13944 return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic);
13945}
13946exports.convertPatternsToTasks = convertPatternsToTasks;
13947function getPositivePatterns(patterns) {
13948 return utils.pattern.getPositivePatterns(patterns);
13949}
13950exports.getPositivePatterns = getPositivePatterns;
13951function getNegativePatternsAsPositive(patterns, ignore) {
13952 const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
13953 const positive = negative.map(utils.pattern.convertToPositivePattern);
13954 return positive;
13955}
13956exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
13957function groupPatternsByBaseDirectory(patterns) {
13958 const group = {};
13959 return patterns.reduce((collection, pattern) => {
13960 const base = utils.pattern.getBaseDirectory(pattern);
13961 if (base in collection) {
13962 collection[base].push(pattern);
13963 }
13964 else {
13965 collection[base] = [pattern];
13966 }
13967 return collection;
13968 }, group);
13969}
13970exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
13971function convertPatternGroupsToTasks(positive, negative, dynamic) {
13972 return Object.keys(positive).map((base) => {
13973 return convertPatternGroupToTask(base, positive[base], negative, dynamic);
13974 });
13975}
13976exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
13977function convertPatternGroupToTask(base, positive, negative, dynamic) {
13978 return {
13979 dynamic,
13980 positive,
13981 negative,
13982 base,
13983 patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
13984 };
13985}
13986exports.convertPatternGroupToTask = convertPatternGroupToTask;
13987
13988
13989/***/ }),
13990/* 61 */
13991/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13992
13993"use strict";
13994
13995Object.defineProperty(exports, "__esModule", ({ value: true }));
13996exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
13997const array = __webpack_require__(62);
13998exports.array = array;
13999const errno = __webpack_require__(63);
14000exports.errno = errno;
14001const fs = __webpack_require__(64);
14002exports.fs = fs;
14003const path = __webpack_require__(65);
14004exports.path = path;
14005const pattern = __webpack_require__(66);
14006exports.pattern = pattern;
14007const stream = __webpack_require__(93);
14008exports.stream = stream;
14009const string = __webpack_require__(96);
14010exports.string = string;
14011
14012
14013/***/ }),
14014/* 62 */
14015/***/ ((__unused_webpack_module, exports) => {
14016
14017"use strict";
14018
14019Object.defineProperty(exports, "__esModule", ({ value: true }));
14020exports.splitWhen = exports.flatten = void 0;
14021function flatten(items) {
14022 return items.reduce((collection, item) => [].concat(collection, item), []);
14023}
14024exports.flatten = flatten;
14025function splitWhen(items, predicate) {
14026 const result = [[]];
14027 let groupIndex = 0;
14028 for (const item of items) {
14029 if (predicate(item)) {
14030 groupIndex++;
14031 result[groupIndex] = [];
14032 }
14033 else {
14034 result[groupIndex].push(item);
14035 }
14036 }
14037 return result;
14038}
14039exports.splitWhen = splitWhen;
14040
14041
14042/***/ }),
14043/* 63 */
14044/***/ ((__unused_webpack_module, exports) => {
14045
14046"use strict";
14047
14048Object.defineProperty(exports, "__esModule", ({ value: true }));
14049exports.isEnoentCodeError = void 0;
14050function isEnoentCodeError(error) {
14051 return error.code === 'ENOENT';
14052}
14053exports.isEnoentCodeError = isEnoentCodeError;
14054
14055
14056/***/ }),
14057/* 64 */
14058/***/ ((__unused_webpack_module, exports) => {
14059
14060"use strict";
14061
14062Object.defineProperty(exports, "__esModule", ({ value: true }));
14063exports.createDirentFromStats = void 0;
14064class DirentFromStats {
14065 constructor(name, stats) {
14066 this.name = name;
14067 this.isBlockDevice = stats.isBlockDevice.bind(stats);
14068 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
14069 this.isDirectory = stats.isDirectory.bind(stats);
14070 this.isFIFO = stats.isFIFO.bind(stats);
14071 this.isFile = stats.isFile.bind(stats);
14072 this.isSocket = stats.isSocket.bind(stats);
14073 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
14074 }
14075}
14076function createDirentFromStats(name, stats) {
14077 return new DirentFromStats(name, stats);
14078}
14079exports.createDirentFromStats = createDirentFromStats;
14080
14081
14082/***/ }),
14083/* 65 */
14084/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14085
14086"use strict";
14087
14088Object.defineProperty(exports, "__esModule", ({ value: true }));
14089exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0;
14090const path = __webpack_require__(13);
14091const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
14092const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
14093/**
14094 * Designed to work only with simple paths: `dir\\file`.
14095 */
14096function unixify(filepath) {
14097 return filepath.replace(/\\/g, '/');
14098}
14099exports.unixify = unixify;
14100function makeAbsolute(cwd, filepath) {
14101 return path.resolve(cwd, filepath);
14102}
14103exports.makeAbsolute = makeAbsolute;
14104function escape(pattern) {
14105 return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
14106}
14107exports.escape = escape;
14108function removeLeadingDotSegment(entry) {
14109 // We do not use `startsWith` because this is 10x slower than current implementation for some cases.
14110 // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
14111 if (entry.charAt(0) === '.') {
14112 const secondCharactery = entry.charAt(1);
14113 if (secondCharactery === '/' || secondCharactery === '\\') {
14114 return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
14115 }
14116 }
14117 return entry;
14118}
14119exports.removeLeadingDotSegment = removeLeadingDotSegment;
14120
14121
14122/***/ }),
14123/* 66 */
14124/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14125
14126"use strict";
14127
14128Object.defineProperty(exports, "__esModule", ({ value: true }));
14129exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
14130const path = __webpack_require__(13);
14131const globParent = __webpack_require__(67);
14132const micromatch = __webpack_require__(70);
14133const picomatch = __webpack_require__(87);
14134const GLOBSTAR = '**';
14135const ESCAPE_SYMBOL = '\\';
14136const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
14137const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/;
14138const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/;
14139const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/;
14140const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/;
14141function isStaticPattern(pattern, options = {}) {
14142 return !isDynamicPattern(pattern, options);
14143}
14144exports.isStaticPattern = isStaticPattern;
14145function isDynamicPattern(pattern, options = {}) {
14146 /**
14147 * A special case with an empty string is necessary for matching patterns that start with a forward slash.
14148 * An empty string cannot be a dynamic pattern.
14149 * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
14150 */
14151 if (pattern === '') {
14152 return false;
14153 }
14154 /**
14155 * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
14156 * filepath directly (without read directory).
14157 */
14158 if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
14159 return true;
14160 }
14161 if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
14162 return true;
14163 }
14164 if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
14165 return true;
14166 }
14167 if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) {
14168 return true;
14169 }
14170 return false;
14171}
14172exports.isDynamicPattern = isDynamicPattern;
14173function convertToPositivePattern(pattern) {
14174 return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
14175}
14176exports.convertToPositivePattern = convertToPositivePattern;
14177function convertToNegativePattern(pattern) {
14178 return '!' + pattern;
14179}
14180exports.convertToNegativePattern = convertToNegativePattern;
14181function isNegativePattern(pattern) {
14182 return pattern.startsWith('!') && pattern[1] !== '(';
14183}
14184exports.isNegativePattern = isNegativePattern;
14185function isPositivePattern(pattern) {
14186 return !isNegativePattern(pattern);
14187}
14188exports.isPositivePattern = isPositivePattern;
14189function getNegativePatterns(patterns) {
14190 return patterns.filter(isNegativePattern);
14191}
14192exports.getNegativePatterns = getNegativePatterns;
14193function getPositivePatterns(patterns) {
14194 return patterns.filter(isPositivePattern);
14195}
14196exports.getPositivePatterns = getPositivePatterns;
14197function getBaseDirectory(pattern) {
14198 return globParent(pattern, { flipBackslashes: false });
14199}
14200exports.getBaseDirectory = getBaseDirectory;
14201function hasGlobStar(pattern) {
14202 return pattern.includes(GLOBSTAR);
14203}
14204exports.hasGlobStar = hasGlobStar;
14205function endsWithSlashGlobStar(pattern) {
14206 return pattern.endsWith('/' + GLOBSTAR);
14207}
14208exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
14209function isAffectDepthOfReadingPattern(pattern) {
14210 const basename = path.basename(pattern);
14211 return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
14212}
14213exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
14214function expandPatternsWithBraceExpansion(patterns) {
14215 return patterns.reduce((collection, pattern) => {
14216 return collection.concat(expandBraceExpansion(pattern));
14217 }, []);
14218}
14219exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
14220function expandBraceExpansion(pattern) {
14221 return micromatch.braces(pattern, {
14222 expand: true,
14223 nodupes: true
14224 });
14225}
14226exports.expandBraceExpansion = expandBraceExpansion;
14227function getPatternParts(pattern, options) {
14228 let { parts } = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
14229 /**
14230 * The scan method returns an empty array in some cases.
14231 * See micromatch/picomatch#58 for more details.
14232 */
14233 if (parts.length === 0) {
14234 parts = [pattern];
14235 }
14236 /**
14237 * The scan method does not return an empty part for the pattern with a forward slash.
14238 * This is another part of micromatch/picomatch#58.
14239 */
14240 if (parts[0].startsWith('/')) {
14241 parts[0] = parts[0].slice(1);
14242 parts.unshift('');
14243 }
14244 return parts;
14245}
14246exports.getPatternParts = getPatternParts;
14247function makeRe(pattern, options) {
14248 return micromatch.makeRe(pattern, options);
14249}
14250exports.makeRe = makeRe;
14251function convertPatternsToRe(patterns, options) {
14252 return patterns.map((pattern) => makeRe(pattern, options));
14253}
14254exports.convertPatternsToRe = convertPatternsToRe;
14255function matchAny(entry, patternsRe) {
14256 return patternsRe.some((patternRe) => patternRe.test(entry));
14257}
14258exports.matchAny = matchAny;
14259
14260
14261/***/ }),
14262/* 67 */
14263/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
14264
14265"use strict";
14266
14267
14268var isGlob = __webpack_require__(68);
14269var pathPosixDirname = __webpack_require__(13).posix.dirname;
14270var isWin32 = __webpack_require__(14).platform() === 'win32';
14271
14272var slash = '/';
14273var backslash = /\\/g;
14274var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
14275var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
14276var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
14277
14278/**
14279 * @param {string} str
14280 * @param {Object} opts
14281 * @param {boolean} [opts.flipBackslashes=true]
14282 */
14283module.exports = function globParent(str, opts) {
14284 var options = Object.assign({ flipBackslashes: true }, opts);
14285
14286 // flip windows path separators
14287 if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
14288 str = str.replace(backslash, slash);
14289 }
14290
14291 // special case for strings ending in enclosure containing path separator
14292 if (enclosure.test(str)) {
14293 str += slash;
14294 }
14295
14296 // preserves full path in case of trailing path separator
14297 str += 'a';
14298
14299 // remove path parts that are globby
14300 do {
14301 str = pathPosixDirname(str);
14302 } while (isGlob(str) || globby.test(str));
14303
14304 // remove escape chars and return result
14305 return str.replace(escaped, '$1');
14306};
14307
14308
14309/***/ }),
14310/* 68 */
14311/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
14312
14313/*!
14314 * is-glob <https://github.com/jonschlinkert/is-glob>
14315 *
14316 * Copyright (c) 2014-2017, Jon Schlinkert.
14317 * Released under the MIT License.
14318 */
14319
14320var isExtglob = __webpack_require__(69);
14321var chars = { '{': '}', '(': ')', '[': ']'};
14322var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
14323var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
14324
14325module.exports = function isGlob(str, options) {
14326 if (typeof str !== 'string' || str === '') {
14327 return false;
14328 }
14329
14330 if (isExtglob(str)) {
14331 return true;
14332 }
14333
14334 var regex = strictRegex;
14335 var match;
14336
14337 // optionally relax regex
14338 if (options && options.strict === false) {
14339 regex = relaxedRegex;
14340 }
14341
14342 while ((match = regex.exec(str))) {
14343 if (match[2]) return true;
14344 var idx = match.index + match[0].length;
14345
14346 // if an open bracket/brace/paren is escaped,
14347 // set the index to the next closing character
14348 var open = match[1];
14349 var close = open ? chars[open] : null;
14350 if (open && close) {
14351 var n = str.indexOf(close, idx);
14352 if (n !== -1) {
14353 idx = n + 1;
14354 }
14355 }
14356
14357 str = str.slice(idx);
14358 }
14359 return false;
14360};
14361
14362
14363/***/ }),
14364/* 69 */
14365/***/ ((module) => {
14366
14367/*!
14368 * is-extglob <https://github.com/jonschlinkert/is-extglob>
14369 *
14370 * Copyright (c) 2014-2016, Jon Schlinkert.
14371 * Licensed under the MIT License.
14372 */
14373
14374module.exports = function isExtglob(str) {
14375 if (typeof str !== 'string' || str === '') {
14376 return false;
14377 }
14378
14379 var match;
14380 while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
14381 if (match[2]) return true;
14382 str = str.slice(match.index + match[0].length);
14383 }
14384
14385 return false;
14386};
14387
14388
14389/***/ }),
14390/* 70 */
14391/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
14392
14393"use strict";
14394
14395
14396const util = __webpack_require__(48);
14397const braces = __webpack_require__(71);
14398const picomatch = __webpack_require__(81);
14399const utils = __webpack_require__(84);
14400const isEmptyString = val => typeof val === 'string' && (val === '' || val === './');
14401
14402/**
14403 * Returns an array of strings that match one or more glob patterns.
14404 *
14405 * ```js
14406 * const mm = require('micromatch');
14407 * // mm(list, patterns[, options]);
14408 *
14409 * console.log(mm(['a.js', 'a.txt'], ['*.js']));
14410 * //=> [ 'a.js' ]
14411 * ```
14412 * @param {String|Array<string>} list List of strings to match.
14413 * @param {String|Array<string>} patterns One or more glob patterns to use for matching.
14414 * @param {Object} options See available [options](#options)
14415 * @return {Array} Returns an array of matches
14416 * @summary false
14417 * @api public
14418 */
14419
14420const micromatch = (list, patterns, options) => {
14421 patterns = [].concat(patterns);
14422 list = [].concat(list);
14423
14424 let omit = new Set();
14425 let keep = new Set();
14426 let items = new Set();
14427 let negatives = 0;
14428
14429 let onResult = state => {
14430 items.add(state.output);
14431 if (options && options.onResult) {
14432 options.onResult(state);
14433 }
14434 };
14435
14436 for (let i = 0; i < patterns.length; i++) {
14437 let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
14438 let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
14439 if (negated) negatives++;
14440
14441 for (let item of list) {
14442 let matched = isMatch(item, true);
14443
14444 let match = negated ? !matched.isMatch : matched.isMatch;
14445 if (!match) continue;
14446
14447 if (negated) {
14448 omit.add(matched.output);
14449 } else {
14450 omit.delete(matched.output);
14451 keep.add(matched.output);
14452 }
14453 }
14454 }
14455
14456 let result = negatives === patterns.length ? [...items] : [...keep];
14457 let matches = result.filter(item => !omit.has(item));
14458
14459 if (options && matches.length === 0) {
14460 if (options.failglob === true) {
14461 throw new Error(`No matches found for "${patterns.join(', ')}"`);
14462 }
14463
14464 if (options.nonull === true || options.nullglob === true) {
14465 return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns;
14466 }
14467 }
14468
14469 return matches;
14470};
14471
14472/**
14473 * Backwards compatibility
14474 */
14475
14476micromatch.match = micromatch;
14477
14478/**
14479 * Returns a matcher function from the given glob `pattern` and `options`.
14480 * The returned function takes a string to match as its only argument and returns
14481 * true if the string is a match.
14482 *
14483 * ```js
14484 * const mm = require('micromatch');
14485 * // mm.matcher(pattern[, options]);
14486 *
14487 * const isMatch = mm.matcher('*.!(*a)');
14488 * console.log(isMatch('a.a')); //=> false
14489 * console.log(isMatch('a.b')); //=> true
14490 * ```
14491 * @param {String} `pattern` Glob pattern
14492 * @param {Object} `options`
14493 * @return {Function} Returns a matcher function.
14494 * @api public
14495 */
14496
14497micromatch.matcher = (pattern, options) => picomatch(pattern, options);
14498
14499/**
14500 * Returns true if **any** of the given glob `patterns` match the specified `string`.
14501 *
14502 * ```js
14503 * const mm = require('micromatch');
14504 * // mm.isMatch(string, patterns[, options]);
14505 *
14506 * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
14507 * console.log(mm.isMatch('a.a', 'b.*')); //=> false
14508 * ```
14509 * @param {String} str The string to test.
14510 * @param {String|Array} patterns One or more glob patterns to use for matching.
14511 * @param {Object} [options] See available [options](#options).
14512 * @return {Boolean} Returns true if any patterns match `str`
14513 * @api public
14514 */
14515
14516micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
14517
14518/**
14519 * Backwards compatibility
14520 */
14521
14522micromatch.any = micromatch.isMatch;
14523
14524/**
14525 * Returns a list of strings that _**do not match any**_ of the given `patterns`.
14526 *
14527 * ```js
14528 * const mm = require('micromatch');
14529 * // mm.not(list, patterns[, options]);
14530 *
14531 * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
14532 * //=> ['b.b', 'c.c']
14533 * ```
14534 * @param {Array} `list` Array of strings to match.
14535 * @param {String|Array} `patterns` One or more glob pattern to use for matching.
14536 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14537 * @return {Array} Returns an array of strings that **do not match** the given patterns.
14538 * @api public
14539 */
14540
14541micromatch.not = (list, patterns, options = {}) => {
14542 patterns = [].concat(patterns).map(String);
14543 let result = new Set();
14544 let items = [];
14545
14546 let onResult = state => {
14547 if (options.onResult) options.onResult(state);
14548 items.push(state.output);
14549 };
14550
14551 let matches = micromatch(list, patterns, { ...options, onResult });
14552
14553 for (let item of items) {
14554 if (!matches.includes(item)) {
14555 result.add(item);
14556 }
14557 }
14558 return [...result];
14559};
14560
14561/**
14562 * Returns true if the given `string` contains the given pattern. Similar
14563 * to [.isMatch](#isMatch) but the pattern can match any part of the string.
14564 *
14565 * ```js
14566 * var mm = require('micromatch');
14567 * // mm.contains(string, pattern[, options]);
14568 *
14569 * console.log(mm.contains('aa/bb/cc', '*b'));
14570 * //=> true
14571 * console.log(mm.contains('aa/bb/cc', '*d'));
14572 * //=> false
14573 * ```
14574 * @param {String} `str` The string to match.
14575 * @param {String|Array} `patterns` Glob pattern to use for matching.
14576 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14577 * @return {Boolean} Returns true if the patter matches any part of `str`.
14578 * @api public
14579 */
14580
14581micromatch.contains = (str, pattern, options) => {
14582 if (typeof str !== 'string') {
14583 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
14584 }
14585
14586 if (Array.isArray(pattern)) {
14587 return pattern.some(p => micromatch.contains(str, p, options));
14588 }
14589
14590 if (typeof pattern === 'string') {
14591 if (isEmptyString(str) || isEmptyString(pattern)) {
14592 return false;
14593 }
14594
14595 if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {
14596 return true;
14597 }
14598 }
14599
14600 return micromatch.isMatch(str, pattern, { ...options, contains: true });
14601};
14602
14603/**
14604 * Filter the keys of the given object with the given `glob` pattern
14605 * and `options`. Does not attempt to match nested keys. If you need this feature,
14606 * use [glob-object][] instead.
14607 *
14608 * ```js
14609 * const mm = require('micromatch');
14610 * // mm.matchKeys(object, patterns[, options]);
14611 *
14612 * const obj = { aa: 'a', ab: 'b', ac: 'c' };
14613 * console.log(mm.matchKeys(obj, '*b'));
14614 * //=> { ab: 'b' }
14615 * ```
14616 * @param {Object} `object` The object with keys to filter.
14617 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14618 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14619 * @return {Object} Returns an object with only keys that match the given patterns.
14620 * @api public
14621 */
14622
14623micromatch.matchKeys = (obj, patterns, options) => {
14624 if (!utils.isObject(obj)) {
14625 throw new TypeError('Expected the first argument to be an object');
14626 }
14627 let keys = micromatch(Object.keys(obj), patterns, options);
14628 let res = {};
14629 for (let key of keys) res[key] = obj[key];
14630 return res;
14631};
14632
14633/**
14634 * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
14635 *
14636 * ```js
14637 * const mm = require('micromatch');
14638 * // mm.some(list, patterns[, options]);
14639 *
14640 * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
14641 * // true
14642 * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
14643 * // false
14644 * ```
14645 * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
14646 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14647 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14648 * @return {Boolean} Returns true if any patterns match `str`
14649 * @api public
14650 */
14651
14652micromatch.some = (list, patterns, options) => {
14653 let items = [].concat(list);
14654
14655 for (let pattern of [].concat(patterns)) {
14656 let isMatch = picomatch(String(pattern), options);
14657 if (items.some(item => isMatch(item))) {
14658 return true;
14659 }
14660 }
14661 return false;
14662};
14663
14664/**
14665 * Returns true if every string in the given `list` matches
14666 * any of the given glob `patterns`.
14667 *
14668 * ```js
14669 * const mm = require('micromatch');
14670 * // mm.every(list, patterns[, options]);
14671 *
14672 * console.log(mm.every('foo.js', ['foo.js']));
14673 * // true
14674 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
14675 * // true
14676 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
14677 * // false
14678 * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
14679 * // false
14680 * ```
14681 * @param {String|Array} `list` The string or array of strings to test.
14682 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14683 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14684 * @return {Boolean} Returns true if any patterns match `str`
14685 * @api public
14686 */
14687
14688micromatch.every = (list, patterns, options) => {
14689 let items = [].concat(list);
14690
14691 for (let pattern of [].concat(patterns)) {
14692 let isMatch = picomatch(String(pattern), options);
14693 if (!items.every(item => isMatch(item))) {
14694 return false;
14695 }
14696 }
14697 return true;
14698};
14699
14700/**
14701 * Returns true if **all** of the given `patterns` match
14702 * the specified string.
14703 *
14704 * ```js
14705 * const mm = require('micromatch');
14706 * // mm.all(string, patterns[, options]);
14707 *
14708 * console.log(mm.all('foo.js', ['foo.js']));
14709 * // true
14710 *
14711 * console.log(mm.all('foo.js', ['*.js', '!foo.js']));
14712 * // false
14713 *
14714 * console.log(mm.all('foo.js', ['*.js', 'foo.js']));
14715 * // true
14716 *
14717 * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
14718 * // true
14719 * ```
14720 * @param {String|Array} `str` The string to test.
14721 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
14722 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14723 * @return {Boolean} Returns true if any patterns match `str`
14724 * @api public
14725 */
14726
14727micromatch.all = (str, patterns, options) => {
14728 if (typeof str !== 'string') {
14729 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
14730 }
14731
14732 return [].concat(patterns).every(p => picomatch(p, options)(str));
14733};
14734
14735/**
14736 * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
14737 *
14738 * ```js
14739 * const mm = require('micromatch');
14740 * // mm.capture(pattern, string[, options]);
14741 *
14742 * console.log(mm.capture('test/*.js', 'test/foo.js'));
14743 * //=> ['foo']
14744 * console.log(mm.capture('test/*.js', 'foo/bar.css'));
14745 * //=> null
14746 * ```
14747 * @param {String} `glob` Glob pattern to use for matching.
14748 * @param {String} `input` String to match
14749 * @param {Object} `options` See available [options](#options) for changing how matches are performed
14750 * @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
14751 * @api public
14752 */
14753
14754micromatch.capture = (glob, input, options) => {
14755 let posix = utils.isWindows(options);
14756 let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
14757 let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
14758
14759 if (match) {
14760 return match.slice(1).map(v => v === void 0 ? '' : v);
14761 }
14762};
14763
14764/**
14765 * Create a regular expression from the given glob `pattern`.
14766 *
14767 * ```js
14768 * const mm = require('micromatch');
14769 * // mm.makeRe(pattern[, options]);
14770 *
14771 * console.log(mm.makeRe('*.js'));
14772 * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
14773 * ```
14774 * @param {String} `pattern` A glob pattern to convert to regex.
14775 * @param {Object} `options`
14776 * @return {RegExp} Returns a regex created from the given pattern.
14777 * @api public
14778 */
14779
14780micromatch.makeRe = (...args) => picomatch.makeRe(...args);
14781
14782/**
14783 * Scan a glob pattern to separate the pattern into segments. Used
14784 * by the [split](#split) method.
14785 *
14786 * ```js
14787 * const mm = require('micromatch');
14788 * const state = mm.scan(pattern[, options]);
14789 * ```
14790 * @param {String} `pattern`
14791 * @param {Object} `options`
14792 * @return {Object} Returns an object with
14793 * @api public
14794 */
14795
14796micromatch.scan = (...args) => picomatch.scan(...args);
14797
14798/**
14799 * Parse a glob pattern to create the source string for a regular
14800 * expression.
14801 *
14802 * ```js
14803 * const mm = require('micromatch');
14804 * const state = mm(pattern[, options]);
14805 * ```
14806 * @param {String} `glob`
14807 * @param {Object} `options`
14808 * @return {Object} Returns an object with useful properties and output to be used as regex source string.
14809 * @api public
14810 */
14811
14812micromatch.parse = (patterns, options) => {
14813 let res = [];
14814 for (let pattern of [].concat(patterns || [])) {
14815 for (let str of braces(String(pattern), options)) {
14816 res.push(picomatch.parse(str, options));
14817 }
14818 }
14819 return res;
14820};
14821
14822/**
14823 * Process the given brace `pattern`.
14824 *
14825 * ```js
14826 * const { braces } = require('micromatch');
14827 * console.log(braces('foo/{a,b,c}/bar'));
14828 * //=> [ 'foo/(a|b|c)/bar' ]
14829 *
14830 * console.log(braces('foo/{a,b,c}/bar', { expand: true }));
14831 * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
14832 * ```
14833 * @param {String} `pattern` String with brace pattern to process.
14834 * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
14835 * @return {Array}
14836 * @api public
14837 */
14838
14839micromatch.braces = (pattern, options) => {
14840 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
14841 if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
14842 return [pattern];
14843 }
14844 return braces(pattern, options);
14845};
14846
14847/**
14848 * Expand braces
14849 */
14850
14851micromatch.braceExpand = (pattern, options) => {
14852 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
14853 return micromatch.braces(pattern, { ...options, expand: true });
14854};
14855
14856/**
14857 * Expose micromatch
14858 */
14859
14860module.exports = micromatch;
14861
14862
14863/***/ }),
14864/* 71 */
14865/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
14866
14867"use strict";
14868
14869
14870const stringify = __webpack_require__(72);
14871const compile = __webpack_require__(74);
14872const expand = __webpack_require__(78);
14873const parse = __webpack_require__(79);
14874
14875/**
14876 * Expand the given pattern or create a regex-compatible string.
14877 *
14878 * ```js
14879 * const braces = require('braces');
14880 * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
14881 * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
14882 * ```
14883 * @param {String} `str`
14884 * @param {Object} `options`
14885 * @return {String}
14886 * @api public
14887 */
14888
14889const braces = (input, options = {}) => {
14890 let output = [];
14891
14892 if (Array.isArray(input)) {
14893 for (let pattern of input) {
14894 let result = braces.create(pattern, options);
14895 if (Array.isArray(result)) {
14896 output.push(...result);
14897 } else {
14898 output.push(result);
14899 }
14900 }
14901 } else {
14902 output = [].concat(braces.create(input, options));
14903 }
14904
14905 if (options && options.expand === true && options.nodupes === true) {
14906 output = [...new Set(output)];
14907 }
14908 return output;
14909};
14910
14911/**
14912 * Parse the given `str` with the given `options`.
14913 *
14914 * ```js
14915 * // braces.parse(pattern, [, options]);
14916 * const ast = braces.parse('a/{b,c}/d');
14917 * console.log(ast);
14918 * ```
14919 * @param {String} pattern Brace pattern to parse
14920 * @param {Object} options
14921 * @return {Object} Returns an AST
14922 * @api public
14923 */
14924
14925braces.parse = (input, options = {}) => parse(input, options);
14926
14927/**
14928 * Creates a braces string from an AST, or an AST node.
14929 *
14930 * ```js
14931 * const braces = require('braces');
14932 * let ast = braces.parse('foo/{a,b}/bar');
14933 * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
14934 * ```
14935 * @param {String} `input` Brace pattern or AST.
14936 * @param {Object} `options`
14937 * @return {Array} Returns an array of expanded values.
14938 * @api public
14939 */
14940
14941braces.stringify = (input, options = {}) => {
14942 if (typeof input === 'string') {
14943 return stringify(braces.parse(input, options), options);
14944 }
14945 return stringify(input, options);
14946};
14947
14948/**
14949 * Compiles a brace pattern into a regex-compatible, optimized string.
14950 * This method is called by the main [braces](#braces) function by default.
14951 *
14952 * ```js
14953 * const braces = require('braces');
14954 * console.log(braces.compile('a/{b,c}/d'));
14955 * //=> ['a/(b|c)/d']
14956 * ```
14957 * @param {String} `input` Brace pattern or AST.
14958 * @param {Object} `options`
14959 * @return {Array} Returns an array of expanded values.
14960 * @api public
14961 */
14962
14963braces.compile = (input, options = {}) => {
14964 if (typeof input === 'string') {
14965 input = braces.parse(input, options);
14966 }
14967 return compile(input, options);
14968};
14969
14970/**
14971 * Expands a brace pattern into an array. This method is called by the
14972 * main [braces](#braces) function when `options.expand` is true. Before
14973 * using this method it's recommended that you read the [performance notes](#performance))
14974 * and advantages of using [.compile](#compile) instead.
14975 *
14976 * ```js
14977 * const braces = require('braces');
14978 * console.log(braces.expand('a/{b,c}/d'));
14979 * //=> ['a/b/d', 'a/c/d'];
14980 * ```
14981 * @param {String} `pattern` Brace pattern
14982 * @param {Object} `options`
14983 * @return {Array} Returns an array of expanded values.
14984 * @api public
14985 */
14986
14987braces.expand = (input, options = {}) => {
14988 if (typeof input === 'string') {
14989 input = braces.parse(input, options);
14990 }
14991
14992 let result = expand(input, options);
14993
14994 // filter out empty strings if specified
14995 if (options.noempty === true) {
14996 result = result.filter(Boolean);
14997 }
14998
14999 // filter out duplicates if specified
15000 if (options.nodupes === true) {
15001 result = [...new Set(result)];
15002 }
15003
15004 return result;
15005};
15006
15007/**
15008 * Processes a brace pattern and returns either an expanded array
15009 * (if `options.expand` is true), a highly optimized regex-compatible string.
15010 * This method is called by the main [braces](#braces) function.
15011 *
15012 * ```js
15013 * const braces = require('braces');
15014 * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
15015 * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
15016 * ```
15017 * @param {String} `pattern` Brace pattern
15018 * @param {Object} `options`
15019 * @return {Array} Returns an array of expanded values.
15020 * @api public
15021 */
15022
15023braces.create = (input, options = {}) => {
15024 if (input === '' || input.length < 3) {
15025 return [input];
15026 }
15027
15028 return options.expand !== true
15029 ? braces.compile(input, options)
15030 : braces.expand(input, options);
15031};
15032
15033/**
15034 * Expose "braces"
15035 */
15036
15037module.exports = braces;
15038
15039
15040/***/ }),
15041/* 72 */
15042/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
15043
15044"use strict";
15045
15046
15047const utils = __webpack_require__(73);
15048
15049module.exports = (ast, options = {}) => {
15050 let stringify = (node, parent = {}) => {
15051 let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
15052 let invalidNode = node.invalid === true && options.escapeInvalid === true;
15053 let output = '';
15054
15055 if (node.value) {
15056 if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
15057 return '\\' + node.value;
15058 }
15059 return node.value;
15060 }
15061
15062 if (node.value) {
15063 return node.value;
15064 }
15065
15066 if (node.nodes) {
15067 for (let child of node.nodes) {
15068 output += stringify(child);
15069 }
15070 }
15071 return output;
15072 };
15073
15074 return stringify(ast);
15075};
15076
15077
15078
15079/***/ }),
15080/* 73 */
15081/***/ ((__unused_webpack_module, exports) => {
15082
15083"use strict";
15084
15085
15086exports.isInteger = num => {
15087 if (typeof num === 'number') {
15088 return Number.isInteger(num);
15089 }
15090 if (typeof num === 'string' && num.trim() !== '') {
15091 return Number.isInteger(Number(num));
15092 }
15093 return false;
15094};
15095
15096/**
15097 * Find a node of the given type
15098 */
15099
15100exports.find = (node, type) => node.nodes.find(node => node.type === type);
15101
15102/**
15103 * Find a node of the given type
15104 */
15105
15106exports.exceedsLimit = (min, max, step = 1, limit) => {
15107 if (limit === false) return false;
15108 if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
15109 return ((Number(max) - Number(min)) / Number(step)) >= limit;
15110};
15111
15112/**
15113 * Escape the given node with '\\' before node.value
15114 */
15115
15116exports.escapeNode = (block, n = 0, type) => {
15117 let node = block.nodes[n];
15118 if (!node) return;
15119
15120 if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
15121 if (node.escaped !== true) {
15122 node.value = '\\' + node.value;
15123 node.escaped = true;
15124 }
15125 }
15126};
15127
15128/**
15129 * Returns true if the given brace node should be enclosed in literal braces
15130 */
15131
15132exports.encloseBrace = node => {
15133 if (node.type !== 'brace') return false;
15134 if ((node.commas >> 0 + node.ranges >> 0) === 0) {
15135 node.invalid = true;
15136 return true;
15137 }
15138 return false;
15139};
15140
15141/**
15142 * Returns true if a brace node is invalid.
15143 */
15144
15145exports.isInvalidBrace = block => {
15146 if (block.type !== 'brace') return false;
15147 if (block.invalid === true || block.dollar) return true;
15148 if ((block.commas >> 0 + block.ranges >> 0) === 0) {
15149 block.invalid = true;
15150 return true;
15151 }
15152 if (block.open !== true || block.close !== true) {
15153 block.invalid = true;
15154 return true;
15155 }
15156 return false;
15157};
15158
15159/**
15160 * Returns true if a node is an open or close node
15161 */
15162
15163exports.isOpenOrClose = node => {
15164 if (node.type === 'open' || node.type === 'close') {
15165 return true;
15166 }
15167 return node.open === true || node.close === true;
15168};
15169
15170/**
15171 * Reduce an array of text nodes.
15172 */
15173
15174exports.reduce = nodes => nodes.reduce((acc, node) => {
15175 if (node.type === 'text') acc.push(node.value);
15176 if (node.type === 'range') node.type = 'text';
15177 return acc;
15178}, []);
15179
15180/**
15181 * Flatten an array
15182 */
15183
15184exports.flatten = (...args) => {
15185 const result = [];
15186 const flat = arr => {
15187 for (let i = 0; i < arr.length; i++) {
15188 let ele = arr[i];
15189 Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
15190 }
15191 return result;
15192 };
15193 flat(args);
15194 return result;
15195};
15196
15197
15198/***/ }),
15199/* 74 */
15200/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
15201
15202"use strict";
15203
15204
15205const fill = __webpack_require__(75);
15206const utils = __webpack_require__(73);
15207
15208const compile = (ast, options = {}) => {
15209 let walk = (node, parent = {}) => {
15210 let invalidBlock = utils.isInvalidBrace(parent);
15211 let invalidNode = node.invalid === true && options.escapeInvalid === true;
15212 let invalid = invalidBlock === true || invalidNode === true;
15213 let prefix = options.escapeInvalid === true ? '\\' : '';
15214 let output = '';
15215
15216 if (node.isOpen === true) {
15217 return prefix + node.value;
15218 }
15219 if (node.isClose === true) {
15220 return prefix + node.value;
15221 }
15222
15223 if (node.type === 'open') {
15224 return invalid ? (prefix + node.value) : '(';
15225 }
15226
15227 if (node.type === 'close') {
15228 return invalid ? (prefix + node.value) : ')';
15229 }
15230
15231 if (node.type === 'comma') {
15232 return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
15233 }
15234
15235 if (node.value) {
15236 return node.value;
15237 }
15238
15239 if (node.nodes && node.ranges > 0) {
15240 let args = utils.reduce(node.nodes);
15241 let range = fill(...args, { ...options, wrap: false, toRegex: true });
15242
15243 if (range.length !== 0) {
15244 return args.length > 1 && range.length > 1 ? `(${range})` : range;
15245 }
15246 }
15247
15248 if (node.nodes) {
15249 for (let child of node.nodes) {
15250 output += walk(child, node);
15251 }
15252 }
15253 return output;
15254 };
15255
15256 return walk(ast);
15257};
15258
15259module.exports = compile;
15260
15261
15262/***/ }),
15263/* 75 */
15264/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
15265
15266"use strict";
15267/*!
15268 * fill-range <https://github.com/jonschlinkert/fill-range>
15269 *
15270 * Copyright (c) 2014-present, Jon Schlinkert.
15271 * Licensed under the MIT License.
15272 */
15273
15274
15275
15276const util = __webpack_require__(48);
15277const toRegexRange = __webpack_require__(76);
15278
15279const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
15280
15281const transform = toNumber => {
15282 return value => toNumber === true ? Number(value) : String(value);
15283};
15284
15285const isValidValue = value => {
15286 return typeof value === 'number' || (typeof value === 'string' && value !== '');
15287};
15288
15289const isNumber = num => Number.isInteger(+num);
15290
15291const zeros = input => {
15292 let value = `${input}`;
15293 let index = -1;
15294 if (value[0] === '-') value = value.slice(1);
15295 if (value === '0') return false;
15296 while (value[++index] === '0');
15297 return index > 0;
15298};
15299
15300const stringify = (start, end, options) => {
15301 if (typeof start === 'string' || typeof end === 'string') {
15302 return true;
15303 }
15304 return options.stringify === true;
15305};
15306
15307const pad = (input, maxLength, toNumber) => {
15308 if (maxLength > 0) {
15309 let dash = input[0] === '-' ? '-' : '';
15310 if (dash) input = input.slice(1);
15311 input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
15312 }
15313 if (toNumber === false) {
15314 return String(input);
15315 }
15316 return input;
15317};
15318
15319const toMaxLen = (input, maxLength) => {
15320 let negative = input[0] === '-' ? '-' : '';
15321 if (negative) {
15322 input = input.slice(1);
15323 maxLength--;
15324 }
15325 while (input.length < maxLength) input = '0' + input;
15326 return negative ? ('-' + input) : input;
15327};
15328
15329const toSequence = (parts, options) => {
15330 parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
15331 parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
15332
15333 let prefix = options.capture ? '' : '?:';
15334 let positives = '';
15335 let negatives = '';
15336 let result;
15337
15338 if (parts.positives.length) {
15339 positives = parts.positives.join('|');
15340 }
15341
15342 if (parts.negatives.length) {
15343 negatives = `-(${prefix}${parts.negatives.join('|')})`;
15344 }
15345
15346 if (positives && negatives) {
15347 result = `${positives}|${negatives}`;
15348 } else {
15349 result = positives || negatives;
15350 }
15351
15352 if (options.wrap) {
15353 return `(${prefix}${result})`;
15354 }
15355
15356 return result;
15357};
15358
15359const toRange = (a, b, isNumbers, options) => {
15360 if (isNumbers) {
15361 return toRegexRange(a, b, { wrap: false, ...options });
15362 }
15363
15364 let start = String.fromCharCode(a);
15365 if (a === b) return start;
15366
15367 let stop = String.fromCharCode(b);
15368 return `[${start}-${stop}]`;
15369};
15370
15371const toRegex = (start, end, options) => {
15372 if (Array.isArray(start)) {
15373 let wrap = options.wrap === true;
15374 let prefix = options.capture ? '' : '?:';
15375 return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
15376 }
15377 return toRegexRange(start, end, options);
15378};
15379
15380const rangeError = (...args) => {
15381 return new RangeError('Invalid range arguments: ' + util.inspect(...args));
15382};
15383
15384const invalidRange = (start, end, options) => {
15385 if (options.strictRanges === true) throw rangeError([start, end]);
15386 return [];
15387};
15388
15389const invalidStep = (step, options) => {
15390 if (options.strictRanges === true) {
15391 throw new TypeError(`Expected step "${step}" to be a number`);
15392 }
15393 return [];
15394};
15395
15396const fillNumbers = (start, end, step = 1, options = {}) => {
15397 let a = Number(start);
15398 let b = Number(end);
15399
15400 if (!Number.isInteger(a) || !Number.isInteger(b)) {
15401 if (options.strictRanges === true) throw rangeError([start, end]);
15402 return [];
15403 }
15404
15405 // fix negative zero
15406 if (a === 0) a = 0;
15407 if (b === 0) b = 0;
15408
15409 let descending = a > b;
15410 let startString = String(start);
15411 let endString = String(end);
15412 let stepString = String(step);
15413 step = Math.max(Math.abs(step), 1);
15414
15415 let padded = zeros(startString) || zeros(endString) || zeros(stepString);
15416 let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
15417 let toNumber = padded === false && stringify(start, end, options) === false;
15418 let format = options.transform || transform(toNumber);
15419
15420 if (options.toRegex && step === 1) {
15421 return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
15422 }
15423
15424 let parts = { negatives: [], positives: [] };
15425 let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
15426 let range = [];
15427 let index = 0;
15428
15429 while (descending ? a >= b : a <= b) {
15430 if (options.toRegex === true && step > 1) {
15431 push(a);
15432 } else {
15433 range.push(pad(format(a, index), maxLen, toNumber));
15434 }
15435 a = descending ? a - step : a + step;
15436 index++;
15437 }
15438
15439 if (options.toRegex === true) {
15440 return step > 1
15441 ? toSequence(parts, options)
15442 : toRegex(range, null, { wrap: false, ...options });
15443 }
15444
15445 return range;
15446};
15447
15448const fillLetters = (start, end, step = 1, options = {}) => {
15449 if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
15450 return invalidRange(start, end, options);
15451 }
15452
15453
15454 let format = options.transform || (val => String.fromCharCode(val));
15455 let a = `${start}`.charCodeAt(0);
15456 let b = `${end}`.charCodeAt(0);
15457
15458 let descending = a > b;
15459 let min = Math.min(a, b);
15460 let max = Math.max(a, b);
15461
15462 if (options.toRegex && step === 1) {
15463 return toRange(min, max, false, options);
15464 }
15465
15466 let range = [];
15467 let index = 0;
15468
15469 while (descending ? a >= b : a <= b) {
15470 range.push(format(a, index));
15471 a = descending ? a - step : a + step;
15472 index++;
15473 }
15474
15475 if (options.toRegex === true) {
15476 return toRegex(range, null, { wrap: false, options });
15477 }
15478
15479 return range;
15480};
15481
15482const fill = (start, end, step, options = {}) => {
15483 if (end == null && isValidValue(start)) {
15484 return [start];
15485 }
15486
15487 if (!isValidValue(start) || !isValidValue(end)) {
15488 return invalidRange(start, end, options);
15489 }
15490
15491 if (typeof step === 'function') {
15492 return fill(start, end, 1, { transform: step });
15493 }
15494
15495 if (isObject(step)) {
15496 return fill(start, end, 0, step);
15497 }
15498
15499 let opts = { ...options };
15500 if (opts.capture === true) opts.wrap = true;
15501 step = step || opts.step || 1;
15502
15503 if (!isNumber(step)) {
15504 if (step != null && !isObject(step)) return invalidStep(step, opts);
15505 return fill(start, end, 1, step);
15506 }
15507
15508 if (isNumber(start) && isNumber(end)) {
15509 return fillNumbers(start, end, step, opts);
15510 }
15511
15512 return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
15513};
15514
15515module.exports = fill;
15516
15517
15518/***/ }),
15519/* 76 */
15520/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
15521
15522"use strict";
15523/*!
15524 * to-regex-range <https://github.com/micromatch/to-regex-range>
15525 *
15526 * Copyright (c) 2015-present, Jon Schlinkert.
15527 * Released under the MIT License.
15528 */
15529
15530
15531
15532const isNumber = __webpack_require__(77);
15533
15534const toRegexRange = (min, max, options) => {
15535 if (isNumber(min) === false) {
15536 throw new TypeError('toRegexRange: expected the first argument to be a number');
15537 }
15538
15539 if (max === void 0 || min === max) {
15540 return String(min);
15541 }
15542
15543 if (isNumber(max) === false) {
15544 throw new TypeError('toRegexRange: expected the second argument to be a number.');
15545 }
15546
15547 let opts = { relaxZeros: true, ...options };
15548 if (typeof opts.strictZeros === 'boolean') {
15549 opts.relaxZeros = opts.strictZeros === false;
15550 }
15551
15552 let relax = String(opts.relaxZeros);
15553 let shorthand = String(opts.shorthand);
15554 let capture = String(opts.capture);
15555 let wrap = String(opts.wrap);
15556 let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
15557
15558 if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
15559 return toRegexRange.cache[cacheKey].result;
15560 }
15561
15562 let a = Math.min(min, max);
15563 let b = Math.max(min, max);
15564
15565 if (Math.abs(a - b) === 1) {
15566 let result = min + '|' + max;
15567 if (opts.capture) {
15568 return `(${result})`;
15569 }
15570 if (opts.wrap === false) {
15571 return result;
15572 }
15573 return `(?:${result})`;
15574 }
15575
15576 let isPadded = hasPadding(min) || hasPadding(max);
15577 let state = { min, max, a, b };
15578 let positives = [];
15579 let negatives = [];
15580
15581 if (isPadded) {
15582 state.isPadded = isPadded;
15583 state.maxLen = String(state.max).length;
15584 }
15585
15586 if (a < 0) {
15587 let newMin = b < 0 ? Math.abs(b) : 1;
15588 negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
15589 a = state.a = 0;
15590 }
15591
15592 if (b >= 0) {
15593 positives = splitToPatterns(a, b, state, opts);
15594 }
15595
15596 state.negatives = negatives;
15597 state.positives = positives;
15598 state.result = collatePatterns(negatives, positives, opts);
15599
15600 if (opts.capture === true) {
15601 state.result = `(${state.result})`;
15602 } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
15603 state.result = `(?:${state.result})`;
15604 }
15605
15606 toRegexRange.cache[cacheKey] = state;
15607 return state.result;
15608};
15609
15610function collatePatterns(neg, pos, options) {
15611 let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
15612 let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
15613 let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
15614 let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
15615 return subpatterns.join('|');
15616}
15617
15618function splitToRanges(min, max) {
15619 let nines = 1;
15620 let zeros = 1;
15621
15622 let stop = countNines(min, nines);
15623 let stops = new Set([max]);
15624
15625 while (min <= stop && stop <= max) {
15626 stops.add(stop);
15627 nines += 1;
15628 stop = countNines(min, nines);
15629 }
15630
15631 stop = countZeros(max + 1, zeros) - 1;
15632
15633 while (min < stop && stop <= max) {
15634 stops.add(stop);
15635 zeros += 1;
15636 stop = countZeros(max + 1, zeros) - 1;
15637 }
15638
15639 stops = [...stops];
15640 stops.sort(compare);
15641 return stops;
15642}
15643
15644/**
15645 * Convert a range to a regex pattern
15646 * @param {Number} `start`
15647 * @param {Number} `stop`
15648 * @return {String}
15649 */
15650
15651function rangeToPattern(start, stop, options) {
15652 if (start === stop) {
15653 return { pattern: start, count: [], digits: 0 };
15654 }
15655
15656 let zipped = zip(start, stop);
15657 let digits = zipped.length;
15658 let pattern = '';
15659 let count = 0;
15660
15661 for (let i = 0; i < digits; i++) {
15662 let [startDigit, stopDigit] = zipped[i];
15663
15664 if (startDigit === stopDigit) {
15665 pattern += startDigit;
15666
15667 } else if (startDigit !== '0' || stopDigit !== '9') {
15668 pattern += toCharacterClass(startDigit, stopDigit, options);
15669
15670 } else {
15671 count++;
15672 }
15673 }
15674
15675 if (count) {
15676 pattern += options.shorthand === true ? '\\d' : '[0-9]';
15677 }
15678
15679 return { pattern, count: [count], digits };
15680}
15681
15682function splitToPatterns(min, max, tok, options) {
15683 let ranges = splitToRanges(min, max);
15684 let tokens = [];
15685 let start = min;
15686 let prev;
15687
15688 for (let i = 0; i < ranges.length; i++) {
15689 let max = ranges[i];
15690 let obj = rangeToPattern(String(start), String(max), options);
15691 let zeros = '';
15692
15693 if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
15694 if (prev.count.length > 1) {
15695 prev.count.pop();
15696 }
15697
15698 prev.count.push(obj.count[0]);
15699 prev.string = prev.pattern + toQuantifier(prev.count);
15700 start = max + 1;
15701 continue;
15702 }
15703
15704 if (tok.isPadded) {
15705 zeros = padZeros(max, tok, options);
15706 }
15707
15708 obj.string = zeros + obj.pattern + toQuantifier(obj.count);
15709 tokens.push(obj);
15710 start = max + 1;
15711 prev = obj;
15712 }
15713
15714 return tokens;
15715}
15716
15717function filterPatterns(arr, comparison, prefix, intersection, options) {
15718 let result = [];
15719
15720 for (let ele of arr) {
15721 let { string } = ele;
15722
15723 // only push if _both_ are negative...
15724 if (!intersection && !contains(comparison, 'string', string)) {
15725 result.push(prefix + string);
15726 }
15727
15728 // or _both_ are positive
15729 if (intersection && contains(comparison, 'string', string)) {
15730 result.push(prefix + string);
15731 }
15732 }
15733 return result;
15734}
15735
15736/**
15737 * Zip strings
15738 */
15739
15740function zip(a, b) {
15741 let arr = [];
15742 for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
15743 return arr;
15744}
15745
15746function compare(a, b) {
15747 return a > b ? 1 : b > a ? -1 : 0;
15748}
15749
15750function contains(arr, key, val) {
15751 return arr.some(ele => ele[key] === val);
15752}
15753
15754function countNines(min, len) {
15755 return Number(String(min).slice(0, -len) + '9'.repeat(len));
15756}
15757
15758function countZeros(integer, zeros) {
15759 return integer - (integer % Math.pow(10, zeros));
15760}
15761
15762function toQuantifier(digits) {
15763 let [start = 0, stop = ''] = digits;
15764 if (stop || start > 1) {
15765 return `{${start + (stop ? ',' + stop : '')}}`;
15766 }
15767 return '';
15768}
15769
15770function toCharacterClass(a, b, options) {
15771 return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
15772}
15773
15774function hasPadding(str) {
15775 return /^-?(0+)\d/.test(str);
15776}
15777
15778function padZeros(value, tok, options) {
15779 if (!tok.isPadded) {
15780 return value;
15781 }
15782
15783 let diff = Math.abs(tok.maxLen - String(value).length);
15784 let relax = options.relaxZeros !== false;
15785
15786 switch (diff) {
15787 case 0:
15788 return '';
15789 case 1:
15790 return relax ? '0?' : '0';
15791 case 2:
15792 return relax ? '0{0,2}' : '00';
15793 default: {
15794 return relax ? `0{0,${diff}}` : `0{${diff}}`;
15795 }
15796 }
15797}
15798
15799/**
15800 * Cache
15801 */
15802
15803toRegexRange.cache = {};
15804toRegexRange.clearCache = () => (toRegexRange.cache = {});
15805
15806/**
15807 * Expose `toRegexRange`
15808 */
15809
15810module.exports = toRegexRange;
15811
15812
15813/***/ }),
15814/* 77 */
15815/***/ ((module) => {
15816
15817"use strict";
15818/*!
15819 * is-number <https://github.com/jonschlinkert/is-number>
15820 *
15821 * Copyright (c) 2014-present, Jon Schlinkert.
15822 * Released under the MIT License.
15823 */
15824
15825
15826
15827module.exports = function(num) {
15828 if (typeof num === 'number') {
15829 return num - num === 0;
15830 }
15831 if (typeof num === 'string' && num.trim() !== '') {
15832 return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
15833 }
15834 return false;
15835};
15836
15837
15838/***/ }),
15839/* 78 */
15840/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
15841
15842"use strict";
15843
15844
15845const fill = __webpack_require__(75);
15846const stringify = __webpack_require__(72);
15847const utils = __webpack_require__(73);
15848
15849const append = (queue = '', stash = '', enclose = false) => {
15850 let result = [];
15851
15852 queue = [].concat(queue);
15853 stash = [].concat(stash);
15854
15855 if (!stash.length) return queue;
15856 if (!queue.length) {
15857 return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
15858 }
15859
15860 for (let item of queue) {
15861 if (Array.isArray(item)) {
15862 for (let value of item) {
15863 result.push(append(value, stash, enclose));
15864 }
15865 } else {
15866 for (let ele of stash) {
15867 if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
15868 result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
15869 }
15870 }
15871 }
15872 return utils.flatten(result);
15873};
15874
15875const expand = (ast, options = {}) => {
15876 let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
15877
15878 let walk = (node, parent = {}) => {
15879 node.queue = [];
15880
15881 let p = parent;
15882 let q = parent.queue;
15883
15884 while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
15885 p = p.parent;
15886 q = p.queue;
15887 }
15888
15889 if (node.invalid || node.dollar) {
15890 q.push(append(q.pop(), stringify(node, options)));
15891 return;
15892 }
15893
15894 if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
15895 q.push(append(q.pop(), ['{}']));
15896 return;
15897 }
15898
15899 if (node.nodes && node.ranges > 0) {
15900 let args = utils.reduce(node.nodes);
15901
15902 if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
15903 throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
15904 }
15905
15906 let range = fill(...args, options);
15907 if (range.length === 0) {
15908 range = stringify(node, options);
15909 }
15910
15911 q.push(append(q.pop(), range));
15912 node.nodes = [];
15913 return;
15914 }
15915
15916 let enclose = utils.encloseBrace(node);
15917 let queue = node.queue;
15918 let block = node;
15919
15920 while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
15921 block = block.parent;
15922 queue = block.queue;
15923 }
15924
15925 for (let i = 0; i < node.nodes.length; i++) {
15926 let child = node.nodes[i];
15927
15928 if (child.type === 'comma' && node.type === 'brace') {
15929 if (i === 1) queue.push('');
15930 queue.push('');
15931 continue;
15932 }
15933
15934 if (child.type === 'close') {
15935 q.push(append(q.pop(), queue, enclose));
15936 continue;
15937 }
15938
15939 if (child.value && child.type !== 'open') {
15940 queue.push(append(queue.pop(), child.value));
15941 continue;
15942 }
15943
15944 if (child.nodes) {
15945 walk(child, node);
15946 }
15947 }
15948
15949 return queue;
15950 };
15951
15952 return utils.flatten(walk(ast));
15953};
15954
15955module.exports = expand;
15956
15957
15958/***/ }),
15959/* 79 */
15960/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
15961
15962"use strict";
15963
15964
15965const stringify = __webpack_require__(72);
15966
15967/**
15968 * Constants
15969 */
15970
15971const {
15972 MAX_LENGTH,
15973 CHAR_BACKSLASH, /* \ */
15974 CHAR_BACKTICK, /* ` */
15975 CHAR_COMMA, /* , */
15976 CHAR_DOT, /* . */
15977 CHAR_LEFT_PARENTHESES, /* ( */
15978 CHAR_RIGHT_PARENTHESES, /* ) */
15979 CHAR_LEFT_CURLY_BRACE, /* { */
15980 CHAR_RIGHT_CURLY_BRACE, /* } */
15981 CHAR_LEFT_SQUARE_BRACKET, /* [ */
15982 CHAR_RIGHT_SQUARE_BRACKET, /* ] */
15983 CHAR_DOUBLE_QUOTE, /* " */
15984 CHAR_SINGLE_QUOTE, /* ' */
15985 CHAR_NO_BREAK_SPACE,
15986 CHAR_ZERO_WIDTH_NOBREAK_SPACE
15987} = __webpack_require__(80);
15988
15989/**
15990 * parse
15991 */
15992
15993const parse = (input, options = {}) => {
15994 if (typeof input !== 'string') {
15995 throw new TypeError('Expected a string');
15996 }
15997
15998 let opts = options || {};
15999 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
16000 if (input.length > max) {
16001 throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
16002 }
16003
16004 let ast = { type: 'root', input, nodes: [] };
16005 let stack = [ast];
16006 let block = ast;
16007 let prev = ast;
16008 let brackets = 0;
16009 let length = input.length;
16010 let index = 0;
16011 let depth = 0;
16012 let value;
16013 let memo = {};
16014
16015 /**
16016 * Helpers
16017 */
16018
16019 const advance = () => input[index++];
16020 const push = node => {
16021 if (node.type === 'text' && prev.type === 'dot') {
16022 prev.type = 'text';
16023 }
16024
16025 if (prev && prev.type === 'text' && node.type === 'text') {
16026 prev.value += node.value;
16027 return;
16028 }
16029
16030 block.nodes.push(node);
16031 node.parent = block;
16032 node.prev = prev;
16033 prev = node;
16034 return node;
16035 };
16036
16037 push({ type: 'bos' });
16038
16039 while (index < length) {
16040 block = stack[stack.length - 1];
16041 value = advance();
16042
16043 /**
16044 * Invalid chars
16045 */
16046
16047 if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
16048 continue;
16049 }
16050
16051 /**
16052 * Escaped chars
16053 */
16054
16055 if (value === CHAR_BACKSLASH) {
16056 push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
16057 continue;
16058 }
16059
16060 /**
16061 * Right square bracket (literal): ']'
16062 */
16063
16064 if (value === CHAR_RIGHT_SQUARE_BRACKET) {
16065 push({ type: 'text', value: '\\' + value });
16066 continue;
16067 }
16068
16069 /**
16070 * Left square bracket: '['
16071 */
16072
16073 if (value === CHAR_LEFT_SQUARE_BRACKET) {
16074 brackets++;
16075
16076 let closed = true;
16077 let next;
16078
16079 while (index < length && (next = advance())) {
16080 value += next;
16081
16082 if (next === CHAR_LEFT_SQUARE_BRACKET) {
16083 brackets++;
16084 continue;
16085 }
16086
16087 if (next === CHAR_BACKSLASH) {
16088 value += advance();
16089 continue;
16090 }
16091
16092 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
16093 brackets--;
16094
16095 if (brackets === 0) {
16096 break;
16097 }
16098 }
16099 }
16100
16101 push({ type: 'text', value });
16102 continue;
16103 }
16104
16105 /**
16106 * Parentheses
16107 */
16108
16109 if (value === CHAR_LEFT_PARENTHESES) {
16110 block = push({ type: 'paren', nodes: [] });
16111 stack.push(block);
16112 push({ type: 'text', value });
16113 continue;
16114 }
16115
16116 if (value === CHAR_RIGHT_PARENTHESES) {
16117 if (block.type !== 'paren') {
16118 push({ type: 'text', value });
16119 continue;
16120 }
16121 block = stack.pop();
16122 push({ type: 'text', value });
16123 block = stack[stack.length - 1];
16124 continue;
16125 }
16126
16127 /**
16128 * Quotes: '|"|`
16129 */
16130
16131 if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
16132 let open = value;
16133 let next;
16134
16135 if (options.keepQuotes !== true) {
16136 value = '';
16137 }
16138
16139 while (index < length && (next = advance())) {
16140 if (next === CHAR_BACKSLASH) {
16141 value += next + advance();
16142 continue;
16143 }
16144
16145 if (next === open) {
16146 if (options.keepQuotes === true) value += next;
16147 break;
16148 }
16149
16150 value += next;
16151 }
16152
16153 push({ type: 'text', value });
16154 continue;
16155 }
16156
16157 /**
16158 * Left curly brace: '{'
16159 */
16160
16161 if (value === CHAR_LEFT_CURLY_BRACE) {
16162 depth++;
16163
16164 let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
16165 let brace = {
16166 type: 'brace',
16167 open: true,
16168 close: false,
16169 dollar,
16170 depth,
16171 commas: 0,
16172 ranges: 0,
16173 nodes: []
16174 };
16175
16176 block = push(brace);
16177 stack.push(block);
16178 push({ type: 'open', value });
16179 continue;
16180 }
16181
16182 /**
16183 * Right curly brace: '}'
16184 */
16185
16186 if (value === CHAR_RIGHT_CURLY_BRACE) {
16187 if (block.type !== 'brace') {
16188 push({ type: 'text', value });
16189 continue;
16190 }
16191
16192 let type = 'close';
16193 block = stack.pop();
16194 block.close = true;
16195
16196 push({ type, value });
16197 depth--;
16198
16199 block = stack[stack.length - 1];
16200 continue;
16201 }
16202
16203 /**
16204 * Comma: ','
16205 */
16206
16207 if (value === CHAR_COMMA && depth > 0) {
16208 if (block.ranges > 0) {
16209 block.ranges = 0;
16210 let open = block.nodes.shift();
16211 block.nodes = [open, { type: 'text', value: stringify(block) }];
16212 }
16213
16214 push({ type: 'comma', value });
16215 block.commas++;
16216 continue;
16217 }
16218
16219 /**
16220 * Dot: '.'
16221 */
16222
16223 if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
16224 let siblings = block.nodes;
16225
16226 if (depth === 0 || siblings.length === 0) {
16227 push({ type: 'text', value });
16228 continue;
16229 }
16230
16231 if (prev.type === 'dot') {
16232 block.range = [];
16233 prev.value += value;
16234 prev.type = 'range';
16235
16236 if (block.nodes.length !== 3 && block.nodes.length !== 5) {
16237 block.invalid = true;
16238 block.ranges = 0;
16239 prev.type = 'text';
16240 continue;
16241 }
16242
16243 block.ranges++;
16244 block.args = [];
16245 continue;
16246 }
16247
16248 if (prev.type === 'range') {
16249 siblings.pop();
16250
16251 let before = siblings[siblings.length - 1];
16252 before.value += prev.value + value;
16253 prev = before;
16254 block.ranges--;
16255 continue;
16256 }
16257
16258 push({ type: 'dot', value });
16259 continue;
16260 }
16261
16262 /**
16263 * Text
16264 */
16265
16266 push({ type: 'text', value });
16267 }
16268
16269 // Mark imbalanced braces and brackets as invalid
16270 do {
16271 block = stack.pop();
16272
16273 if (block.type !== 'root') {
16274 block.nodes.forEach(node => {
16275 if (!node.nodes) {
16276 if (node.type === 'open') node.isOpen = true;
16277 if (node.type === 'close') node.isClose = true;
16278 if (!node.nodes) node.type = 'text';
16279 node.invalid = true;
16280 }
16281 });
16282
16283 // get the location of the block on parent.nodes (block's siblings)
16284 let parent = stack[stack.length - 1];
16285 let index = parent.nodes.indexOf(block);
16286 // replace the (invalid) block with it's nodes
16287 parent.nodes.splice(index, 1, ...block.nodes);
16288 }
16289 } while (stack.length > 0);
16290
16291 push({ type: 'eos' });
16292 return ast;
16293};
16294
16295module.exports = parse;
16296
16297
16298/***/ }),
16299/* 80 */
16300/***/ ((module) => {
16301
16302"use strict";
16303
16304
16305module.exports = {
16306 MAX_LENGTH: 1024 * 64,
16307
16308 // Digits
16309 CHAR_0: '0', /* 0 */
16310 CHAR_9: '9', /* 9 */
16311
16312 // Alphabet chars.
16313 CHAR_UPPERCASE_A: 'A', /* A */
16314 CHAR_LOWERCASE_A: 'a', /* a */
16315 CHAR_UPPERCASE_Z: 'Z', /* Z */
16316 CHAR_LOWERCASE_Z: 'z', /* z */
16317
16318 CHAR_LEFT_PARENTHESES: '(', /* ( */
16319 CHAR_RIGHT_PARENTHESES: ')', /* ) */
16320
16321 CHAR_ASTERISK: '*', /* * */
16322
16323 // Non-alphabetic chars.
16324 CHAR_AMPERSAND: '&', /* & */
16325 CHAR_AT: '@', /* @ */
16326 CHAR_BACKSLASH: '\\', /* \ */
16327 CHAR_BACKTICK: '`', /* ` */
16328 CHAR_CARRIAGE_RETURN: '\r', /* \r */
16329 CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
16330 CHAR_COLON: ':', /* : */
16331 CHAR_COMMA: ',', /* , */
16332 CHAR_DOLLAR: '$', /* . */
16333 CHAR_DOT: '.', /* . */
16334 CHAR_DOUBLE_QUOTE: '"', /* " */
16335 CHAR_EQUAL: '=', /* = */
16336 CHAR_EXCLAMATION_MARK: '!', /* ! */
16337 CHAR_FORM_FEED: '\f', /* \f */
16338 CHAR_FORWARD_SLASH: '/', /* / */
16339 CHAR_HASH: '#', /* # */
16340 CHAR_HYPHEN_MINUS: '-', /* - */
16341 CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
16342 CHAR_LEFT_CURLY_BRACE: '{', /* { */
16343 CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
16344 CHAR_LINE_FEED: '\n', /* \n */
16345 CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
16346 CHAR_PERCENT: '%', /* % */
16347 CHAR_PLUS: '+', /* + */
16348 CHAR_QUESTION_MARK: '?', /* ? */
16349 CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
16350 CHAR_RIGHT_CURLY_BRACE: '}', /* } */
16351 CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
16352 CHAR_SEMICOLON: ';', /* ; */
16353 CHAR_SINGLE_QUOTE: '\'', /* ' */
16354 CHAR_SPACE: ' ', /* */
16355 CHAR_TAB: '\t', /* \t */
16356 CHAR_UNDERSCORE: '_', /* _ */
16357 CHAR_VERTICAL_LINE: '|', /* | */
16358 CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
16359};
16360
16361
16362/***/ }),
16363/* 81 */
16364/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16365
16366"use strict";
16367
16368
16369module.exports = __webpack_require__(82);
16370
16371
16372/***/ }),
16373/* 82 */
16374/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16375
16376"use strict";
16377
16378
16379const path = __webpack_require__(13);
16380const scan = __webpack_require__(83);
16381const parse = __webpack_require__(86);
16382const utils = __webpack_require__(84);
16383
16384/**
16385 * Creates a matcher function from one or more glob patterns. The
16386 * returned function takes a string to match as its first argument,
16387 * and returns true if the string is a match. The returned matcher
16388 * function also takes a boolean as the second argument that, when true,
16389 * returns an object with additional information.
16390 *
16391 * ```js
16392 * const picomatch = require('picomatch');
16393 * // picomatch(glob[, options]);
16394 *
16395 * const isMatch = picomatch('*.!(*a)');
16396 * console.log(isMatch('a.a')); //=> false
16397 * console.log(isMatch('a.b')); //=> true
16398 * ```
16399 * @name picomatch
16400 * @param {String|Array} `globs` One or more glob patterns.
16401 * @param {Object=} `options`
16402 * @return {Function=} Returns a matcher function.
16403 * @api public
16404 */
16405
16406const picomatch = (glob, options, returnState = false) => {
16407 if (Array.isArray(glob)) {
16408 let fns = glob.map(input => picomatch(input, options, returnState));
16409 return str => {
16410 for (let isMatch of fns) {
16411 let state = isMatch(str);
16412 if (state) return state;
16413 }
16414 return false;
16415 };
16416 }
16417
16418 if (typeof glob !== 'string' || glob === '') {
16419 throw new TypeError('Expected pattern to be a non-empty string');
16420 }
16421
16422 let opts = options || {};
16423 let posix = utils.isWindows(options);
16424 let regex = picomatch.makeRe(glob, options, false, true);
16425 let state = regex.state;
16426 delete regex.state;
16427
16428 let isIgnored = () => false;
16429 if (opts.ignore) {
16430 let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
16431 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
16432 }
16433
16434 const matcher = (input, returnObject = false) => {
16435 let { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
16436 let result = { glob, state, regex, posix, input, output, match, isMatch };
16437
16438 if (typeof opts.onResult === 'function') {
16439 opts.onResult(result);
16440 }
16441
16442 if (isMatch === false) {
16443 result.isMatch = false;
16444 return returnObject ? result : false;
16445 }
16446
16447 if (isIgnored(input)) {
16448 if (typeof opts.onIgnore === 'function') {
16449 opts.onIgnore(result);
16450 }
16451 result.isMatch = false;
16452 return returnObject ? result : false;
16453 }
16454
16455 if (typeof opts.onMatch === 'function') {
16456 opts.onMatch(result);
16457 }
16458 return returnObject ? result : true;
16459 };
16460
16461 if (returnState) {
16462 matcher.state = state;
16463 }
16464
16465 return matcher;
16466};
16467
16468/**
16469 * Test `input` with the given `regex`. This is used by the main
16470 * `picomatch()` function to test the input string.
16471 *
16472 * ```js
16473 * const picomatch = require('picomatch');
16474 * // picomatch.test(input, regex[, options]);
16475 *
16476 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
16477 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
16478 * ```
16479 * @param {String} `input` String to test.
16480 * @param {RegExp} `regex`
16481 * @return {Object} Returns an object with matching info.
16482 * @api public
16483 */
16484
16485picomatch.test = (input, regex, options, { glob, posix } = {}) => {
16486 if (typeof input !== 'string') {
16487 throw new TypeError('Expected input to be a string');
16488 }
16489
16490 if (input === '') {
16491 return { isMatch: false, output: '' };
16492 }
16493
16494 let opts = options || {};
16495 let format = opts.format || (posix ? utils.toPosixSlashes : null);
16496 let match = input === glob;
16497 let output = (match && format) ? format(input) : input;
16498
16499 if (match === false) {
16500 output = format ? format(input) : input;
16501 match = output === glob;
16502 }
16503
16504 if (match === false || opts.capture === true) {
16505 if (opts.matchBase === true || opts.basename === true) {
16506 match = picomatch.matchBase(input, regex, options, posix);
16507 } else {
16508 match = regex.exec(output);
16509 }
16510 }
16511
16512 return { isMatch: !!match, match, output };
16513};
16514
16515/**
16516 * Match the basename of a filepath.
16517 *
16518 * ```js
16519 * const picomatch = require('picomatch');
16520 * // picomatch.matchBase(input, glob[, options]);
16521 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
16522 * ```
16523 * @param {String} `input` String to test.
16524 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
16525 * @return {Boolean}
16526 * @api public
16527 */
16528
16529picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
16530 let regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
16531 return regex.test(path.basename(input));
16532};
16533
16534/**
16535 * Returns true if **any** of the given glob `patterns` match the specified `string`.
16536 *
16537 * ```js
16538 * const picomatch = require('picomatch');
16539 * // picomatch.isMatch(string, patterns[, options]);
16540 *
16541 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
16542 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
16543 * ```
16544 * @param {String|Array} str The string to test.
16545 * @param {String|Array} patterns One or more glob patterns to use for matching.
16546 * @param {Object} [options] See available [options](#options).
16547 * @return {Boolean} Returns true if any patterns match `str`
16548 * @api public
16549 */
16550
16551picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
16552
16553/**
16554 * Parse a glob pattern to create the source string for a regular
16555 * expression.
16556 *
16557 * ```js
16558 * const picomatch = require('picomatch');
16559 * const result = picomatch.parse(glob[, options]);
16560 * ```
16561 * @param {String} `glob`
16562 * @param {Object} `options`
16563 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
16564 * @api public
16565 */
16566
16567picomatch.parse = (glob, options) => parse(glob, options);
16568
16569/**
16570 * Scan a glob pattern to separate the pattern into segments.
16571 *
16572 * ```js
16573 * const picomatch = require('picomatch');
16574 * // picomatch.scan(input[, options]);
16575 *
16576 * const result = picomatch.scan('!./foo/*.js');
16577 * console.log(result);
16578 * // { prefix: '!./',
16579 * // input: '!./foo/*.js',
16580 * // base: 'foo',
16581 * // glob: '*.js',
16582 * // negated: true,
16583 * // isGlob: true }
16584 * ```
16585 * @param {String} `input` Glob pattern to scan.
16586 * @param {Object} `options`
16587 * @return {Object} Returns an object with
16588 * @api public
16589 */
16590
16591picomatch.scan = (input, options) => scan(input, options);
16592
16593/**
16594 * Create a regular expression from a glob pattern.
16595 *
16596 * ```js
16597 * const picomatch = require('picomatch');
16598 * // picomatch.makeRe(input[, options]);
16599 *
16600 * console.log(picomatch.makeRe('*.js'));
16601 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
16602 * ```
16603 * @param {String} `input` A glob pattern to convert to regex.
16604 * @param {Object} `options`
16605 * @return {RegExp} Returns a regex created from the given pattern.
16606 * @api public
16607 */
16608
16609picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
16610 if (!input || typeof input !== 'string') {
16611 throw new TypeError('Expected a non-empty string');
16612 }
16613
16614 let opts = options || {};
16615 let prepend = opts.contains ? '' : '^';
16616 let append = opts.contains ? '' : '$';
16617 let state = { negated: false, fastpaths: true };
16618 let prefix = '';
16619 let output;
16620
16621 if (input.startsWith('./')) {
16622 input = input.slice(2);
16623 prefix = state.prefix = './';
16624 }
16625
16626 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
16627 output = parse.fastpaths(input, options);
16628 }
16629
16630 if (output === void 0) {
16631 state = picomatch.parse(input, options);
16632 state.prefix = prefix + (state.prefix || '');
16633 output = state.output;
16634 }
16635
16636 if (returnOutput === true) {
16637 return output;
16638 }
16639
16640 let source = `${prepend}(?:${output})${append}`;
16641 if (state && state.negated === true) {
16642 source = `^(?!${source}).*$`;
16643 }
16644
16645 let regex = picomatch.toRegex(source, options);
16646 if (returnState === true) {
16647 regex.state = state;
16648 }
16649
16650 return regex;
16651};
16652
16653/**
16654 * Create a regular expression from the given regex source string.
16655 *
16656 * ```js
16657 * const picomatch = require('picomatch');
16658 * // picomatch.toRegex(source[, options]);
16659 *
16660 * const { output } = picomatch.parse('*.js');
16661 * console.log(picomatch.toRegex(output));
16662 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
16663 * ```
16664 * @param {String} `source` Regular expression source string.
16665 * @param {Object} `options`
16666 * @return {RegExp}
16667 * @api public
16668 */
16669
16670picomatch.toRegex = (source, options) => {
16671 try {
16672 let opts = options || {};
16673 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
16674 } catch (err) {
16675 if (options && options.debug === true) throw err;
16676 return /$^/;
16677 }
16678};
16679
16680/**
16681 * Picomatch constants.
16682 * @return {Object}
16683 */
16684
16685picomatch.constants = __webpack_require__(85);
16686
16687/**
16688 * Expose "picomatch"
16689 */
16690
16691module.exports = picomatch;
16692
16693
16694/***/ }),
16695/* 83 */
16696/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16697
16698"use strict";
16699
16700
16701const utils = __webpack_require__(84);
16702
16703const {
16704 CHAR_ASTERISK, /* * */
16705 CHAR_AT, /* @ */
16706 CHAR_BACKWARD_SLASH, /* \ */
16707 CHAR_COMMA, /* , */
16708 CHAR_DOT, /* . */
16709 CHAR_EXCLAMATION_MARK, /* ! */
16710 CHAR_FORWARD_SLASH, /* / */
16711 CHAR_LEFT_CURLY_BRACE, /* { */
16712 CHAR_LEFT_PARENTHESES, /* ( */
16713 CHAR_LEFT_SQUARE_BRACKET, /* [ */
16714 CHAR_PLUS, /* + */
16715 CHAR_QUESTION_MARK, /* ? */
16716 CHAR_RIGHT_CURLY_BRACE, /* } */
16717 CHAR_RIGHT_PARENTHESES, /* ) */
16718 CHAR_RIGHT_SQUARE_BRACKET /* ] */
16719} = __webpack_require__(85);
16720
16721const isPathSeparator = code => {
16722 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
16723};
16724
16725/**
16726 * Quickly scans a glob pattern and returns an object with a handful of
16727 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
16728 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
16729 *
16730 * ```js
16731 * const pm = require('picomatch');
16732 * console.log(pm.scan('foo/bar/*.js'));
16733 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
16734 * ```
16735 * @param {String} `str`
16736 * @param {Object} `options`
16737 * @return {Object} Returns an object with tokens and regex source string.
16738 * @api public
16739 */
16740
16741module.exports = (input, options) => {
16742 let opts = options || {};
16743 let length = input.length - 1;
16744 let index = -1;
16745 let start = 0;
16746 let lastIndex = 0;
16747 let isGlob = false;
16748 let backslashes = false;
16749 let negated = false;
16750 let braces = 0;
16751 let prev;
16752 let code;
16753
16754 let braceEscaped = false;
16755
16756 let eos = () => index >= length;
16757 let advance = () => {
16758 prev = code;
16759 return input.charCodeAt(++index);
16760 };
16761
16762 while (index < length) {
16763 code = advance();
16764 let next;
16765
16766 if (code === CHAR_BACKWARD_SLASH) {
16767 backslashes = true;
16768 next = advance();
16769
16770 if (next === CHAR_LEFT_CURLY_BRACE) {
16771 braceEscaped = true;
16772 }
16773 continue;
16774 }
16775
16776 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
16777 braces++;
16778
16779 while (!eos() && (next = advance())) {
16780 if (next === CHAR_BACKWARD_SLASH) {
16781 backslashes = true;
16782 next = advance();
16783 continue;
16784 }
16785
16786 if (next === CHAR_LEFT_CURLY_BRACE) {
16787 braces++;
16788 continue;
16789 }
16790
16791 if (!braceEscaped && next === CHAR_DOT && (next = advance()) === CHAR_DOT) {
16792 isGlob = true;
16793 break;
16794 }
16795
16796 if (!braceEscaped && next === CHAR_COMMA) {
16797 isGlob = true;
16798 break;
16799 }
16800
16801 if (next === CHAR_RIGHT_CURLY_BRACE) {
16802 braces--;
16803 if (braces === 0) {
16804 braceEscaped = false;
16805 break;
16806 }
16807 }
16808 }
16809 }
16810
16811 if (code === CHAR_FORWARD_SLASH) {
16812 if (prev === CHAR_DOT && index === (start + 1)) {
16813 start += 2;
16814 continue;
16815 }
16816
16817 lastIndex = index + 1;
16818 continue;
16819 }
16820
16821 if (code === CHAR_ASTERISK) {
16822 isGlob = true;
16823 break;
16824 }
16825
16826 if (code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK) {
16827 isGlob = true;
16828 break;
16829 }
16830
16831 if (code === CHAR_LEFT_SQUARE_BRACKET) {
16832 while (!eos() && (next = advance())) {
16833 if (next === CHAR_BACKWARD_SLASH) {
16834 backslashes = true;
16835 next = advance();
16836 continue;
16837 }
16838
16839 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
16840 isGlob = true;
16841 break;
16842 }
16843 }
16844 }
16845
16846 let isExtglobChar = code === CHAR_PLUS
16847 || code === CHAR_AT
16848 || code === CHAR_EXCLAMATION_MARK;
16849
16850 if (isExtglobChar && input.charCodeAt(index + 1) === CHAR_LEFT_PARENTHESES) {
16851 isGlob = true;
16852 break;
16853 }
16854
16855 if (code === CHAR_EXCLAMATION_MARK && index === start) {
16856 negated = true;
16857 start++;
16858 continue;
16859 }
16860
16861 if (code === CHAR_LEFT_PARENTHESES) {
16862 while (!eos() && (next = advance())) {
16863 if (next === CHAR_BACKWARD_SLASH) {
16864 backslashes = true;
16865 next = advance();
16866 continue;
16867 }
16868
16869 if (next === CHAR_RIGHT_PARENTHESES) {
16870 isGlob = true;
16871 break;
16872 }
16873 }
16874 }
16875
16876 if (isGlob) {
16877 break;
16878 }
16879 }
16880
16881 let prefix = '';
16882 let orig = input;
16883 let base = input;
16884 let glob = '';
16885
16886 if (start > 0) {
16887 prefix = input.slice(0, start);
16888 input = input.slice(start);
16889 lastIndex -= start;
16890 }
16891
16892 if (base && isGlob === true && lastIndex > 0) {
16893 base = input.slice(0, lastIndex);
16894 glob = input.slice(lastIndex);
16895 } else if (isGlob === true) {
16896 base = '';
16897 glob = input;
16898 } else {
16899 base = input;
16900 }
16901
16902 if (base && base !== '' && base !== '/' && base !== input) {
16903 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
16904 base = base.slice(0, -1);
16905 }
16906 }
16907
16908 if (opts.unescape === true) {
16909 if (glob) glob = utils.removeBackslashes(glob);
16910
16911 if (base && backslashes === true) {
16912 base = utils.removeBackslashes(base);
16913 }
16914 }
16915
16916 return { prefix, input: orig, base, glob, negated, isGlob };
16917};
16918
16919
16920/***/ }),
16921/* 84 */
16922/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
16923
16924"use strict";
16925
16926
16927const path = __webpack_require__(13);
16928const win32 = process.platform === 'win32';
16929const {
16930 REGEX_SPECIAL_CHARS,
16931 REGEX_SPECIAL_CHARS_GLOBAL,
16932 REGEX_REMOVE_BACKSLASH
16933} = __webpack_require__(85);
16934
16935exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
16936exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
16937exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
16938exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
16939exports.toPosixSlashes = str => str.replace(/\\/g, '/');
16940
16941exports.removeBackslashes = str => {
16942 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
16943 return match === '\\' ? '' : match;
16944 });
16945}
16946
16947exports.supportsLookbehinds = () => {
16948 let segs = process.version.slice(1).split('.');
16949 if (segs.length === 3 && +segs[0] >= 9 || (+segs[0] === 8 && +segs[1] >= 10)) {
16950 return true;
16951 }
16952 return false;
16953};
16954
16955exports.isWindows = options => {
16956 if (options && typeof options.windows === 'boolean') {
16957 return options.windows;
16958 }
16959 return win32 === true || path.sep === '\\';
16960};
16961
16962exports.escapeLast = (input, char, lastIdx) => {
16963 let idx = input.lastIndexOf(char, lastIdx);
16964 if (idx === -1) return input;
16965 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
16966 return input.slice(0, idx) + '\\' + input.slice(idx);
16967};
16968
16969
16970/***/ }),
16971/* 85 */
16972/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16973
16974"use strict";
16975
16976
16977const path = __webpack_require__(13);
16978const WIN_SLASH = '\\\\/';
16979const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
16980
16981/**
16982 * Posix glob regex
16983 */
16984
16985const DOT_LITERAL = '\\.';
16986const PLUS_LITERAL = '\\+';
16987const QMARK_LITERAL = '\\?';
16988const SLASH_LITERAL = '\\/';
16989const ONE_CHAR = '(?=.)';
16990const QMARK = '[^/]';
16991const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
16992const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
16993const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
16994const NO_DOT = `(?!${DOT_LITERAL})`;
16995const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
16996const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
16997const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
16998const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
16999const STAR = `${QMARK}*?`;
17000
17001const POSIX_CHARS = {
17002 DOT_LITERAL,
17003 PLUS_LITERAL,
17004 QMARK_LITERAL,
17005 SLASH_LITERAL,
17006 ONE_CHAR,
17007 QMARK,
17008 END_ANCHOR,
17009 DOTS_SLASH,
17010 NO_DOT,
17011 NO_DOTS,
17012 NO_DOT_SLASH,
17013 NO_DOTS_SLASH,
17014 QMARK_NO_DOT,
17015 STAR,
17016 START_ANCHOR
17017};
17018
17019/**
17020 * Windows glob regex
17021 */
17022
17023const WINDOWS_CHARS = {
17024 ...POSIX_CHARS,
17025
17026 SLASH_LITERAL: `[${WIN_SLASH}]`,
17027 QMARK: WIN_NO_SLASH,
17028 STAR: `${WIN_NO_SLASH}*?`,
17029 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
17030 NO_DOT: `(?!${DOT_LITERAL})`,
17031 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
17032 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
17033 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
17034 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
17035 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
17036 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
17037};
17038
17039/**
17040 * POSIX Bracket Regex
17041 */
17042
17043const POSIX_REGEX_SOURCE = {
17044 alnum: 'a-zA-Z0-9',
17045 alpha: 'a-zA-Z',
17046 ascii: '\\x00-\\x7F',
17047 blank: ' \\t',
17048 cntrl: '\\x00-\\x1F\\x7F',
17049 digit: '0-9',
17050 graph: '\\x21-\\x7E',
17051 lower: 'a-z',
17052 print: '\\x20-\\x7E ',
17053 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
17054 space: ' \\t\\r\\n\\v\\f',
17055 upper: 'A-Z',
17056 word: 'A-Za-z0-9_',
17057 xdigit: 'A-Fa-f0-9'
17058};
17059
17060module.exports = {
17061 MAX_LENGTH: 1024 * 64,
17062 POSIX_REGEX_SOURCE,
17063
17064 // regular expressions
17065 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
17066 REGEX_NON_SPECIAL_CHAR: /^[^@![\].,$*+?^{}()|\\/]+/,
17067 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
17068 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
17069 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
17070 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
17071
17072 // Replace globs with equivalent patterns to reduce parsing time.
17073 REPLACEMENTS: {
17074 '***': '*',
17075 '**/**': '**',
17076 '**/**/**': '**'
17077 },
17078
17079 // Digits
17080 CHAR_0: 48, /* 0 */
17081 CHAR_9: 57, /* 9 */
17082
17083 // Alphabet chars.
17084 CHAR_UPPERCASE_A: 65, /* A */
17085 CHAR_LOWERCASE_A: 97, /* a */
17086 CHAR_UPPERCASE_Z: 90, /* Z */
17087 CHAR_LOWERCASE_Z: 122, /* z */
17088
17089 CHAR_LEFT_PARENTHESES: 40, /* ( */
17090 CHAR_RIGHT_PARENTHESES: 41, /* ) */
17091
17092 CHAR_ASTERISK: 42, /* * */
17093
17094 // Non-alphabetic chars.
17095 CHAR_AMPERSAND: 38, /* & */
17096 CHAR_AT: 64, /* @ */
17097 CHAR_BACKWARD_SLASH: 92, /* \ */
17098 CHAR_CARRIAGE_RETURN: 13, /* \r */
17099 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
17100 CHAR_COLON: 58, /* : */
17101 CHAR_COMMA: 44, /* , */
17102 CHAR_DOT: 46, /* . */
17103 CHAR_DOUBLE_QUOTE: 34, /* " */
17104 CHAR_EQUAL: 61, /* = */
17105 CHAR_EXCLAMATION_MARK: 33, /* ! */
17106 CHAR_FORM_FEED: 12, /* \f */
17107 CHAR_FORWARD_SLASH: 47, /* / */
17108 CHAR_GRAVE_ACCENT: 96, /* ` */
17109 CHAR_HASH: 35, /* # */
17110 CHAR_HYPHEN_MINUS: 45, /* - */
17111 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
17112 CHAR_LEFT_CURLY_BRACE: 123, /* { */
17113 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
17114 CHAR_LINE_FEED: 10, /* \n */
17115 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
17116 CHAR_PERCENT: 37, /* % */
17117 CHAR_PLUS: 43, /* + */
17118 CHAR_QUESTION_MARK: 63, /* ? */
17119 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
17120 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
17121 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
17122 CHAR_SEMICOLON: 59, /* ; */
17123 CHAR_SINGLE_QUOTE: 39, /* ' */
17124 CHAR_SPACE: 32, /* */
17125 CHAR_TAB: 9, /* \t */
17126 CHAR_UNDERSCORE: 95, /* _ */
17127 CHAR_VERTICAL_LINE: 124, /* | */
17128 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
17129
17130 SEP: path.sep,
17131
17132 /**
17133 * Create EXTGLOB_CHARS
17134 */
17135
17136 extglobChars(chars) {
17137 return {
17138 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
17139 '?': { type: 'qmark', open: '(?:', close: ')?' },
17140 '+': { type: 'plus', open: '(?:', close: ')+' },
17141 '*': { type: 'star', open: '(?:', close: ')*' },
17142 '@': { type: 'at', open: '(?:', close: ')' }
17143 };
17144 },
17145
17146 /**
17147 * Create GLOB_CHARS
17148 */
17149
17150 globChars(win32) {
17151 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
17152 }
17153};
17154
17155
17156/***/ }),
17157/* 86 */
17158/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
17159
17160"use strict";
17161
17162
17163const utils = __webpack_require__(84);
17164const constants = __webpack_require__(85);
17165
17166/**
17167 * Constants
17168 */
17169
17170const {
17171 MAX_LENGTH,
17172 POSIX_REGEX_SOURCE,
17173 REGEX_NON_SPECIAL_CHAR,
17174 REGEX_SPECIAL_CHARS_BACKREF,
17175 REPLACEMENTS
17176} = constants;
17177
17178/**
17179 * Helpers
17180 */
17181
17182const expandRange = (args, options) => {
17183 if (typeof options.expandRange === 'function') {
17184 return options.expandRange(...args, options);
17185 }
17186
17187 args.sort();
17188 let value = `[${args.join('-')}]`;
17189
17190 try {
17191 /* eslint-disable no-new */
17192 new RegExp(value);
17193 } catch (ex) {
17194 return args.map(v => utils.escapeRegex(v)).join('..');
17195 }
17196
17197 return value;
17198};
17199
17200const negate = state => {
17201 let count = 1;
17202
17203 while (state.peek() === '!' && (state.peek(2) !== '(' || state.peek(3) === '?')) {
17204 state.advance();
17205 state.start++;
17206 count++;
17207 }
17208
17209 if (count % 2 === 0) {
17210 return false;
17211 }
17212
17213 state.negated = true;
17214 state.start++;
17215 return true;
17216};
17217
17218/**
17219 * Create the message for a syntax error
17220 */
17221
17222const syntaxError = (type, char) => {
17223 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
17224};
17225
17226/**
17227 * Parse the given input string.
17228 * @param {String} input
17229 * @param {Object} options
17230 * @return {Object}
17231 */
17232
17233const parse = (input, options) => {
17234 if (typeof input !== 'string') {
17235 throw new TypeError('Expected a string');
17236 }
17237
17238 input = REPLACEMENTS[input] || input;
17239
17240 let opts = { ...options };
17241 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
17242 let len = input.length;
17243 if (len > max) {
17244 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
17245 }
17246
17247 let bos = { type: 'bos', value: '', output: opts.prepend || '' };
17248 let tokens = [bos];
17249
17250 let capture = opts.capture ? '' : '?:';
17251 let win32 = utils.isWindows(options);
17252
17253 // create constants based on platform, for windows or posix
17254 const PLATFORM_CHARS = constants.globChars(win32);
17255 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
17256
17257 const {
17258 DOT_LITERAL,
17259 PLUS_LITERAL,
17260 SLASH_LITERAL,
17261 ONE_CHAR,
17262 DOTS_SLASH,
17263 NO_DOT,
17264 NO_DOT_SLASH,
17265 NO_DOTS_SLASH,
17266 QMARK,
17267 QMARK_NO_DOT,
17268 STAR,
17269 START_ANCHOR
17270 } = PLATFORM_CHARS;
17271
17272 const globstar = (opts) => {
17273 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
17274 };
17275
17276 let nodot = opts.dot ? '' : NO_DOT;
17277 let star = opts.bash === true ? globstar(opts) : STAR;
17278 let qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
17279
17280 if (opts.capture) {
17281 star = `(${star})`;
17282 }
17283
17284 // minimatch options support
17285 if (typeof opts.noext === 'boolean') {
17286 opts.noextglob = opts.noext;
17287 }
17288
17289 let state = {
17290 index: -1,
17291 start: 0,
17292 consumed: '',
17293 output: '',
17294 backtrack: false,
17295 brackets: 0,
17296 braces: 0,
17297 parens: 0,
17298 quotes: 0,
17299 tokens
17300 };
17301
17302 let extglobs = [];
17303 let stack = [];
17304 let prev = bos;
17305 let value;
17306
17307 /**
17308 * Tokenizing helpers
17309 */
17310
17311 const eos = () => state.index === len - 1;
17312 const peek = state.peek = (n = 1) => input[state.index + n];
17313 const advance = state.advance = () => input[++state.index];
17314 const append = token => {
17315 state.output += token.output != null ? token.output : token.value;
17316 state.consumed += token.value || '';
17317 };
17318
17319 const increment = type => {
17320 state[type]++;
17321 stack.push(type);
17322 };
17323
17324 const decrement = type => {
17325 state[type]--;
17326 stack.pop();
17327 };
17328
17329 /**
17330 * Push tokens onto the tokens array. This helper speeds up
17331 * tokenizing by 1) helping us avoid backtracking as much as possible,
17332 * and 2) helping us avoid creating extra tokens when consecutive
17333 * characters are plain text. This improves performance and simplifies
17334 * lookbehinds.
17335 */
17336
17337 const push = tok => {
17338 if (prev.type === 'globstar') {
17339 let isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
17340 let isExtglob = extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
17341 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
17342 state.output = state.output.slice(0, -prev.output.length);
17343 prev.type = 'star';
17344 prev.value = '*';
17345 prev.output = star;
17346 state.output += prev.output;
17347 }
17348 }
17349
17350 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
17351 extglobs[extglobs.length - 1].inner += tok.value;
17352 }
17353
17354 if (tok.value || tok.output) append(tok);
17355 if (prev && prev.type === 'text' && tok.type === 'text') {
17356 prev.value += tok.value;
17357 return;
17358 }
17359
17360 tok.prev = prev;
17361 tokens.push(tok);
17362 prev = tok;
17363 };
17364
17365 const extglobOpen = (type, value) => {
17366 let token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
17367
17368 token.prev = prev;
17369 token.parens = state.parens;
17370 token.output = state.output;
17371 let output = (opts.capture ? '(' : '') + token.open;
17372
17373 push({ type, value, output: state.output ? '' : ONE_CHAR });
17374 push({ type: 'paren', extglob: true, value: advance(), output });
17375 increment('parens');
17376 extglobs.push(token);
17377 };
17378
17379 const extglobClose = token => {
17380 let output = token.close + (opts.capture ? ')' : '');
17381
17382 if (token.type === 'negate') {
17383 let extglobStar = star;
17384
17385 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
17386 extglobStar = globstar(opts);
17387 }
17388
17389 if (extglobStar !== star || eos() || /^\)+$/.test(input.slice(state.index + 1))) {
17390 output = token.close = ')$))' + extglobStar;
17391 }
17392
17393 if (token.prev.type === 'bos' && eos()) {
17394 state.negatedExtglob = true;
17395 }
17396 }
17397
17398 push({ type: 'paren', extglob: true, value, output });
17399 decrement('parens');
17400 };
17401
17402 if (opts.fastpaths !== false && !/(^[*!]|[/{[()\]}"])/.test(input)) {
17403 let backslashes = false;
17404
17405 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
17406 if (first === '\\') {
17407 backslashes = true;
17408 return m;
17409 }
17410
17411 if (first === '?') {
17412 if (esc) {
17413 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
17414 }
17415 if (index === 0) {
17416 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
17417 }
17418 return QMARK.repeat(chars.length);
17419 }
17420
17421 if (first === '.') {
17422 return DOT_LITERAL.repeat(chars.length);
17423 }
17424
17425 if (first === '*') {
17426 if (esc) {
17427 return esc + first + (rest ? star : '');
17428 }
17429 return star;
17430 }
17431 return esc ? m : '\\' + m;
17432 });
17433
17434 if (backslashes === true) {
17435 if (opts.unescape === true) {
17436 output = output.replace(/\\/g, '');
17437 } else {
17438 output = output.replace(/\\+/g, m => {
17439 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
17440 });
17441 }
17442 }
17443
17444 state.output = output;
17445 return state;
17446 }
17447
17448 /**
17449 * Tokenize input until we reach end-of-string
17450 */
17451
17452 while (!eos()) {
17453 value = advance();
17454
17455 if (value === '\u0000') {
17456 continue;
17457 }
17458
17459 /**
17460 * Escaped characters
17461 */
17462
17463 if (value === '\\') {
17464 let next = peek();
17465
17466 if (next === '/' && opts.bash !== true) {
17467 continue;
17468 }
17469
17470 if (next === '.' || next === ';') {
17471 continue;
17472 }
17473
17474 if (!next) {
17475 value += '\\';
17476 push({ type: 'text', value });
17477 continue;
17478 }
17479
17480 // collapse slashes to reduce potential for exploits
17481 let match = /^\\+/.exec(input.slice(state.index + 1));
17482 let slashes = 0;
17483
17484 if (match && match[0].length > 2) {
17485 slashes = match[0].length;
17486 state.index += slashes;
17487 if (slashes % 2 !== 0) {
17488 value += '\\';
17489 }
17490 }
17491
17492 if (opts.unescape === true) {
17493 value = advance() || '';
17494 } else {
17495 value += advance() || '';
17496 }
17497
17498 if (state.brackets === 0) {
17499 push({ type: 'text', value });
17500 continue;
17501 }
17502 }
17503
17504 /**
17505 * If we're inside a regex character class, continue
17506 * until we reach the closing bracket.
17507 */
17508
17509 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
17510 if (opts.posix !== false && value === ':') {
17511 let inner = prev.value.slice(1);
17512 if (inner.includes('[')) {
17513 prev.posix = true;
17514
17515 if (inner.includes(':')) {
17516 let idx = prev.value.lastIndexOf('[');
17517 let pre = prev.value.slice(0, idx);
17518 let rest = prev.value.slice(idx + 2);
17519 let posix = POSIX_REGEX_SOURCE[rest];
17520 if (posix) {
17521 prev.value = pre + posix;
17522 state.backtrack = true;
17523 advance();
17524
17525 if (!bos.output && tokens.indexOf(prev) === 1) {
17526 bos.output = ONE_CHAR;
17527 }
17528 continue;
17529 }
17530 }
17531 }
17532 }
17533
17534 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
17535 value = '\\' + value;
17536 }
17537
17538 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
17539 value = '\\' + value;
17540 }
17541
17542 if (opts.posix === true && value === '!' && prev.value === '[') {
17543 value = '^';
17544 }
17545
17546 prev.value += value;
17547 append({ value });
17548 continue;
17549 }
17550
17551 /**
17552 * If we're inside a quoted string, continue
17553 * until we reach the closing double quote.
17554 */
17555
17556 if (state.quotes === 1 && value !== '"') {
17557 value = utils.escapeRegex(value);
17558 prev.value += value;
17559 append({ value });
17560 continue;
17561 }
17562
17563 /**
17564 * Double quotes
17565 */
17566
17567 if (value === '"') {
17568 state.quotes = state.quotes === 1 ? 0 : 1;
17569 if (opts.keepQuotes === true) {
17570 push({ type: 'text', value });
17571 }
17572 continue;
17573 }
17574
17575 /**
17576 * Parentheses
17577 */
17578
17579 if (value === '(') {
17580 push({ type: 'paren', value });
17581 increment('parens');
17582 continue;
17583 }
17584
17585 if (value === ')') {
17586 if (state.parens === 0 && opts.strictBrackets === true) {
17587 throw new SyntaxError(syntaxError('opening', '('));
17588 }
17589
17590 let extglob = extglobs[extglobs.length - 1];
17591 if (extglob && state.parens === extglob.parens + 1) {
17592 extglobClose(extglobs.pop());
17593 continue;
17594 }
17595
17596 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
17597 decrement('parens');
17598 continue;
17599 }
17600
17601 /**
17602 * Brackets
17603 */
17604
17605 if (value === '[') {
17606 if (opts.nobracket === true || !input.slice(state.index + 1).includes(']')) {
17607 if (opts.nobracket !== true && opts.strictBrackets === true) {
17608 throw new SyntaxError(syntaxError('closing', ']'));
17609 }
17610
17611 value = '\\' + value;
17612 } else {
17613 increment('brackets');
17614 }
17615
17616 push({ type: 'bracket', value });
17617 continue;
17618 }
17619
17620 if (value === ']') {
17621 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
17622 push({ type: 'text', value, output: '\\' + value });
17623 continue;
17624 }
17625
17626 if (state.brackets === 0) {
17627 if (opts.strictBrackets === true) {
17628 throw new SyntaxError(syntaxError('opening', '['));
17629 }
17630
17631 push({ type: 'text', value, output: '\\' + value });
17632 continue;
17633 }
17634
17635 decrement('brackets');
17636
17637 let prevValue = prev.value.slice(1);
17638 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
17639 value = '/' + value;
17640 }
17641
17642 prev.value += value;
17643 append({ value });
17644
17645 // when literal brackets are explicitly disabled
17646 // assume we should match with a regex character class
17647 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
17648 continue;
17649 }
17650
17651 let escaped = utils.escapeRegex(prev.value);
17652 state.output = state.output.slice(0, -prev.value.length);
17653
17654 // when literal brackets are explicitly enabled
17655 // assume we should escape the brackets to match literal characters
17656 if (opts.literalBrackets === true) {
17657 state.output += escaped;
17658 prev.value = escaped;
17659 continue;
17660 }
17661
17662 // when the user specifies nothing, try to match both
17663 prev.value = `(${capture}${escaped}|${prev.value})`;
17664 state.output += prev.value;
17665 continue;
17666 }
17667
17668 /**
17669 * Braces
17670 */
17671
17672 if (value === '{' && opts.nobrace !== true) {
17673 push({ type: 'brace', value, output: '(' });
17674 increment('braces');
17675 continue;
17676 }
17677
17678 if (value === '}') {
17679 if (opts.nobrace === true || state.braces === 0) {
17680 push({ type: 'text', value, output: '\\' + value });
17681 continue;
17682 }
17683
17684 let output = ')';
17685
17686 if (state.dots === true) {
17687 let arr = tokens.slice();
17688 let range = [];
17689
17690 for (let i = arr.length - 1; i >= 0; i--) {
17691 tokens.pop();
17692 if (arr[i].type === 'brace') {
17693 break;
17694 }
17695 if (arr[i].type !== 'dots') {
17696 range.unshift(arr[i].value);
17697 }
17698 }
17699
17700 output = expandRange(range, opts);
17701 state.backtrack = true;
17702 }
17703
17704 push({ type: 'brace', value, output });
17705 decrement('braces');
17706 continue;
17707 }
17708
17709 /**
17710 * Pipes
17711 */
17712
17713 if (value === '|') {
17714 if (extglobs.length > 0) {
17715 extglobs[extglobs.length - 1].conditions++;
17716 }
17717 push({ type: 'text', value });
17718 continue;
17719 }
17720
17721 /**
17722 * Commas
17723 */
17724
17725 if (value === ',') {
17726 let output = value;
17727
17728 if (state.braces > 0 && stack[stack.length - 1] === 'braces') {
17729 output = '|';
17730 }
17731
17732 push({ type: 'comma', value, output });
17733 continue;
17734 }
17735
17736 /**
17737 * Slashes
17738 */
17739
17740 if (value === '/') {
17741 // if the beginning of the glob is "./", advance the start
17742 // to the current index, and don't add the "./" characters
17743 // to the state. This greatly simplifies lookbehinds when
17744 // checking for BOS characters like "!" and "." (not "./")
17745 if (prev.type === 'dot' && state.index === 1) {
17746 state.start = state.index + 1;
17747 state.consumed = '';
17748 state.output = '';
17749 tokens.pop();
17750 prev = bos; // reset "prev" to the first token
17751 continue;
17752 }
17753
17754 push({ type: 'slash', value, output: SLASH_LITERAL });
17755 continue;
17756 }
17757
17758 /**
17759 * Dots
17760 */
17761
17762 if (value === '.') {
17763 if (state.braces > 0 && prev.type === 'dot') {
17764 if (prev.value === '.') prev.output = DOT_LITERAL;
17765 prev.type = 'dots';
17766 prev.output += value;
17767 prev.value += value;
17768 state.dots = true;
17769 continue;
17770 }
17771
17772 push({ type: 'dot', value, output: DOT_LITERAL });
17773 continue;
17774 }
17775
17776 /**
17777 * Question marks
17778 */
17779
17780 if (value === '?') {
17781 if (prev && prev.type === 'paren') {
17782 let next = peek();
17783 let output = value;
17784
17785 if (next === '<' && !utils.supportsLookbehinds()) {
17786 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
17787 }
17788
17789 if (prev.value === '(' && !/[!=<:]/.test(next) || (next === '<' && !/[!=]/.test(peek(2)))) {
17790 output = '\\' + value;
17791 }
17792
17793 push({ type: 'text', value, output });
17794 continue;
17795 }
17796
17797 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17798 extglobOpen('qmark', value);
17799 continue;
17800 }
17801
17802 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
17803 push({ type: 'qmark', value, output: QMARK_NO_DOT });
17804 continue;
17805 }
17806
17807 push({ type: 'qmark', value, output: QMARK });
17808 continue;
17809 }
17810
17811 /**
17812 * Exclamation
17813 */
17814
17815 if (value === '!') {
17816 if (opts.noextglob !== true && peek() === '(') {
17817 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
17818 extglobOpen('negate', value);
17819 continue;
17820 }
17821 }
17822
17823 if (opts.nonegate !== true && state.index === 0) {
17824 negate(state);
17825 continue;
17826 }
17827 }
17828
17829 /**
17830 * Plus
17831 */
17832
17833 if (value === '+') {
17834 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17835 extglobOpen('plus', value);
17836 continue;
17837 }
17838
17839 if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) {
17840 let output = prev.extglob === true ? '\\' + value : value;
17841 push({ type: 'plus', value, output });
17842 continue;
17843 }
17844
17845 // use regex behavior inside parens
17846 if (state.parens > 0 && opts.regex !== false) {
17847 push({ type: 'plus', value });
17848 continue;
17849 }
17850
17851 push({ type: 'plus', value: PLUS_LITERAL });
17852 continue;
17853 }
17854
17855 /**
17856 * Plain text
17857 */
17858
17859 if (value === '@') {
17860 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17861 push({ type: 'at', value, output: '' });
17862 continue;
17863 }
17864
17865 push({ type: 'text', value });
17866 continue;
17867 }
17868
17869 /**
17870 * Plain text
17871 */
17872
17873 if (value !== '*') {
17874 if (value === '$' || value === '^') {
17875 value = '\\' + value;
17876 }
17877
17878 let match = REGEX_NON_SPECIAL_CHAR.exec(input.slice(state.index + 1));
17879 if (match) {
17880 value += match[0];
17881 state.index += match[0].length;
17882 }
17883
17884 push({ type: 'text', value });
17885 continue;
17886 }
17887
17888 /**
17889 * Stars
17890 */
17891
17892 if (prev && (prev.type === 'globstar' || prev.star === true)) {
17893 prev.type = 'star';
17894 prev.star = true;
17895 prev.value += value;
17896 prev.output = star;
17897 state.backtrack = true;
17898 state.consumed += value;
17899 continue;
17900 }
17901
17902 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17903 extglobOpen('star', value);
17904 continue;
17905 }
17906
17907 if (prev.type === 'star') {
17908 if (opts.noglobstar === true) {
17909 state.consumed += value;
17910 continue;
17911 }
17912
17913 let prior = prev.prev;
17914 let before = prior.prev;
17915 let isStart = prior.type === 'slash' || prior.type === 'bos';
17916 let afterStar = before && (before.type === 'star' || before.type === 'globstar');
17917
17918 if (opts.bash === true && (!isStart || (!eos() && peek() !== '/'))) {
17919 push({ type: 'star', value, output: '' });
17920 continue;
17921 }
17922
17923 let isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
17924 let isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
17925 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
17926 push({ type: 'star', value, output: '' });
17927 continue;
17928 }
17929
17930 // strip consecutive `/**/`
17931 while (input.slice(state.index + 1, state.index + 4) === '/**') {
17932 let after = input[state.index + 4];
17933 if (after && after !== '/') {
17934 break;
17935 }
17936 state.consumed += '/**';
17937 state.index += 3;
17938 }
17939
17940 if (prior.type === 'bos' && eos()) {
17941 prev.type = 'globstar';
17942 prev.value += value;
17943 prev.output = globstar(opts);
17944 state.output = prev.output;
17945 state.consumed += value;
17946 continue;
17947 }
17948
17949 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
17950 state.output = state.output.slice(0, -(prior.output + prev.output).length);
17951 prior.output = '(?:' + prior.output;
17952
17953 prev.type = 'globstar';
17954 prev.output = globstar(opts) + '|$)';
17955 prev.value += value;
17956
17957 state.output += prior.output + prev.output;
17958 state.consumed += value;
17959 continue;
17960 }
17961
17962 let next = peek();
17963 if (prior.type === 'slash' && prior.prev.type !== 'bos' && next === '/') {
17964 let end = peek(2) !== void 0 ? '|$' : '';
17965
17966 state.output = state.output.slice(0, -(prior.output + prev.output).length);
17967 prior.output = '(?:' + prior.output;
17968
17969 prev.type = 'globstar';
17970 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
17971 prev.value += value;
17972
17973 state.output += prior.output + prev.output;
17974 state.consumed += value + advance();
17975
17976 push({ type: 'slash', value, output: '' });
17977 continue;
17978 }
17979
17980 if (prior.type === 'bos' && next === '/') {
17981 prev.type = 'globstar';
17982 prev.value += value;
17983 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
17984 state.output = prev.output;
17985 state.consumed += value + advance();
17986 push({ type: 'slash', value, output: '' });
17987 continue;
17988 }
17989
17990 // remove single star from output
17991 state.output = state.output.slice(0, -prev.output.length);
17992
17993 // reset previous token to globstar
17994 prev.type = 'globstar';
17995 prev.output = globstar(opts);
17996 prev.value += value;
17997
17998 // reset output with globstar
17999 state.output += prev.output;
18000 state.consumed += value;
18001 continue;
18002 }
18003
18004 let token = { type: 'star', value, output: star };
18005
18006 if (opts.bash === true) {
18007 token.output = '.*?';
18008 if (prev.type === 'bos' || prev.type === 'slash') {
18009 token.output = nodot + token.output;
18010 }
18011 push(token);
18012 continue;
18013 }
18014
18015 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
18016 token.output = value;
18017 push(token);
18018 continue;
18019 }
18020
18021 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
18022 if (prev.type === 'dot') {
18023 state.output += NO_DOT_SLASH;
18024 prev.output += NO_DOT_SLASH;
18025
18026 } else if (opts.dot === true) {
18027 state.output += NO_DOTS_SLASH;
18028 prev.output += NO_DOTS_SLASH;
18029
18030 } else {
18031 state.output += nodot;
18032 prev.output += nodot;
18033 }
18034
18035 if (peek() !== '*') {
18036 state.output += ONE_CHAR;
18037 prev.output += ONE_CHAR;
18038 }
18039 }
18040
18041 push(token);
18042 }
18043
18044 while (state.brackets > 0) {
18045 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
18046 state.output = utils.escapeLast(state.output, '[');
18047 decrement('brackets');
18048 }
18049
18050 while (state.parens > 0) {
18051 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
18052 state.output = utils.escapeLast(state.output, '(');
18053 decrement('parens');
18054 }
18055
18056 while (state.braces > 0) {
18057 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
18058 state.output = utils.escapeLast(state.output, '{');
18059 decrement('braces');
18060 }
18061
18062 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
18063 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
18064 }
18065
18066 // rebuild the output if we had to backtrack at any point
18067 if (state.backtrack === true) {
18068 state.output = '';
18069
18070 for (let token of state.tokens) {
18071 state.output += token.output != null ? token.output : token.value;
18072
18073 if (token.suffix) {
18074 state.output += token.suffix;
18075 }
18076 }
18077 }
18078
18079 return state;
18080};
18081
18082/**
18083 * Fast paths for creating regular expressions for common glob patterns.
18084 * This can significantly speed up processing and has very little downside
18085 * impact when none of the fast paths match.
18086 */
18087
18088parse.fastpaths = (input, options) => {
18089 let opts = { ...options };
18090 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
18091 let len = input.length;
18092 if (len > max) {
18093 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
18094 }
18095
18096 input = REPLACEMENTS[input] || input;
18097 let win32 = utils.isWindows(options);
18098
18099 // create constants based on platform, for windows or posix
18100 const {
18101 DOT_LITERAL,
18102 SLASH_LITERAL,
18103 ONE_CHAR,
18104 DOTS_SLASH,
18105 NO_DOT,
18106 NO_DOTS,
18107 NO_DOTS_SLASH,
18108 STAR,
18109 START_ANCHOR
18110 } = constants.globChars(win32);
18111
18112 let capture = opts.capture ? '' : '?:';
18113 let star = opts.bash === true ? '.*?' : STAR;
18114 let nodot = opts.dot ? NO_DOTS : NO_DOT;
18115 let slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
18116
18117 if (opts.capture) {
18118 star = `(${star})`;
18119 }
18120
18121 const globstar = (opts) => {
18122 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
18123 };
18124
18125 const create = str => {
18126 switch (str) {
18127 case '*':
18128 return `${nodot}${ONE_CHAR}${star}`;
18129
18130 case '.*':
18131 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
18132
18133 case '*.*':
18134 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
18135
18136 case '*/*':
18137 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
18138
18139 case '**':
18140 return nodot + globstar(opts);
18141
18142 case '**/*':
18143 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
18144
18145 case '**/*.*':
18146 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
18147
18148 case '**/.*':
18149 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
18150
18151 default: {
18152 let match = /^(.*?)\.(\w+)$/.exec(str);
18153 if (!match) return;
18154
18155 let source = create(match[1], options);
18156 if (!source) return;
18157
18158 return source + DOT_LITERAL + match[2];
18159 }
18160 }
18161 };
18162
18163 let output = create(input);
18164 if (output && opts.strictSlashes !== true) {
18165 output += `${SLASH_LITERAL}?`;
18166 }
18167
18168 return output;
18169};
18170
18171module.exports = parse;
18172
18173
18174/***/ }),
18175/* 87 */
18176/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
18177
18178"use strict";
18179
18180
18181module.exports = __webpack_require__(88);
18182
18183
18184/***/ }),
18185/* 88 */
18186/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
18187
18188"use strict";
18189
18190
18191const path = __webpack_require__(13);
18192const scan = __webpack_require__(89);
18193const parse = __webpack_require__(92);
18194const utils = __webpack_require__(90);
18195const constants = __webpack_require__(91);
18196const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
18197
18198/**
18199 * Creates a matcher function from one or more glob patterns. The
18200 * returned function takes a string to match as its first argument,
18201 * and returns true if the string is a match. The returned matcher
18202 * function also takes a boolean as the second argument that, when true,
18203 * returns an object with additional information.
18204 *
18205 * ```js
18206 * const picomatch = require('picomatch');
18207 * // picomatch(glob[, options]);
18208 *
18209 * const isMatch = picomatch('*.!(*a)');
18210 * console.log(isMatch('a.a')); //=> false
18211 * console.log(isMatch('a.b')); //=> true
18212 * ```
18213 * @name picomatch
18214 * @param {String|Array} `globs` One or more glob patterns.
18215 * @param {Object=} `options`
18216 * @return {Function=} Returns a matcher function.
18217 * @api public
18218 */
18219
18220const picomatch = (glob, options, returnState = false) => {
18221 if (Array.isArray(glob)) {
18222 const fns = glob.map(input => picomatch(input, options, returnState));
18223 const arrayMatcher = str => {
18224 for (const isMatch of fns) {
18225 const state = isMatch(str);
18226 if (state) return state;
18227 }
18228 return false;
18229 };
18230 return arrayMatcher;
18231 }
18232
18233 const isState = isObject(glob) && glob.tokens && glob.input;
18234
18235 if (glob === '' || (typeof glob !== 'string' && !isState)) {
18236 throw new TypeError('Expected pattern to be a non-empty string');
18237 }
18238
18239 const opts = options || {};
18240 const posix = utils.isWindows(options);
18241 const regex = isState
18242 ? picomatch.compileRe(glob, options)
18243 : picomatch.makeRe(glob, options, false, true);
18244
18245 const state = regex.state;
18246 delete regex.state;
18247
18248 let isIgnored = () => false;
18249 if (opts.ignore) {
18250 const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
18251 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
18252 }
18253
18254 const matcher = (input, returnObject = false) => {
18255 const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
18256 const result = { glob, state, regex, posix, input, output, match, isMatch };
18257
18258 if (typeof opts.onResult === 'function') {
18259 opts.onResult(result);
18260 }
18261
18262 if (isMatch === false) {
18263 result.isMatch = false;
18264 return returnObject ? result : false;
18265 }
18266
18267 if (isIgnored(input)) {
18268 if (typeof opts.onIgnore === 'function') {
18269 opts.onIgnore(result);
18270 }
18271 result.isMatch = false;
18272 return returnObject ? result : false;
18273 }
18274
18275 if (typeof opts.onMatch === 'function') {
18276 opts.onMatch(result);
18277 }
18278 return returnObject ? result : true;
18279 };
18280
18281 if (returnState) {
18282 matcher.state = state;
18283 }
18284
18285 return matcher;
18286};
18287
18288/**
18289 * Test `input` with the given `regex`. This is used by the main
18290 * `picomatch()` function to test the input string.
18291 *
18292 * ```js
18293 * const picomatch = require('picomatch');
18294 * // picomatch.test(input, regex[, options]);
18295 *
18296 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
18297 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
18298 * ```
18299 * @param {String} `input` String to test.
18300 * @param {RegExp} `regex`
18301 * @return {Object} Returns an object with matching info.
18302 * @api public
18303 */
18304
18305picomatch.test = (input, regex, options, { glob, posix } = {}) => {
18306 if (typeof input !== 'string') {
18307 throw new TypeError('Expected input to be a string');
18308 }
18309
18310 if (input === '') {
18311 return { isMatch: false, output: '' };
18312 }
18313
18314 const opts = options || {};
18315 const format = opts.format || (posix ? utils.toPosixSlashes : null);
18316 let match = input === glob;
18317 let output = (match && format) ? format(input) : input;
18318
18319 if (match === false) {
18320 output = format ? format(input) : input;
18321 match = output === glob;
18322 }
18323
18324 if (match === false || opts.capture === true) {
18325 if (opts.matchBase === true || opts.basename === true) {
18326 match = picomatch.matchBase(input, regex, options, posix);
18327 } else {
18328 match = regex.exec(output);
18329 }
18330 }
18331
18332 return { isMatch: Boolean(match), match, output };
18333};
18334
18335/**
18336 * Match the basename of a filepath.
18337 *
18338 * ```js
18339 * const picomatch = require('picomatch');
18340 * // picomatch.matchBase(input, glob[, options]);
18341 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
18342 * ```
18343 * @param {String} `input` String to test.
18344 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
18345 * @return {Boolean}
18346 * @api public
18347 */
18348
18349picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
18350 const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
18351 return regex.test(path.basename(input));
18352};
18353
18354/**
18355 * Returns true if **any** of the given glob `patterns` match the specified `string`.
18356 *
18357 * ```js
18358 * const picomatch = require('picomatch');
18359 * // picomatch.isMatch(string, patterns[, options]);
18360 *
18361 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
18362 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
18363 * ```
18364 * @param {String|Array} str The string to test.
18365 * @param {String|Array} patterns One or more glob patterns to use for matching.
18366 * @param {Object} [options] See available [options](#options).
18367 * @return {Boolean} Returns true if any patterns match `str`
18368 * @api public
18369 */
18370
18371picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
18372
18373/**
18374 * Parse a glob pattern to create the source string for a regular
18375 * expression.
18376 *
18377 * ```js
18378 * const picomatch = require('picomatch');
18379 * const result = picomatch.parse(pattern[, options]);
18380 * ```
18381 * @param {String} `pattern`
18382 * @param {Object} `options`
18383 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
18384 * @api public
18385 */
18386
18387picomatch.parse = (pattern, options) => {
18388 if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
18389 return parse(pattern, { ...options, fastpaths: false });
18390};
18391
18392/**
18393 * Scan a glob pattern to separate the pattern into segments.
18394 *
18395 * ```js
18396 * const picomatch = require('picomatch');
18397 * // picomatch.scan(input[, options]);
18398 *
18399 * const result = picomatch.scan('!./foo/*.js');
18400 * console.log(result);
18401 * { prefix: '!./',
18402 * input: '!./foo/*.js',
18403 * start: 3,
18404 * base: 'foo',
18405 * glob: '*.js',
18406 * isBrace: false,
18407 * isBracket: false,
18408 * isGlob: true,
18409 * isExtglob: false,
18410 * isGlobstar: false,
18411 * negated: true }
18412 * ```
18413 * @param {String} `input` Glob pattern to scan.
18414 * @param {Object} `options`
18415 * @return {Object} Returns an object with
18416 * @api public
18417 */
18418
18419picomatch.scan = (input, options) => scan(input, options);
18420
18421/**
18422 * Create a regular expression from a parsed glob pattern.
18423 *
18424 * ```js
18425 * const picomatch = require('picomatch');
18426 * const state = picomatch.parse('*.js');
18427 * // picomatch.compileRe(state[, options]);
18428 *
18429 * console.log(picomatch.compileRe(state));
18430 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
18431 * ```
18432 * @param {String} `state` The object returned from the `.parse` method.
18433 * @param {Object} `options`
18434 * @return {RegExp} Returns a regex created from the given pattern.
18435 * @api public
18436 */
18437
18438picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {
18439 if (returnOutput === true) {
18440 return parsed.output;
18441 }
18442
18443 const opts = options || {};
18444 const prepend = opts.contains ? '' : '^';
18445 const append = opts.contains ? '' : '$';
18446
18447 let source = `${prepend}(?:${parsed.output})${append}`;
18448 if (parsed && parsed.negated === true) {
18449 source = `^(?!${source}).*$`;
18450 }
18451
18452 const regex = picomatch.toRegex(source, options);
18453 if (returnState === true) {
18454 regex.state = parsed;
18455 }
18456
18457 return regex;
18458};
18459
18460picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
18461 if (!input || typeof input !== 'string') {
18462 throw new TypeError('Expected a non-empty string');
18463 }
18464
18465 const opts = options || {};
18466 let parsed = { negated: false, fastpaths: true };
18467 let prefix = '';
18468 let output;
18469
18470 if (input.startsWith('./')) {
18471 input = input.slice(2);
18472 prefix = parsed.prefix = './';
18473 }
18474
18475 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
18476 output = parse.fastpaths(input, options);
18477 }
18478
18479 if (output === undefined) {
18480 parsed = parse(input, options);
18481 parsed.prefix = prefix + (parsed.prefix || '');
18482 } else {
18483 parsed.output = output;
18484 }
18485
18486 return picomatch.compileRe(parsed, options, returnOutput, returnState);
18487};
18488
18489/**
18490 * Create a regular expression from the given regex source string.
18491 *
18492 * ```js
18493 * const picomatch = require('picomatch');
18494 * // picomatch.toRegex(source[, options]);
18495 *
18496 * const { output } = picomatch.parse('*.js');
18497 * console.log(picomatch.toRegex(output));
18498 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
18499 * ```
18500 * @param {String} `source` Regular expression source string.
18501 * @param {Object} `options`
18502 * @return {RegExp}
18503 * @api public
18504 */
18505
18506picomatch.toRegex = (source, options) => {
18507 try {
18508 const opts = options || {};
18509 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
18510 } catch (err) {
18511 if (options && options.debug === true) throw err;
18512 return /$^/;
18513 }
18514};
18515
18516/**
18517 * Picomatch constants.
18518 * @return {Object}
18519 */
18520
18521picomatch.constants = constants;
18522
18523/**
18524 * Expose "picomatch"
18525 */
18526
18527module.exports = picomatch;
18528
18529
18530/***/ }),
18531/* 89 */
18532/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
18533
18534"use strict";
18535
18536
18537const utils = __webpack_require__(90);
18538const {
18539 CHAR_ASTERISK, /* * */
18540 CHAR_AT, /* @ */
18541 CHAR_BACKWARD_SLASH, /* \ */
18542 CHAR_COMMA, /* , */
18543 CHAR_DOT, /* . */
18544 CHAR_EXCLAMATION_MARK, /* ! */
18545 CHAR_FORWARD_SLASH, /* / */
18546 CHAR_LEFT_CURLY_BRACE, /* { */
18547 CHAR_LEFT_PARENTHESES, /* ( */
18548 CHAR_LEFT_SQUARE_BRACKET, /* [ */
18549 CHAR_PLUS, /* + */
18550 CHAR_QUESTION_MARK, /* ? */
18551 CHAR_RIGHT_CURLY_BRACE, /* } */
18552 CHAR_RIGHT_PARENTHESES, /* ) */
18553 CHAR_RIGHT_SQUARE_BRACKET /* ] */
18554} = __webpack_require__(91);
18555
18556const isPathSeparator = code => {
18557 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
18558};
18559
18560const depth = token => {
18561 if (token.isPrefix !== true) {
18562 token.depth = token.isGlobstar ? Infinity : 1;
18563 }
18564};
18565
18566/**
18567 * Quickly scans a glob pattern and returns an object with a handful of
18568 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
18569 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
18570 *
18571 * ```js
18572 * const pm = require('picomatch');
18573 * console.log(pm.scan('foo/bar/*.js'));
18574 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
18575 * ```
18576 * @param {String} `str`
18577 * @param {Object} `options`
18578 * @return {Object} Returns an object with tokens and regex source string.
18579 * @api public
18580 */
18581
18582const scan = (input, options) => {
18583 const opts = options || {};
18584
18585 const length = input.length - 1;
18586 const scanToEnd = opts.parts === true || opts.scanToEnd === true;
18587 const slashes = [];
18588 const tokens = [];
18589 const parts = [];
18590
18591 let str = input;
18592 let index = -1;
18593 let start = 0;
18594 let lastIndex = 0;
18595 let isBrace = false;
18596 let isBracket = false;
18597 let isGlob = false;
18598 let isExtglob = false;
18599 let isGlobstar = false;
18600 let braceEscaped = false;
18601 let backslashes = false;
18602 let negated = false;
18603 let finished = false;
18604 let braces = 0;
18605 let prev;
18606 let code;
18607 let token = { value: '', depth: 0, isGlob: false };
18608
18609 const eos = () => index >= length;
18610 const peek = () => str.charCodeAt(index + 1);
18611 const advance = () => {
18612 prev = code;
18613 return str.charCodeAt(++index);
18614 };
18615
18616 while (index < length) {
18617 code = advance();
18618 let next;
18619
18620 if (code === CHAR_BACKWARD_SLASH) {
18621 backslashes = token.backslashes = true;
18622 code = advance();
18623
18624 if (code === CHAR_LEFT_CURLY_BRACE) {
18625 braceEscaped = true;
18626 }
18627 continue;
18628 }
18629
18630 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
18631 braces++;
18632
18633 while (eos() !== true && (code = advance())) {
18634 if (code === CHAR_BACKWARD_SLASH) {
18635 backslashes = token.backslashes = true;
18636 advance();
18637 continue;
18638 }
18639
18640 if (code === CHAR_LEFT_CURLY_BRACE) {
18641 braces++;
18642 continue;
18643 }
18644
18645 if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
18646 isBrace = token.isBrace = true;
18647 isGlob = token.isGlob = true;
18648 finished = true;
18649
18650 if (scanToEnd === true) {
18651 continue;
18652 }
18653
18654 break;
18655 }
18656
18657 if (braceEscaped !== true && code === CHAR_COMMA) {
18658 isBrace = token.isBrace = true;
18659 isGlob = token.isGlob = true;
18660 finished = true;
18661
18662 if (scanToEnd === true) {
18663 continue;
18664 }
18665
18666 break;
18667 }
18668
18669 if (code === CHAR_RIGHT_CURLY_BRACE) {
18670 braces--;
18671
18672 if (braces === 0) {
18673 braceEscaped = false;
18674 isBrace = token.isBrace = true;
18675 finished = true;
18676 break;
18677 }
18678 }
18679 }
18680
18681 if (scanToEnd === true) {
18682 continue;
18683 }
18684
18685 break;
18686 }
18687
18688 if (code === CHAR_FORWARD_SLASH) {
18689 slashes.push(index);
18690 tokens.push(token);
18691 token = { value: '', depth: 0, isGlob: false };
18692
18693 if (finished === true) continue;
18694 if (prev === CHAR_DOT && index === (start + 1)) {
18695 start += 2;
18696 continue;
18697 }
18698
18699 lastIndex = index + 1;
18700 continue;
18701 }
18702
18703 if (opts.noext !== true) {
18704 const isExtglobChar = code === CHAR_PLUS
18705 || code === CHAR_AT
18706 || code === CHAR_ASTERISK
18707 || code === CHAR_QUESTION_MARK
18708 || code === CHAR_EXCLAMATION_MARK;
18709
18710 if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
18711 isGlob = token.isGlob = true;
18712 isExtglob = token.isExtglob = true;
18713 finished = true;
18714
18715 if (scanToEnd === true) {
18716 while (eos() !== true && (code = advance())) {
18717 if (code === CHAR_BACKWARD_SLASH) {
18718 backslashes = token.backslashes = true;
18719 code = advance();
18720 continue;
18721 }
18722
18723 if (code === CHAR_RIGHT_PARENTHESES) {
18724 isGlob = token.isGlob = true;
18725 finished = true;
18726 break;
18727 }
18728 }
18729 continue;
18730 }
18731 break;
18732 }
18733 }
18734
18735 if (code === CHAR_ASTERISK) {
18736 if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
18737 isGlob = token.isGlob = true;
18738 finished = true;
18739
18740 if (scanToEnd === true) {
18741 continue;
18742 }
18743 break;
18744 }
18745
18746 if (code === CHAR_QUESTION_MARK) {
18747 isGlob = token.isGlob = true;
18748 finished = true;
18749
18750 if (scanToEnd === true) {
18751 continue;
18752 }
18753 break;
18754 }
18755
18756 if (code === CHAR_LEFT_SQUARE_BRACKET) {
18757 while (eos() !== true && (next = advance())) {
18758 if (next === CHAR_BACKWARD_SLASH) {
18759 backslashes = token.backslashes = true;
18760 advance();
18761 continue;
18762 }
18763
18764 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
18765 isBracket = token.isBracket = true;
18766 isGlob = token.isGlob = true;
18767 finished = true;
18768
18769 if (scanToEnd === true) {
18770 continue;
18771 }
18772 break;
18773 }
18774 }
18775 }
18776
18777 if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
18778 negated = token.negated = true;
18779 start++;
18780 continue;
18781 }
18782
18783 if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
18784 isGlob = token.isGlob = true;
18785
18786 if (scanToEnd === true) {
18787 while (eos() !== true && (code = advance())) {
18788 if (code === CHAR_LEFT_PARENTHESES) {
18789 backslashes = token.backslashes = true;
18790 code = advance();
18791 continue;
18792 }
18793
18794 if (code === CHAR_RIGHT_PARENTHESES) {
18795 finished = true;
18796 break;
18797 }
18798 }
18799 continue;
18800 }
18801 break;
18802 }
18803
18804 if (isGlob === true) {
18805 finished = true;
18806
18807 if (scanToEnd === true) {
18808 continue;
18809 }
18810
18811 break;
18812 }
18813 }
18814
18815 if (opts.noext === true) {
18816 isExtglob = false;
18817 isGlob = false;
18818 }
18819
18820 let base = str;
18821 let prefix = '';
18822 let glob = '';
18823
18824 if (start > 0) {
18825 prefix = str.slice(0, start);
18826 str = str.slice(start);
18827 lastIndex -= start;
18828 }
18829
18830 if (base && isGlob === true && lastIndex > 0) {
18831 base = str.slice(0, lastIndex);
18832 glob = str.slice(lastIndex);
18833 } else if (isGlob === true) {
18834 base = '';
18835 glob = str;
18836 } else {
18837 base = str;
18838 }
18839
18840 if (base && base !== '' && base !== '/' && base !== str) {
18841 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
18842 base = base.slice(0, -1);
18843 }
18844 }
18845
18846 if (opts.unescape === true) {
18847 if (glob) glob = utils.removeBackslashes(glob);
18848
18849 if (base && backslashes === true) {
18850 base = utils.removeBackslashes(base);
18851 }
18852 }
18853
18854 const state = {
18855 prefix,
18856 input,
18857 start,
18858 base,
18859 glob,
18860 isBrace,
18861 isBracket,
18862 isGlob,
18863 isExtglob,
18864 isGlobstar,
18865 negated
18866 };
18867
18868 if (opts.tokens === true) {
18869 state.maxDepth = 0;
18870 if (!isPathSeparator(code)) {
18871 tokens.push(token);
18872 }
18873 state.tokens = tokens;
18874 }
18875
18876 if (opts.parts === true || opts.tokens === true) {
18877 let prevIndex;
18878
18879 for (let idx = 0; idx < slashes.length; idx++) {
18880 const n = prevIndex ? prevIndex + 1 : start;
18881 const i = slashes[idx];
18882 const value = input.slice(n, i);
18883 if (opts.tokens) {
18884 if (idx === 0 && start !== 0) {
18885 tokens[idx].isPrefix = true;
18886 tokens[idx].value = prefix;
18887 } else {
18888 tokens[idx].value = value;
18889 }
18890 depth(tokens[idx]);
18891 state.maxDepth += tokens[idx].depth;
18892 }
18893 if (idx !== 0 || value !== '') {
18894 parts.push(value);
18895 }
18896 prevIndex = i;
18897 }
18898
18899 if (prevIndex && prevIndex + 1 < input.length) {
18900 const value = input.slice(prevIndex + 1);
18901 parts.push(value);
18902
18903 if (opts.tokens) {
18904 tokens[tokens.length - 1].value = value;
18905 depth(tokens[tokens.length - 1]);
18906 state.maxDepth += tokens[tokens.length - 1].depth;
18907 }
18908 }
18909
18910 state.slashes = slashes;
18911 state.parts = parts;
18912 }
18913
18914 return state;
18915};
18916
18917module.exports = scan;
18918
18919
18920/***/ }),
18921/* 90 */
18922/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
18923
18924"use strict";
18925
18926
18927const path = __webpack_require__(13);
18928const win32 = process.platform === 'win32';
18929const {
18930 REGEX_BACKSLASH,
18931 REGEX_REMOVE_BACKSLASH,
18932 REGEX_SPECIAL_CHARS,
18933 REGEX_SPECIAL_CHARS_GLOBAL
18934} = __webpack_require__(91);
18935
18936exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
18937exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
18938exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
18939exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
18940exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
18941
18942exports.removeBackslashes = str => {
18943 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
18944 return match === '\\' ? '' : match;
18945 });
18946};
18947
18948exports.supportsLookbehinds = () => {
18949 const segs = process.version.slice(1).split('.').map(Number);
18950 if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
18951 return true;
18952 }
18953 return false;
18954};
18955
18956exports.isWindows = options => {
18957 if (options && typeof options.windows === 'boolean') {
18958 return options.windows;
18959 }
18960 return win32 === true || path.sep === '\\';
18961};
18962
18963exports.escapeLast = (input, char, lastIdx) => {
18964 const idx = input.lastIndexOf(char, lastIdx);
18965 if (idx === -1) return input;
18966 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
18967 return `${input.slice(0, idx)}\\${input.slice(idx)}`;
18968};
18969
18970exports.removePrefix = (input, state = {}) => {
18971 let output = input;
18972 if (output.startsWith('./')) {
18973 output = output.slice(2);
18974 state.prefix = './';
18975 }
18976 return output;
18977};
18978
18979exports.wrapOutput = (input, state = {}, options = {}) => {
18980 const prepend = options.contains ? '' : '^';
18981 const append = options.contains ? '' : '$';
18982
18983 let output = `${prepend}(?:${input})${append}`;
18984 if (state.negated === true) {
18985 output = `(?:^(?!${output}).*$)`;
18986 }
18987 return output;
18988};
18989
18990
18991/***/ }),
18992/* 91 */
18993/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
18994
18995"use strict";
18996
18997
18998const path = __webpack_require__(13);
18999const WIN_SLASH = '\\\\/';
19000const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
19001
19002/**
19003 * Posix glob regex
19004 */
19005
19006const DOT_LITERAL = '\\.';
19007const PLUS_LITERAL = '\\+';
19008const QMARK_LITERAL = '\\?';
19009const SLASH_LITERAL = '\\/';
19010const ONE_CHAR = '(?=.)';
19011const QMARK = '[^/]';
19012const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
19013const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
19014const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
19015const NO_DOT = `(?!${DOT_LITERAL})`;
19016const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
19017const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
19018const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
19019const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
19020const STAR = `${QMARK}*?`;
19021
19022const POSIX_CHARS = {
19023 DOT_LITERAL,
19024 PLUS_LITERAL,
19025 QMARK_LITERAL,
19026 SLASH_LITERAL,
19027 ONE_CHAR,
19028 QMARK,
19029 END_ANCHOR,
19030 DOTS_SLASH,
19031 NO_DOT,
19032 NO_DOTS,
19033 NO_DOT_SLASH,
19034 NO_DOTS_SLASH,
19035 QMARK_NO_DOT,
19036 STAR,
19037 START_ANCHOR
19038};
19039
19040/**
19041 * Windows glob regex
19042 */
19043
19044const WINDOWS_CHARS = {
19045 ...POSIX_CHARS,
19046
19047 SLASH_LITERAL: `[${WIN_SLASH}]`,
19048 QMARK: WIN_NO_SLASH,
19049 STAR: `${WIN_NO_SLASH}*?`,
19050 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
19051 NO_DOT: `(?!${DOT_LITERAL})`,
19052 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
19053 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
19054 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
19055 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
19056 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
19057 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
19058};
19059
19060/**
19061 * POSIX Bracket Regex
19062 */
19063
19064const POSIX_REGEX_SOURCE = {
19065 alnum: 'a-zA-Z0-9',
19066 alpha: 'a-zA-Z',
19067 ascii: '\\x00-\\x7F',
19068 blank: ' \\t',
19069 cntrl: '\\x00-\\x1F\\x7F',
19070 digit: '0-9',
19071 graph: '\\x21-\\x7E',
19072 lower: 'a-z',
19073 print: '\\x20-\\x7E ',
19074 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
19075 space: ' \\t\\r\\n\\v\\f',
19076 upper: 'A-Z',
19077 word: 'A-Za-z0-9_',
19078 xdigit: 'A-Fa-f0-9'
19079};
19080
19081module.exports = {
19082 MAX_LENGTH: 1024 * 64,
19083 POSIX_REGEX_SOURCE,
19084
19085 // regular expressions
19086 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
19087 REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
19088 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
19089 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
19090 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
19091 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
19092
19093 // Replace globs with equivalent patterns to reduce parsing time.
19094 REPLACEMENTS: {
19095 '***': '*',
19096 '**/**': '**',
19097 '**/**/**': '**'
19098 },
19099
19100 // Digits
19101 CHAR_0: 48, /* 0 */
19102 CHAR_9: 57, /* 9 */
19103
19104 // Alphabet chars.
19105 CHAR_UPPERCASE_A: 65, /* A */
19106 CHAR_LOWERCASE_A: 97, /* a */
19107 CHAR_UPPERCASE_Z: 90, /* Z */
19108 CHAR_LOWERCASE_Z: 122, /* z */
19109
19110 CHAR_LEFT_PARENTHESES: 40, /* ( */
19111 CHAR_RIGHT_PARENTHESES: 41, /* ) */
19112
19113 CHAR_ASTERISK: 42, /* * */
19114
19115 // Non-alphabetic chars.
19116 CHAR_AMPERSAND: 38, /* & */
19117 CHAR_AT: 64, /* @ */
19118 CHAR_BACKWARD_SLASH: 92, /* \ */
19119 CHAR_CARRIAGE_RETURN: 13, /* \r */
19120 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
19121 CHAR_COLON: 58, /* : */
19122 CHAR_COMMA: 44, /* , */
19123 CHAR_DOT: 46, /* . */
19124 CHAR_DOUBLE_QUOTE: 34, /* " */
19125 CHAR_EQUAL: 61, /* = */
19126 CHAR_EXCLAMATION_MARK: 33, /* ! */
19127 CHAR_FORM_FEED: 12, /* \f */
19128 CHAR_FORWARD_SLASH: 47, /* / */
19129 CHAR_GRAVE_ACCENT: 96, /* ` */
19130 CHAR_HASH: 35, /* # */
19131 CHAR_HYPHEN_MINUS: 45, /* - */
19132 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
19133 CHAR_LEFT_CURLY_BRACE: 123, /* { */
19134 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
19135 CHAR_LINE_FEED: 10, /* \n */
19136 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
19137 CHAR_PERCENT: 37, /* % */
19138 CHAR_PLUS: 43, /* + */
19139 CHAR_QUESTION_MARK: 63, /* ? */
19140 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
19141 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
19142 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
19143 CHAR_SEMICOLON: 59, /* ; */
19144 CHAR_SINGLE_QUOTE: 39, /* ' */
19145 CHAR_SPACE: 32, /* */
19146 CHAR_TAB: 9, /* \t */
19147 CHAR_UNDERSCORE: 95, /* _ */
19148 CHAR_VERTICAL_LINE: 124, /* | */
19149 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
19150
19151 SEP: path.sep,
19152
19153 /**
19154 * Create EXTGLOB_CHARS
19155 */
19156
19157 extglobChars(chars) {
19158 return {
19159 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
19160 '?': { type: 'qmark', open: '(?:', close: ')?' },
19161 '+': { type: 'plus', open: '(?:', close: ')+' },
19162 '*': { type: 'star', open: '(?:', close: ')*' },
19163 '@': { type: 'at', open: '(?:', close: ')' }
19164 };
19165 },
19166
19167 /**
19168 * Create GLOB_CHARS
19169 */
19170
19171 globChars(win32) {
19172 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
19173 }
19174};
19175
19176
19177/***/ }),
19178/* 92 */
19179/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
19180
19181"use strict";
19182
19183
19184const constants = __webpack_require__(91);
19185const utils = __webpack_require__(90);
19186
19187/**
19188 * Constants
19189 */
19190
19191const {
19192 MAX_LENGTH,
19193 POSIX_REGEX_SOURCE,
19194 REGEX_NON_SPECIAL_CHARS,
19195 REGEX_SPECIAL_CHARS_BACKREF,
19196 REPLACEMENTS
19197} = constants;
19198
19199/**
19200 * Helpers
19201 */
19202
19203const expandRange = (args, options) => {
19204 if (typeof options.expandRange === 'function') {
19205 return options.expandRange(...args, options);
19206 }
19207
19208 args.sort();
19209 const value = `[${args.join('-')}]`;
19210
19211 try {
19212 /* eslint-disable-next-line no-new */
19213 new RegExp(value);
19214 } catch (ex) {
19215 return args.map(v => utils.escapeRegex(v)).join('..');
19216 }
19217
19218 return value;
19219};
19220
19221/**
19222 * Create the message for a syntax error
19223 */
19224
19225const syntaxError = (type, char) => {
19226 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
19227};
19228
19229/**
19230 * Parse the given input string.
19231 * @param {String} input
19232 * @param {Object} options
19233 * @return {Object}
19234 */
19235
19236const parse = (input, options) => {
19237 if (typeof input !== 'string') {
19238 throw new TypeError('Expected a string');
19239 }
19240
19241 input = REPLACEMENTS[input] || input;
19242
19243 const opts = { ...options };
19244 const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
19245
19246 let len = input.length;
19247 if (len > max) {
19248 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
19249 }
19250
19251 const bos = { type: 'bos', value: '', output: opts.prepend || '' };
19252 const tokens = [bos];
19253
19254 const capture = opts.capture ? '' : '?:';
19255 const win32 = utils.isWindows(options);
19256
19257 // create constants based on platform, for windows or posix
19258 const PLATFORM_CHARS = constants.globChars(win32);
19259 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
19260
19261 const {
19262 DOT_LITERAL,
19263 PLUS_LITERAL,
19264 SLASH_LITERAL,
19265 ONE_CHAR,
19266 DOTS_SLASH,
19267 NO_DOT,
19268 NO_DOT_SLASH,
19269 NO_DOTS_SLASH,
19270 QMARK,
19271 QMARK_NO_DOT,
19272 STAR,
19273 START_ANCHOR
19274 } = PLATFORM_CHARS;
19275
19276 const globstar = (opts) => {
19277 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
19278 };
19279
19280 const nodot = opts.dot ? '' : NO_DOT;
19281 const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
19282 let star = opts.bash === true ? globstar(opts) : STAR;
19283
19284 if (opts.capture) {
19285 star = `(${star})`;
19286 }
19287
19288 // minimatch options support
19289 if (typeof opts.noext === 'boolean') {
19290 opts.noextglob = opts.noext;
19291 }
19292
19293 const state = {
19294 input,
19295 index: -1,
19296 start: 0,
19297 dot: opts.dot === true,
19298 consumed: '',
19299 output: '',
19300 prefix: '',
19301 backtrack: false,
19302 negated: false,
19303 brackets: 0,
19304 braces: 0,
19305 parens: 0,
19306 quotes: 0,
19307 globstar: false,
19308 tokens
19309 };
19310
19311 input = utils.removePrefix(input, state);
19312 len = input.length;
19313
19314 const extglobs = [];
19315 const braces = [];
19316 const stack = [];
19317 let prev = bos;
19318 let value;
19319
19320 /**
19321 * Tokenizing helpers
19322 */
19323
19324 const eos = () => state.index === len - 1;
19325 const peek = state.peek = (n = 1) => input[state.index + n];
19326 const advance = state.advance = () => input[++state.index];
19327 const remaining = () => input.slice(state.index + 1);
19328 const consume = (value = '', num = 0) => {
19329 state.consumed += value;
19330 state.index += num;
19331 };
19332 const append = token => {
19333 state.output += token.output != null ? token.output : token.value;
19334 consume(token.value);
19335 };
19336
19337 const negate = () => {
19338 let count = 1;
19339
19340 while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
19341 advance();
19342 state.start++;
19343 count++;
19344 }
19345
19346 if (count % 2 === 0) {
19347 return false;
19348 }
19349
19350 state.negated = true;
19351 state.start++;
19352 return true;
19353 };
19354
19355 const increment = type => {
19356 state[type]++;
19357 stack.push(type);
19358 };
19359
19360 const decrement = type => {
19361 state[type]--;
19362 stack.pop();
19363 };
19364
19365 /**
19366 * Push tokens onto the tokens array. This helper speeds up
19367 * tokenizing by 1) helping us avoid backtracking as much as possible,
19368 * and 2) helping us avoid creating extra tokens when consecutive
19369 * characters are plain text. This improves performance and simplifies
19370 * lookbehinds.
19371 */
19372
19373 const push = tok => {
19374 if (prev.type === 'globstar') {
19375 const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
19376 const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
19377
19378 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
19379 state.output = state.output.slice(0, -prev.output.length);
19380 prev.type = 'star';
19381 prev.value = '*';
19382 prev.output = star;
19383 state.output += prev.output;
19384 }
19385 }
19386
19387 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
19388 extglobs[extglobs.length - 1].inner += tok.value;
19389 }
19390
19391 if (tok.value || tok.output) append(tok);
19392 if (prev && prev.type === 'text' && tok.type === 'text') {
19393 prev.value += tok.value;
19394 prev.output = (prev.output || '') + tok.value;
19395 return;
19396 }
19397
19398 tok.prev = prev;
19399 tokens.push(tok);
19400 prev = tok;
19401 };
19402
19403 const extglobOpen = (type, value) => {
19404 const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
19405
19406 token.prev = prev;
19407 token.parens = state.parens;
19408 token.output = state.output;
19409 const output = (opts.capture ? '(' : '') + token.open;
19410
19411 increment('parens');
19412 push({ type, value, output: state.output ? '' : ONE_CHAR });
19413 push({ type: 'paren', extglob: true, value: advance(), output });
19414 extglobs.push(token);
19415 };
19416
19417 const extglobClose = token => {
19418 let output = token.close + (opts.capture ? ')' : '');
19419
19420 if (token.type === 'negate') {
19421 let extglobStar = star;
19422
19423 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
19424 extglobStar = globstar(opts);
19425 }
19426
19427 if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
19428 output = token.close = `)$))${extglobStar}`;
19429 }
19430
19431 if (token.prev.type === 'bos' && eos()) {
19432 state.negatedExtglob = true;
19433 }
19434 }
19435
19436 push({ type: 'paren', extglob: true, value, output });
19437 decrement('parens');
19438 };
19439
19440 /**
19441 * Fast paths
19442 */
19443
19444 if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
19445 let backslashes = false;
19446
19447 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
19448 if (first === '\\') {
19449 backslashes = true;
19450 return m;
19451 }
19452
19453 if (first === '?') {
19454 if (esc) {
19455 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
19456 }
19457 if (index === 0) {
19458 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
19459 }
19460 return QMARK.repeat(chars.length);
19461 }
19462
19463 if (first === '.') {
19464 return DOT_LITERAL.repeat(chars.length);
19465 }
19466
19467 if (first === '*') {
19468 if (esc) {
19469 return esc + first + (rest ? star : '');
19470 }
19471 return star;
19472 }
19473 return esc ? m : `\\${m}`;
19474 });
19475
19476 if (backslashes === true) {
19477 if (opts.unescape === true) {
19478 output = output.replace(/\\/g, '');
19479 } else {
19480 output = output.replace(/\\+/g, m => {
19481 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
19482 });
19483 }
19484 }
19485
19486 if (output === input && opts.contains === true) {
19487 state.output = input;
19488 return state;
19489 }
19490
19491 state.output = utils.wrapOutput(output, state, options);
19492 return state;
19493 }
19494
19495 /**
19496 * Tokenize input until we reach end-of-string
19497 */
19498
19499 while (!eos()) {
19500 value = advance();
19501
19502 if (value === '\u0000') {
19503 continue;
19504 }
19505
19506 /**
19507 * Escaped characters
19508 */
19509
19510 if (value === '\\') {
19511 const next = peek();
19512
19513 if (next === '/' && opts.bash !== true) {
19514 continue;
19515 }
19516
19517 if (next === '.' || next === ';') {
19518 continue;
19519 }
19520
19521 if (!next) {
19522 value += '\\';
19523 push({ type: 'text', value });
19524 continue;
19525 }
19526
19527 // collapse slashes to reduce potential for exploits
19528 const match = /^\\+/.exec(remaining());
19529 let slashes = 0;
19530
19531 if (match && match[0].length > 2) {
19532 slashes = match[0].length;
19533 state.index += slashes;
19534 if (slashes % 2 !== 0) {
19535 value += '\\';
19536 }
19537 }
19538
19539 if (opts.unescape === true) {
19540 value = advance() || '';
19541 } else {
19542 value += advance() || '';
19543 }
19544
19545 if (state.brackets === 0) {
19546 push({ type: 'text', value });
19547 continue;
19548 }
19549 }
19550
19551 /**
19552 * If we're inside a regex character class, continue
19553 * until we reach the closing bracket.
19554 */
19555
19556 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
19557 if (opts.posix !== false && value === ':') {
19558 const inner = prev.value.slice(1);
19559 if (inner.includes('[')) {
19560 prev.posix = true;
19561
19562 if (inner.includes(':')) {
19563 const idx = prev.value.lastIndexOf('[');
19564 const pre = prev.value.slice(0, idx);
19565 const rest = prev.value.slice(idx + 2);
19566 const posix = POSIX_REGEX_SOURCE[rest];
19567 if (posix) {
19568 prev.value = pre + posix;
19569 state.backtrack = true;
19570 advance();
19571
19572 if (!bos.output && tokens.indexOf(prev) === 1) {
19573 bos.output = ONE_CHAR;
19574 }
19575 continue;
19576 }
19577 }
19578 }
19579 }
19580
19581 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
19582 value = `\\${value}`;
19583 }
19584
19585 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
19586 value = `\\${value}`;
19587 }
19588
19589 if (opts.posix === true && value === '!' && prev.value === '[') {
19590 value = '^';
19591 }
19592
19593 prev.value += value;
19594 append({ value });
19595 continue;
19596 }
19597
19598 /**
19599 * If we're inside a quoted string, continue
19600 * until we reach the closing double quote.
19601 */
19602
19603 if (state.quotes === 1 && value !== '"') {
19604 value = utils.escapeRegex(value);
19605 prev.value += value;
19606 append({ value });
19607 continue;
19608 }
19609
19610 /**
19611 * Double quotes
19612 */
19613
19614 if (value === '"') {
19615 state.quotes = state.quotes === 1 ? 0 : 1;
19616 if (opts.keepQuotes === true) {
19617 push({ type: 'text', value });
19618 }
19619 continue;
19620 }
19621
19622 /**
19623 * Parentheses
19624 */
19625
19626 if (value === '(') {
19627 increment('parens');
19628 push({ type: 'paren', value });
19629 continue;
19630 }
19631
19632 if (value === ')') {
19633 if (state.parens === 0 && opts.strictBrackets === true) {
19634 throw new SyntaxError(syntaxError('opening', '('));
19635 }
19636
19637 const extglob = extglobs[extglobs.length - 1];
19638 if (extglob && state.parens === extglob.parens + 1) {
19639 extglobClose(extglobs.pop());
19640 continue;
19641 }
19642
19643 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
19644 decrement('parens');
19645 continue;
19646 }
19647
19648 /**
19649 * Square brackets
19650 */
19651
19652 if (value === '[') {
19653 if (opts.nobracket === true || !remaining().includes(']')) {
19654 if (opts.nobracket !== true && opts.strictBrackets === true) {
19655 throw new SyntaxError(syntaxError('closing', ']'));
19656 }
19657
19658 value = `\\${value}`;
19659 } else {
19660 increment('brackets');
19661 }
19662
19663 push({ type: 'bracket', value });
19664 continue;
19665 }
19666
19667 if (value === ']') {
19668 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
19669 push({ type: 'text', value, output: `\\${value}` });
19670 continue;
19671 }
19672
19673 if (state.brackets === 0) {
19674 if (opts.strictBrackets === true) {
19675 throw new SyntaxError(syntaxError('opening', '['));
19676 }
19677
19678 push({ type: 'text', value, output: `\\${value}` });
19679 continue;
19680 }
19681
19682 decrement('brackets');
19683
19684 const prevValue = prev.value.slice(1);
19685 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
19686 value = `/${value}`;
19687 }
19688
19689 prev.value += value;
19690 append({ value });
19691
19692 // when literal brackets are explicitly disabled
19693 // assume we should match with a regex character class
19694 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
19695 continue;
19696 }
19697
19698 const escaped = utils.escapeRegex(prev.value);
19699 state.output = state.output.slice(0, -prev.value.length);
19700
19701 // when literal brackets are explicitly enabled
19702 // assume we should escape the brackets to match literal characters
19703 if (opts.literalBrackets === true) {
19704 state.output += escaped;
19705 prev.value = escaped;
19706 continue;
19707 }
19708
19709 // when the user specifies nothing, try to match both
19710 prev.value = `(${capture}${escaped}|${prev.value})`;
19711 state.output += prev.value;
19712 continue;
19713 }
19714
19715 /**
19716 * Braces
19717 */
19718
19719 if (value === '{' && opts.nobrace !== true) {
19720 increment('braces');
19721
19722 const open = {
19723 type: 'brace',
19724 value,
19725 output: '(',
19726 outputIndex: state.output.length,
19727 tokensIndex: state.tokens.length
19728 };
19729
19730 braces.push(open);
19731 push(open);
19732 continue;
19733 }
19734
19735 if (value === '}') {
19736 const brace = braces[braces.length - 1];
19737
19738 if (opts.nobrace === true || !brace) {
19739 push({ type: 'text', value, output: value });
19740 continue;
19741 }
19742
19743 let output = ')';
19744
19745 if (brace.dots === true) {
19746 const arr = tokens.slice();
19747 const range = [];
19748
19749 for (let i = arr.length - 1; i >= 0; i--) {
19750 tokens.pop();
19751 if (arr[i].type === 'brace') {
19752 break;
19753 }
19754 if (arr[i].type !== 'dots') {
19755 range.unshift(arr[i].value);
19756 }
19757 }
19758
19759 output = expandRange(range, opts);
19760 state.backtrack = true;
19761 }
19762
19763 if (brace.comma !== true && brace.dots !== true) {
19764 const out = state.output.slice(0, brace.outputIndex);
19765 const toks = state.tokens.slice(brace.tokensIndex);
19766 brace.value = brace.output = '\\{';
19767 value = output = '\\}';
19768 state.output = out;
19769 for (const t of toks) {
19770 state.output += (t.output || t.value);
19771 }
19772 }
19773
19774 push({ type: 'brace', value, output });
19775 decrement('braces');
19776 braces.pop();
19777 continue;
19778 }
19779
19780 /**
19781 * Pipes
19782 */
19783
19784 if (value === '|') {
19785 if (extglobs.length > 0) {
19786 extglobs[extglobs.length - 1].conditions++;
19787 }
19788 push({ type: 'text', value });
19789 continue;
19790 }
19791
19792 /**
19793 * Commas
19794 */
19795
19796 if (value === ',') {
19797 let output = value;
19798
19799 const brace = braces[braces.length - 1];
19800 if (brace && stack[stack.length - 1] === 'braces') {
19801 brace.comma = true;
19802 output = '|';
19803 }
19804
19805 push({ type: 'comma', value, output });
19806 continue;
19807 }
19808
19809 /**
19810 * Slashes
19811 */
19812
19813 if (value === '/') {
19814 // if the beginning of the glob is "./", advance the start
19815 // to the current index, and don't add the "./" characters
19816 // to the state. This greatly simplifies lookbehinds when
19817 // checking for BOS characters like "!" and "." (not "./")
19818 if (prev.type === 'dot' && state.index === state.start + 1) {
19819 state.start = state.index + 1;
19820 state.consumed = '';
19821 state.output = '';
19822 tokens.pop();
19823 prev = bos; // reset "prev" to the first token
19824 continue;
19825 }
19826
19827 push({ type: 'slash', value, output: SLASH_LITERAL });
19828 continue;
19829 }
19830
19831 /**
19832 * Dots
19833 */
19834
19835 if (value === '.') {
19836 if (state.braces > 0 && prev.type === 'dot') {
19837 if (prev.value === '.') prev.output = DOT_LITERAL;
19838 const brace = braces[braces.length - 1];
19839 prev.type = 'dots';
19840 prev.output += value;
19841 prev.value += value;
19842 brace.dots = true;
19843 continue;
19844 }
19845
19846 if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
19847 push({ type: 'text', value, output: DOT_LITERAL });
19848 continue;
19849 }
19850
19851 push({ type: 'dot', value, output: DOT_LITERAL });
19852 continue;
19853 }
19854
19855 /**
19856 * Question marks
19857 */
19858
19859 if (value === '?') {
19860 const isGroup = prev && prev.value === '(';
19861 if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
19862 extglobOpen('qmark', value);
19863 continue;
19864 }
19865
19866 if (prev && prev.type === 'paren') {
19867 const next = peek();
19868 let output = value;
19869
19870 if (next === '<' && !utils.supportsLookbehinds()) {
19871 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
19872 }
19873
19874 if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
19875 output = `\\${value}`;
19876 }
19877
19878 push({ type: 'text', value, output });
19879 continue;
19880 }
19881
19882 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
19883 push({ type: 'qmark', value, output: QMARK_NO_DOT });
19884 continue;
19885 }
19886
19887 push({ type: 'qmark', value, output: QMARK });
19888 continue;
19889 }
19890
19891 /**
19892 * Exclamation
19893 */
19894
19895 if (value === '!') {
19896 if (opts.noextglob !== true && peek() === '(') {
19897 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
19898 extglobOpen('negate', value);
19899 continue;
19900 }
19901 }
19902
19903 if (opts.nonegate !== true && state.index === 0) {
19904 negate();
19905 continue;
19906 }
19907 }
19908
19909 /**
19910 * Plus
19911 */
19912
19913 if (value === '+') {
19914 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
19915 extglobOpen('plus', value);
19916 continue;
19917 }
19918
19919 if ((prev && prev.value === '(') || opts.regex === false) {
19920 push({ type: 'plus', value, output: PLUS_LITERAL });
19921 continue;
19922 }
19923
19924 if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
19925 push({ type: 'plus', value });
19926 continue;
19927 }
19928
19929 push({ type: 'plus', value: PLUS_LITERAL });
19930 continue;
19931 }
19932
19933 /**
19934 * Plain text
19935 */
19936
19937 if (value === '@') {
19938 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
19939 push({ type: 'at', extglob: true, value, output: '' });
19940 continue;
19941 }
19942
19943 push({ type: 'text', value });
19944 continue;
19945 }
19946
19947 /**
19948 * Plain text
19949 */
19950
19951 if (value !== '*') {
19952 if (value === '$' || value === '^') {
19953 value = `\\${value}`;
19954 }
19955
19956 const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
19957 if (match) {
19958 value += match[0];
19959 state.index += match[0].length;
19960 }
19961
19962 push({ type: 'text', value });
19963 continue;
19964 }
19965
19966 /**
19967 * Stars
19968 */
19969
19970 if (prev && (prev.type === 'globstar' || prev.star === true)) {
19971 prev.type = 'star';
19972 prev.star = true;
19973 prev.value += value;
19974 prev.output = star;
19975 state.backtrack = true;
19976 state.globstar = true;
19977 consume(value);
19978 continue;
19979 }
19980
19981 let rest = remaining();
19982 if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
19983 extglobOpen('star', value);
19984 continue;
19985 }
19986
19987 if (prev.type === 'star') {
19988 if (opts.noglobstar === true) {
19989 consume(value);
19990 continue;
19991 }
19992
19993 const prior = prev.prev;
19994 const before = prior.prev;
19995 const isStart = prior.type === 'slash' || prior.type === 'bos';
19996 const afterStar = before && (before.type === 'star' || before.type === 'globstar');
19997
19998 if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
19999 push({ type: 'star', value, output: '' });
20000 continue;
20001 }
20002
20003 const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
20004 const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
20005 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
20006 push({ type: 'star', value, output: '' });
20007 continue;
20008 }
20009
20010 // strip consecutive `/**/`
20011 while (rest.slice(0, 3) === '/**') {
20012 const after = input[state.index + 4];
20013 if (after && after !== '/') {
20014 break;
20015 }
20016 rest = rest.slice(3);
20017 consume('/**', 3);
20018 }
20019
20020 if (prior.type === 'bos' && eos()) {
20021 prev.type = 'globstar';
20022 prev.value += value;
20023 prev.output = globstar(opts);
20024 state.output = prev.output;
20025 state.globstar = true;
20026 consume(value);
20027 continue;
20028 }
20029
20030 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
20031 state.output = state.output.slice(0, -(prior.output + prev.output).length);
20032 prior.output = `(?:${prior.output}`;
20033
20034 prev.type = 'globstar';
20035 prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
20036 prev.value += value;
20037 state.globstar = true;
20038 state.output += prior.output + prev.output;
20039 consume(value);
20040 continue;
20041 }
20042
20043 if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
20044 const end = rest[1] !== void 0 ? '|$' : '';
20045
20046 state.output = state.output.slice(0, -(prior.output + prev.output).length);
20047 prior.output = `(?:${prior.output}`;
20048
20049 prev.type = 'globstar';
20050 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
20051 prev.value += value;
20052
20053 state.output += prior.output + prev.output;
20054 state.globstar = true;
20055
20056 consume(value + advance());
20057
20058 push({ type: 'slash', value: '/', output: '' });
20059 continue;
20060 }
20061
20062 if (prior.type === 'bos' && rest[0] === '/') {
20063 prev.type = 'globstar';
20064 prev.value += value;
20065 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
20066 state.output = prev.output;
20067 state.globstar = true;
20068 consume(value + advance());
20069 push({ type: 'slash', value: '/', output: '' });
20070 continue;
20071 }
20072
20073 // remove single star from output
20074 state.output = state.output.slice(0, -prev.output.length);
20075
20076 // reset previous token to globstar
20077 prev.type = 'globstar';
20078 prev.output = globstar(opts);
20079 prev.value += value;
20080
20081 // reset output with globstar
20082 state.output += prev.output;
20083 state.globstar = true;
20084 consume(value);
20085 continue;
20086 }
20087
20088 const token = { type: 'star', value, output: star };
20089
20090 if (opts.bash === true) {
20091 token.output = '.*?';
20092 if (prev.type === 'bos' || prev.type === 'slash') {
20093 token.output = nodot + token.output;
20094 }
20095 push(token);
20096 continue;
20097 }
20098
20099 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
20100 token.output = value;
20101 push(token);
20102 continue;
20103 }
20104
20105 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
20106 if (prev.type === 'dot') {
20107 state.output += NO_DOT_SLASH;
20108 prev.output += NO_DOT_SLASH;
20109
20110 } else if (opts.dot === true) {
20111 state.output += NO_DOTS_SLASH;
20112 prev.output += NO_DOTS_SLASH;
20113
20114 } else {
20115 state.output += nodot;
20116 prev.output += nodot;
20117 }
20118
20119 if (peek() !== '*') {
20120 state.output += ONE_CHAR;
20121 prev.output += ONE_CHAR;
20122 }
20123 }
20124
20125 push(token);
20126 }
20127
20128 while (state.brackets > 0) {
20129 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
20130 state.output = utils.escapeLast(state.output, '[');
20131 decrement('brackets');
20132 }
20133
20134 while (state.parens > 0) {
20135 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
20136 state.output = utils.escapeLast(state.output, '(');
20137 decrement('parens');
20138 }
20139
20140 while (state.braces > 0) {
20141 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
20142 state.output = utils.escapeLast(state.output, '{');
20143 decrement('braces');
20144 }
20145
20146 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
20147 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
20148 }
20149
20150 // rebuild the output if we had to backtrack at any point
20151 if (state.backtrack === true) {
20152 state.output = '';
20153
20154 for (const token of state.tokens) {
20155 state.output += token.output != null ? token.output : token.value;
20156
20157 if (token.suffix) {
20158 state.output += token.suffix;
20159 }
20160 }
20161 }
20162
20163 return state;
20164};
20165
20166/**
20167 * Fast paths for creating regular expressions for common glob patterns.
20168 * This can significantly speed up processing and has very little downside
20169 * impact when none of the fast paths match.
20170 */
20171
20172parse.fastpaths = (input, options) => {
20173 const opts = { ...options };
20174 const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
20175 const len = input.length;
20176 if (len > max) {
20177 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
20178 }
20179
20180 input = REPLACEMENTS[input] || input;
20181 const win32 = utils.isWindows(options);
20182
20183 // create constants based on platform, for windows or posix
20184 const {
20185 DOT_LITERAL,
20186 SLASH_LITERAL,
20187 ONE_CHAR,
20188 DOTS_SLASH,
20189 NO_DOT,
20190 NO_DOTS,
20191 NO_DOTS_SLASH,
20192 STAR,
20193 START_ANCHOR
20194 } = constants.globChars(win32);
20195
20196 const nodot = opts.dot ? NO_DOTS : NO_DOT;
20197 const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
20198 const capture = opts.capture ? '' : '?:';
20199 const state = { negated: false, prefix: '' };
20200 let star = opts.bash === true ? '.*?' : STAR;
20201
20202 if (opts.capture) {
20203 star = `(${star})`;
20204 }
20205
20206 const globstar = (opts) => {
20207 if (opts.noglobstar === true) return star;
20208 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
20209 };
20210
20211 const create = str => {
20212 switch (str) {
20213 case '*':
20214 return `${nodot}${ONE_CHAR}${star}`;
20215
20216 case '.*':
20217 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
20218
20219 case '*.*':
20220 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
20221
20222 case '*/*':
20223 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
20224
20225 case '**':
20226 return nodot + globstar(opts);
20227
20228 case '**/*':
20229 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
20230
20231 case '**/*.*':
20232 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
20233
20234 case '**/.*':
20235 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
20236
20237 default: {
20238 const match = /^(.*?)\.(\w+)$/.exec(str);
20239 if (!match) return;
20240
20241 const source = create(match[1]);
20242 if (!source) return;
20243
20244 return source + DOT_LITERAL + match[2];
20245 }
20246 }
20247 };
20248
20249 const output = utils.removePrefix(input, state);
20250 let source = create(output);
20251
20252 if (source && opts.strictSlashes !== true) {
20253 source += `${SLASH_LITERAL}?`;
20254 }
20255
20256 return source;
20257};
20258
20259module.exports = parse;
20260
20261
20262/***/ }),
20263/* 93 */
20264/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20265
20266"use strict";
20267
20268Object.defineProperty(exports, "__esModule", ({ value: true }));
20269exports.merge = void 0;
20270const merge2 = __webpack_require__(94);
20271function merge(streams) {
20272 const mergedStream = merge2(streams);
20273 streams.forEach((stream) => {
20274 stream.once('error', (error) => mergedStream.emit('error', error));
20275 });
20276 mergedStream.once('close', () => propagateCloseEventToSources(streams));
20277 mergedStream.once('end', () => propagateCloseEventToSources(streams));
20278 return mergedStream;
20279}
20280exports.merge = merge;
20281function propagateCloseEventToSources(streams) {
20282 streams.forEach((stream) => stream.emit('close'));
20283}
20284
20285
20286/***/ }),
20287/* 94 */
20288/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
20289
20290"use strict";
20291
20292/*
20293 * merge2
20294 * https://github.com/teambition/merge2
20295 *
20296 * Copyright (c) 2014-2016 Teambition
20297 * Licensed under the MIT license.
20298 */
20299const Stream = __webpack_require__(95)
20300const PassThrough = Stream.PassThrough
20301const slice = Array.prototype.slice
20302
20303module.exports = merge2
20304
20305function merge2 () {
20306 const streamsQueue = []
20307 let merging = false
20308 const args = slice.call(arguments)
20309 let options = args[args.length - 1]
20310
20311 if (options && !Array.isArray(options) && options.pipe == null) args.pop()
20312 else options = {}
20313
20314 const doEnd = options.end !== false
20315 if (options.objectMode == null) options.objectMode = true
20316 if (options.highWaterMark == null) options.highWaterMark = 64 * 1024
20317 const mergedStream = PassThrough(options)
20318
20319 function addStream () {
20320 for (let i = 0, len = arguments.length; i < len; i++) {
20321 streamsQueue.push(pauseStreams(arguments[i], options))
20322 }
20323 mergeStream()
20324 return this
20325 }
20326
20327 function mergeStream () {
20328 if (merging) return
20329 merging = true
20330
20331 let streams = streamsQueue.shift()
20332 if (!streams) {
20333 process.nextTick(endStream)
20334 return
20335 }
20336 if (!Array.isArray(streams)) streams = [streams]
20337
20338 let pipesCount = streams.length + 1
20339
20340 function next () {
20341 if (--pipesCount > 0) return
20342 merging = false
20343 mergeStream()
20344 }
20345
20346 function pipe (stream) {
20347 function onend () {
20348 stream.removeListener('merge2UnpipeEnd', onend)
20349 stream.removeListener('end', onend)
20350 next()
20351 }
20352 // skip ended stream
20353 if (stream._readableState.endEmitted) return next()
20354
20355 stream.on('merge2UnpipeEnd', onend)
20356 stream.on('end', onend)
20357 stream.pipe(mergedStream, { end: false })
20358 // compatible for old stream
20359 stream.resume()
20360 }
20361
20362 for (let i = 0; i < streams.length; i++) pipe(streams[i])
20363
20364 next()
20365 }
20366
20367 function endStream () {
20368 merging = false
20369 // emit 'queueDrain' when all streams merged.
20370 mergedStream.emit('queueDrain')
20371 return doEnd && mergedStream.end()
20372 }
20373
20374 mergedStream.setMaxListeners(0)
20375 mergedStream.add = addStream
20376 mergedStream.on('unpipe', function (stream) {
20377 stream.emit('merge2UnpipeEnd')
20378 })
20379
20380 if (args.length) addStream.apply(null, args)
20381 return mergedStream
20382}
20383
20384// check and pause streams for pipe.
20385function pauseStreams (streams, options) {
20386 if (!Array.isArray(streams)) {
20387 // Backwards-compat with old-style streams
20388 if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options))
20389 if (!streams._readableState || !streams.pause || !streams.pipe) {
20390 throw new Error('Only readable stream can be merged.')
20391 }
20392 streams.pause()
20393 } else {
20394 for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options)
20395 }
20396 return streams
20397}
20398
20399
20400/***/ }),
20401/* 95 */
20402/***/ ((module) => {
20403
20404"use strict";
20405module.exports = require("stream");;
20406
20407/***/ }),
20408/* 96 */
20409/***/ ((__unused_webpack_module, exports) => {
20410
20411"use strict";
20412
20413Object.defineProperty(exports, "__esModule", ({ value: true }));
20414exports.isEmpty = exports.isString = void 0;
20415function isString(input) {
20416 return typeof input === 'string';
20417}
20418exports.isString = isString;
20419function isEmpty(input) {
20420 return input === '';
20421}
20422exports.isEmpty = isEmpty;
20423
20424
20425/***/ }),
20426/* 97 */
20427/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20428
20429"use strict";
20430
20431Object.defineProperty(exports, "__esModule", ({ value: true }));
20432const stream_1 = __webpack_require__(98);
20433const provider_1 = __webpack_require__(125);
20434class ProviderAsync extends provider_1.default {
20435 constructor() {
20436 super(...arguments);
20437 this._reader = new stream_1.default(this._settings);
20438 }
20439 read(task) {
20440 const root = this._getRootDirectory(task);
20441 const options = this._getReaderOptions(task);
20442 const entries = [];
20443 return new Promise((resolve, reject) => {
20444 const stream = this.api(root, task, options);
20445 stream.once('error', reject);
20446 stream.on('data', (entry) => entries.push(options.transform(entry)));
20447 stream.once('end', () => resolve(entries));
20448 });
20449 }
20450 api(root, task, options) {
20451 if (task.dynamic) {
20452 return this._reader.dynamic(root, options);
20453 }
20454 return this._reader.static(task.patterns, options);
20455 }
20456}
20457exports.default = ProviderAsync;
20458
20459
20460/***/ }),
20461/* 98 */
20462/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20463
20464"use strict";
20465
20466Object.defineProperty(exports, "__esModule", ({ value: true }));
20467const stream_1 = __webpack_require__(95);
20468const fsStat = __webpack_require__(99);
20469const fsWalk = __webpack_require__(104);
20470const reader_1 = __webpack_require__(124);
20471class ReaderStream extends reader_1.default {
20472 constructor() {
20473 super(...arguments);
20474 this._walkStream = fsWalk.walkStream;
20475 this._stat = fsStat.stat;
20476 }
20477 dynamic(root, options) {
20478 return this._walkStream(root, options);
20479 }
20480 static(patterns, options) {
20481 const filepaths = patterns.map(this._getFullEntryPath, this);
20482 const stream = new stream_1.PassThrough({ objectMode: true });
20483 stream._write = (index, _enc, done) => {
20484 return this._getEntry(filepaths[index], patterns[index], options)
20485 .then((entry) => {
20486 if (entry !== null && options.entryFilter(entry)) {
20487 stream.push(entry);
20488 }
20489 if (index === filepaths.length - 1) {
20490 stream.end();
20491 }
20492 done();
20493 })
20494 .catch(done);
20495 };
20496 for (let i = 0; i < filepaths.length; i++) {
20497 stream.write(i);
20498 }
20499 return stream;
20500 }
20501 _getEntry(filepath, pattern, options) {
20502 return this._getStat(filepath)
20503 .then((stats) => this._makeEntry(stats, pattern))
20504 .catch((error) => {
20505 if (options.errorFilter(error)) {
20506 return null;
20507 }
20508 throw error;
20509 });
20510 }
20511 _getStat(filepath) {
20512 return new Promise((resolve, reject) => {
20513 this._stat(filepath, this._fsStatSettings, (error, stats) => {
20514 return error === null ? resolve(stats) : reject(error);
20515 });
20516 });
20517 }
20518}
20519exports.default = ReaderStream;
20520
20521
20522/***/ }),
20523/* 99 */
20524/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20525
20526"use strict";
20527
20528Object.defineProperty(exports, "__esModule", ({ value: true }));
20529const async = __webpack_require__(100);
20530const sync = __webpack_require__(101);
20531const settings_1 = __webpack_require__(102);
20532exports.Settings = settings_1.default;
20533function stat(path, optionsOrSettingsOrCallback, callback) {
20534 if (typeof optionsOrSettingsOrCallback === 'function') {
20535 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
20536 }
20537 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
20538}
20539exports.stat = stat;
20540function statSync(path, optionsOrSettings) {
20541 const settings = getSettings(optionsOrSettings);
20542 return sync.read(path, settings);
20543}
20544exports.statSync = statSync;
20545function getSettings(settingsOrOptions = {}) {
20546 if (settingsOrOptions instanceof settings_1.default) {
20547 return settingsOrOptions;
20548 }
20549 return new settings_1.default(settingsOrOptions);
20550}
20551
20552
20553/***/ }),
20554/* 100 */
20555/***/ ((__unused_webpack_module, exports) => {
20556
20557"use strict";
20558
20559Object.defineProperty(exports, "__esModule", ({ value: true }));
20560function read(path, settings, callback) {
20561 settings.fs.lstat(path, (lstatError, lstat) => {
20562 if (lstatError !== null) {
20563 return callFailureCallback(callback, lstatError);
20564 }
20565 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
20566 return callSuccessCallback(callback, lstat);
20567 }
20568 settings.fs.stat(path, (statError, stat) => {
20569 if (statError !== null) {
20570 if (settings.throwErrorOnBrokenSymbolicLink) {
20571 return callFailureCallback(callback, statError);
20572 }
20573 return callSuccessCallback(callback, lstat);
20574 }
20575 if (settings.markSymbolicLink) {
20576 stat.isSymbolicLink = () => true;
20577 }
20578 callSuccessCallback(callback, stat);
20579 });
20580 });
20581}
20582exports.read = read;
20583function callFailureCallback(callback, error) {
20584 callback(error);
20585}
20586function callSuccessCallback(callback, result) {
20587 callback(null, result);
20588}
20589
20590
20591/***/ }),
20592/* 101 */
20593/***/ ((__unused_webpack_module, exports) => {
20594
20595"use strict";
20596
20597Object.defineProperty(exports, "__esModule", ({ value: true }));
20598function read(path, settings) {
20599 const lstat = settings.fs.lstatSync(path);
20600 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
20601 return lstat;
20602 }
20603 try {
20604 const stat = settings.fs.statSync(path);
20605 if (settings.markSymbolicLink) {
20606 stat.isSymbolicLink = () => true;
20607 }
20608 return stat;
20609 }
20610 catch (error) {
20611 if (!settings.throwErrorOnBrokenSymbolicLink) {
20612 return lstat;
20613 }
20614 throw error;
20615 }
20616}
20617exports.read = read;
20618
20619
20620/***/ }),
20621/* 102 */
20622/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20623
20624"use strict";
20625
20626Object.defineProperty(exports, "__esModule", ({ value: true }));
20627const fs = __webpack_require__(103);
20628class Settings {
20629 constructor(_options = {}) {
20630 this._options = _options;
20631 this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
20632 this.fs = fs.createFileSystemAdapter(this._options.fs);
20633 this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
20634 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
20635 }
20636 _getValue(option, value) {
20637 return option === undefined ? value : option;
20638 }
20639}
20640exports.default = Settings;
20641
20642
20643/***/ }),
20644/* 103 */
20645/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20646
20647"use strict";
20648
20649Object.defineProperty(exports, "__esModule", ({ value: true }));
20650const fs = __webpack_require__(40);
20651exports.FILE_SYSTEM_ADAPTER = {
20652 lstat: fs.lstat,
20653 stat: fs.stat,
20654 lstatSync: fs.lstatSync,
20655 statSync: fs.statSync
20656};
20657function createFileSystemAdapter(fsMethods) {
20658 if (fsMethods === undefined) {
20659 return exports.FILE_SYSTEM_ADAPTER;
20660 }
20661 return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
20662}
20663exports.createFileSystemAdapter = createFileSystemAdapter;
20664
20665
20666/***/ }),
20667/* 104 */
20668/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20669
20670"use strict";
20671
20672Object.defineProperty(exports, "__esModule", ({ value: true }));
20673const async_1 = __webpack_require__(105);
20674const stream_1 = __webpack_require__(120);
20675const sync_1 = __webpack_require__(121);
20676const settings_1 = __webpack_require__(123);
20677exports.Settings = settings_1.default;
20678function walk(directory, optionsOrSettingsOrCallback, callback) {
20679 if (typeof optionsOrSettingsOrCallback === 'function') {
20680 return new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
20681 }
20682 new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
20683}
20684exports.walk = walk;
20685function walkSync(directory, optionsOrSettings) {
20686 const settings = getSettings(optionsOrSettings);
20687 const provider = new sync_1.default(directory, settings);
20688 return provider.read();
20689}
20690exports.walkSync = walkSync;
20691function walkStream(directory, optionsOrSettings) {
20692 const settings = getSettings(optionsOrSettings);
20693 const provider = new stream_1.default(directory, settings);
20694 return provider.read();
20695}
20696exports.walkStream = walkStream;
20697function getSettings(settingsOrOptions = {}) {
20698 if (settingsOrOptions instanceof settings_1.default) {
20699 return settingsOrOptions;
20700 }
20701 return new settings_1.default(settingsOrOptions);
20702}
20703
20704
20705/***/ }),
20706/* 105 */
20707/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20708
20709"use strict";
20710
20711Object.defineProperty(exports, "__esModule", ({ value: true }));
20712const async_1 = __webpack_require__(106);
20713class AsyncProvider {
20714 constructor(_root, _settings) {
20715 this._root = _root;
20716 this._settings = _settings;
20717 this._reader = new async_1.default(this._root, this._settings);
20718 this._storage = new Set();
20719 }
20720 read(callback) {
20721 this._reader.onError((error) => {
20722 callFailureCallback(callback, error);
20723 });
20724 this._reader.onEntry((entry) => {
20725 this._storage.add(entry);
20726 });
20727 this._reader.onEnd(() => {
20728 callSuccessCallback(callback, [...this._storage]);
20729 });
20730 this._reader.read();
20731 }
20732}
20733exports.default = AsyncProvider;
20734function callFailureCallback(callback, error) {
20735 callback(error);
20736}
20737function callSuccessCallback(callback, entries) {
20738 callback(null, entries);
20739}
20740
20741
20742/***/ }),
20743/* 106 */
20744/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20745
20746"use strict";
20747
20748Object.defineProperty(exports, "__esModule", ({ value: true }));
20749const events_1 = __webpack_require__(51);
20750const fsScandir = __webpack_require__(107);
20751const fastq = __webpack_require__(116);
20752const common = __webpack_require__(118);
20753const reader_1 = __webpack_require__(119);
20754class AsyncReader extends reader_1.default {
20755 constructor(_root, _settings) {
20756 super(_root, _settings);
20757 this._settings = _settings;
20758 this._scandir = fsScandir.scandir;
20759 this._emitter = new events_1.EventEmitter();
20760 this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
20761 this._isFatalError = false;
20762 this._isDestroyed = false;
20763 this._queue.drain = () => {
20764 if (!this._isFatalError) {
20765 this._emitter.emit('end');
20766 }
20767 };
20768 }
20769 read() {
20770 this._isFatalError = false;
20771 this._isDestroyed = false;
20772 setImmediate(() => {
20773 this._pushToQueue(this._root, this._settings.basePath);
20774 });
20775 return this._emitter;
20776 }
20777 destroy() {
20778 if (this._isDestroyed) {
20779 throw new Error('The reader is already destroyed');
20780 }
20781 this._isDestroyed = true;
20782 this._queue.killAndDrain();
20783 }
20784 onEntry(callback) {
20785 this._emitter.on('entry', callback);
20786 }
20787 onError(callback) {
20788 this._emitter.once('error', callback);
20789 }
20790 onEnd(callback) {
20791 this._emitter.once('end', callback);
20792 }
20793 _pushToQueue(directory, base) {
20794 const queueItem = { directory, base };
20795 this._queue.push(queueItem, (error) => {
20796 if (error !== null) {
20797 this._handleError(error);
20798 }
20799 });
20800 }
20801 _worker(item, done) {
20802 this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
20803 if (error !== null) {
20804 return done(error, undefined);
20805 }
20806 for (const entry of entries) {
20807 this._handleEntry(entry, item.base);
20808 }
20809 done(null, undefined);
20810 });
20811 }
20812 _handleError(error) {
20813 if (!common.isFatalError(this._settings, error)) {
20814 return;
20815 }
20816 this._isFatalError = true;
20817 this._isDestroyed = true;
20818 this._emitter.emit('error', error);
20819 }
20820 _handleEntry(entry, base) {
20821 if (this._isDestroyed || this._isFatalError) {
20822 return;
20823 }
20824 const fullpath = entry.path;
20825 if (base !== undefined) {
20826 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
20827 }
20828 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
20829 this._emitEntry(entry);
20830 }
20831 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
20832 this._pushToQueue(fullpath, entry.path);
20833 }
20834 }
20835 _emitEntry(entry) {
20836 this._emitter.emit('entry', entry);
20837 }
20838}
20839exports.default = AsyncReader;
20840
20841
20842/***/ }),
20843/* 107 */
20844/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20845
20846"use strict";
20847
20848Object.defineProperty(exports, "__esModule", ({ value: true }));
20849const async = __webpack_require__(108);
20850const sync = __webpack_require__(113);
20851const settings_1 = __webpack_require__(114);
20852exports.Settings = settings_1.default;
20853function scandir(path, optionsOrSettingsOrCallback, callback) {
20854 if (typeof optionsOrSettingsOrCallback === 'function') {
20855 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
20856 }
20857 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
20858}
20859exports.scandir = scandir;
20860function scandirSync(path, optionsOrSettings) {
20861 const settings = getSettings(optionsOrSettings);
20862 return sync.read(path, settings);
20863}
20864exports.scandirSync = scandirSync;
20865function getSettings(settingsOrOptions = {}) {
20866 if (settingsOrOptions instanceof settings_1.default) {
20867 return settingsOrOptions;
20868 }
20869 return new settings_1.default(settingsOrOptions);
20870}
20871
20872
20873/***/ }),
20874/* 108 */
20875/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
20876
20877"use strict";
20878
20879Object.defineProperty(exports, "__esModule", ({ value: true }));
20880const fsStat = __webpack_require__(99);
20881const rpl = __webpack_require__(109);
20882const constants_1 = __webpack_require__(110);
20883const utils = __webpack_require__(111);
20884function read(directory, settings, callback) {
20885 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
20886 return readdirWithFileTypes(directory, settings, callback);
20887 }
20888 return readdir(directory, settings, callback);
20889}
20890exports.read = read;
20891function readdirWithFileTypes(directory, settings, callback) {
20892 settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
20893 if (readdirError !== null) {
20894 return callFailureCallback(callback, readdirError);
20895 }
20896 const entries = dirents.map((dirent) => ({
20897 dirent,
20898 name: dirent.name,
20899 path: `${directory}${settings.pathSegmentSeparator}${dirent.name}`
20900 }));
20901 if (!settings.followSymbolicLinks) {
20902 return callSuccessCallback(callback, entries);
20903 }
20904 const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
20905 rpl(tasks, (rplError, rplEntries) => {
20906 if (rplError !== null) {
20907 return callFailureCallback(callback, rplError);
20908 }
20909 callSuccessCallback(callback, rplEntries);
20910 });
20911 });
20912}
20913exports.readdirWithFileTypes = readdirWithFileTypes;
20914function makeRplTaskEntry(entry, settings) {
20915 return (done) => {
20916 if (!entry.dirent.isSymbolicLink()) {
20917 return done(null, entry);
20918 }
20919 settings.fs.stat(entry.path, (statError, stats) => {
20920 if (statError !== null) {
20921 if (settings.throwErrorOnBrokenSymbolicLink) {
20922 return done(statError);
20923 }
20924 return done(null, entry);
20925 }
20926 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
20927 return done(null, entry);
20928 });
20929 };
20930}
20931function readdir(directory, settings, callback) {
20932 settings.fs.readdir(directory, (readdirError, names) => {
20933 if (readdirError !== null) {
20934 return callFailureCallback(callback, readdirError);
20935 }
20936 const filepaths = names.map((name) => `${directory}${settings.pathSegmentSeparator}${name}`);
20937 const tasks = filepaths.map((filepath) => {
20938 return (done) => fsStat.stat(filepath, settings.fsStatSettings, done);
20939 });
20940 rpl(tasks, (rplError, results) => {
20941 if (rplError !== null) {
20942 return callFailureCallback(callback, rplError);
20943 }
20944 const entries = [];
20945 names.forEach((name, index) => {
20946 const stats = results[index];
20947 const entry = {
20948 name,
20949 path: filepaths[index],
20950 dirent: utils.fs.createDirentFromStats(name, stats)
20951 };
20952 if (settings.stats) {
20953 entry.stats = stats;
20954 }
20955 entries.push(entry);
20956 });
20957 callSuccessCallback(callback, entries);
20958 });
20959 });
20960}
20961exports.readdir = readdir;
20962function callFailureCallback(callback, error) {
20963 callback(error);
20964}
20965function callSuccessCallback(callback, result) {
20966 callback(null, result);
20967}
20968
20969
20970/***/ }),
20971/* 109 */
20972/***/ ((module) => {
20973
20974module.exports = runParallel
20975
20976function runParallel (tasks, cb) {
20977 var results, pending, keys
20978 var isSync = true
20979
20980 if (Array.isArray(tasks)) {
20981 results = []
20982 pending = tasks.length
20983 } else {
20984 keys = Object.keys(tasks)
20985 results = {}
20986 pending = keys.length
20987 }
20988
20989 function done (err) {
20990 function end () {
20991 if (cb) cb(err, results)
20992 cb = null
20993 }
20994 if (isSync) process.nextTick(end)
20995 else end()
20996 }
20997
20998 function each (i, err, result) {
20999 results[i] = result
21000 if (--pending === 0 || err) {
21001 done(err)
21002 }
21003 }
21004
21005 if (!pending) {
21006 // empty
21007 done(null)
21008 } else if (keys) {
21009 // object
21010 keys.forEach(function (key) {
21011 tasks[key](function (err, result) { each(key, err, result) })
21012 })
21013 } else {
21014 // array
21015 tasks.forEach(function (task, i) {
21016 task(function (err, result) { each(i, err, result) })
21017 })
21018 }
21019
21020 isSync = false
21021}
21022
21023
21024/***/ }),
21025/* 110 */
21026/***/ ((__unused_webpack_module, exports) => {
21027
21028"use strict";
21029
21030Object.defineProperty(exports, "__esModule", ({ value: true }));
21031const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
21032const MAJOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
21033const MINOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
21034const SUPPORTED_MAJOR_VERSION = 10;
21035const SUPPORTED_MINOR_VERSION = 10;
21036const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
21037const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
21038/**
21039 * IS `true` for Node.js 10.10 and greater.
21040 */
21041exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
21042
21043
21044/***/ }),
21045/* 111 */
21046/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21047
21048"use strict";
21049
21050Object.defineProperty(exports, "__esModule", ({ value: true }));
21051const fs = __webpack_require__(112);
21052exports.fs = fs;
21053
21054
21055/***/ }),
21056/* 112 */
21057/***/ ((__unused_webpack_module, exports) => {
21058
21059"use strict";
21060
21061Object.defineProperty(exports, "__esModule", ({ value: true }));
21062class DirentFromStats {
21063 constructor(name, stats) {
21064 this.name = name;
21065 this.isBlockDevice = stats.isBlockDevice.bind(stats);
21066 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
21067 this.isDirectory = stats.isDirectory.bind(stats);
21068 this.isFIFO = stats.isFIFO.bind(stats);
21069 this.isFile = stats.isFile.bind(stats);
21070 this.isSocket = stats.isSocket.bind(stats);
21071 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
21072 }
21073}
21074function createDirentFromStats(name, stats) {
21075 return new DirentFromStats(name, stats);
21076}
21077exports.createDirentFromStats = createDirentFromStats;
21078
21079
21080/***/ }),
21081/* 113 */
21082/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21083
21084"use strict";
21085
21086Object.defineProperty(exports, "__esModule", ({ value: true }));
21087const fsStat = __webpack_require__(99);
21088const constants_1 = __webpack_require__(110);
21089const utils = __webpack_require__(111);
21090function read(directory, settings) {
21091 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
21092 return readdirWithFileTypes(directory, settings);
21093 }
21094 return readdir(directory, settings);
21095}
21096exports.read = read;
21097function readdirWithFileTypes(directory, settings) {
21098 const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
21099 return dirents.map((dirent) => {
21100 const entry = {
21101 dirent,
21102 name: dirent.name,
21103 path: `${directory}${settings.pathSegmentSeparator}${dirent.name}`
21104 };
21105 if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
21106 try {
21107 const stats = settings.fs.statSync(entry.path);
21108 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
21109 }
21110 catch (error) {
21111 if (settings.throwErrorOnBrokenSymbolicLink) {
21112 throw error;
21113 }
21114 }
21115 }
21116 return entry;
21117 });
21118}
21119exports.readdirWithFileTypes = readdirWithFileTypes;
21120function readdir(directory, settings) {
21121 const names = settings.fs.readdirSync(directory);
21122 return names.map((name) => {
21123 const entryPath = `${directory}${settings.pathSegmentSeparator}${name}`;
21124 const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
21125 const entry = {
21126 name,
21127 path: entryPath,
21128 dirent: utils.fs.createDirentFromStats(name, stats)
21129 };
21130 if (settings.stats) {
21131 entry.stats = stats;
21132 }
21133 return entry;
21134 });
21135}
21136exports.readdir = readdir;
21137
21138
21139/***/ }),
21140/* 114 */
21141/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21142
21143"use strict";
21144
21145Object.defineProperty(exports, "__esModule", ({ value: true }));
21146const path = __webpack_require__(13);
21147const fsStat = __webpack_require__(99);
21148const fs = __webpack_require__(115);
21149class Settings {
21150 constructor(_options = {}) {
21151 this._options = _options;
21152 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
21153 this.fs = fs.createFileSystemAdapter(this._options.fs);
21154 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
21155 this.stats = this._getValue(this._options.stats, false);
21156 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
21157 this.fsStatSettings = new fsStat.Settings({
21158 followSymbolicLink: this.followSymbolicLinks,
21159 fs: this.fs,
21160 throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
21161 });
21162 }
21163 _getValue(option, value) {
21164 return option === undefined ? value : option;
21165 }
21166}
21167exports.default = Settings;
21168
21169
21170/***/ }),
21171/* 115 */
21172/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21173
21174"use strict";
21175
21176Object.defineProperty(exports, "__esModule", ({ value: true }));
21177const fs = __webpack_require__(40);
21178exports.FILE_SYSTEM_ADAPTER = {
21179 lstat: fs.lstat,
21180 stat: fs.stat,
21181 lstatSync: fs.lstatSync,
21182 statSync: fs.statSync,
21183 readdir: fs.readdir,
21184 readdirSync: fs.readdirSync
21185};
21186function createFileSystemAdapter(fsMethods) {
21187 if (fsMethods === undefined) {
21188 return exports.FILE_SYSTEM_ADAPTER;
21189 }
21190 return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
21191}
21192exports.createFileSystemAdapter = createFileSystemAdapter;
21193
21194
21195/***/ }),
21196/* 116 */
21197/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
21198
21199"use strict";
21200
21201
21202var reusify = __webpack_require__(117)
21203
21204function fastqueue (context, worker, concurrency) {
21205 if (typeof context === 'function') {
21206 concurrency = worker
21207 worker = context
21208 context = null
21209 }
21210
21211 var cache = reusify(Task)
21212 var queueHead = null
21213 var queueTail = null
21214 var _running = 0
21215
21216 var self = {
21217 push: push,
21218 drain: noop,
21219 saturated: noop,
21220 pause: pause,
21221 paused: false,
21222 concurrency: concurrency,
21223 running: running,
21224 resume: resume,
21225 idle: idle,
21226 length: length,
21227 unshift: unshift,
21228 empty: noop,
21229 kill: kill,
21230 killAndDrain: killAndDrain
21231 }
21232
21233 return self
21234
21235 function running () {
21236 return _running
21237 }
21238
21239 function pause () {
21240 self.paused = true
21241 }
21242
21243 function length () {
21244 var current = queueHead
21245 var counter = 0
21246
21247 while (current) {
21248 current = current.next
21249 counter++
21250 }
21251
21252 return counter
21253 }
21254
21255 function resume () {
21256 if (!self.paused) return
21257 self.paused = false
21258 for (var i = 0; i < self.concurrency; i++) {
21259 _running++
21260 release()
21261 }
21262 }
21263
21264 function idle () {
21265 return _running === 0 && self.length() === 0
21266 }
21267
21268 function push (value, done) {
21269 var current = cache.get()
21270
21271 current.context = context
21272 current.release = release
21273 current.value = value
21274 current.callback = done || noop
21275
21276 if (_running === self.concurrency || self.paused) {
21277 if (queueTail) {
21278 queueTail.next = current
21279 queueTail = current
21280 } else {
21281 queueHead = current
21282 queueTail = current
21283 self.saturated()
21284 }
21285 } else {
21286 _running++
21287 worker.call(context, current.value, current.worked)
21288 }
21289 }
21290
21291 function unshift (value, done) {
21292 var current = cache.get()
21293
21294 current.context = context
21295 current.release = release
21296 current.value = value
21297 current.callback = done || noop
21298
21299 if (_running === self.concurrency || self.paused) {
21300 if (queueHead) {
21301 current.next = queueHead
21302 queueHead = current
21303 } else {
21304 queueHead = current
21305 queueTail = current
21306 self.saturated()
21307 }
21308 } else {
21309 _running++
21310 worker.call(context, current.value, current.worked)
21311 }
21312 }
21313
21314 function release (holder) {
21315 if (holder) {
21316 cache.release(holder)
21317 }
21318 var next = queueHead
21319 if (next) {
21320 if (!self.paused) {
21321 if (queueTail === queueHead) {
21322 queueTail = null
21323 }
21324 queueHead = next.next
21325 next.next = null
21326 worker.call(context, next.value, next.worked)
21327 if (queueTail === null) {
21328 self.empty()
21329 }
21330 } else {
21331 _running--
21332 }
21333 } else if (--_running === 0) {
21334 self.drain()
21335 }
21336 }
21337
21338 function kill () {
21339 queueHead = null
21340 queueTail = null
21341 self.drain = noop
21342 }
21343
21344 function killAndDrain () {
21345 queueHead = null
21346 queueTail = null
21347 self.drain()
21348 self.drain = noop
21349 }
21350}
21351
21352function noop () {}
21353
21354function Task () {
21355 this.value = null
21356 this.callback = noop
21357 this.next = null
21358 this.release = noop
21359 this.context = null
21360
21361 var self = this
21362
21363 this.worked = function worked (err, result) {
21364 var callback = self.callback
21365 self.value = null
21366 self.callback = noop
21367 callback.call(self.context, err, result)
21368 self.release(self)
21369 }
21370}
21371
21372module.exports = fastqueue
21373
21374
21375/***/ }),
21376/* 117 */
21377/***/ ((module) => {
21378
21379"use strict";
21380
21381
21382function reusify (Constructor) {
21383 var head = new Constructor()
21384 var tail = head
21385
21386 function get () {
21387 var current = head
21388
21389 if (current.next) {
21390 head = current.next
21391 } else {
21392 head = new Constructor()
21393 tail = head
21394 }
21395
21396 current.next = null
21397
21398 return current
21399 }
21400
21401 function release (obj) {
21402 tail.next = obj
21403 tail = obj
21404 }
21405
21406 return {
21407 get: get,
21408 release: release
21409 }
21410}
21411
21412module.exports = reusify
21413
21414
21415/***/ }),
21416/* 118 */
21417/***/ ((__unused_webpack_module, exports) => {
21418
21419"use strict";
21420
21421Object.defineProperty(exports, "__esModule", ({ value: true }));
21422function isFatalError(settings, error) {
21423 if (settings.errorFilter === null) {
21424 return true;
21425 }
21426 return !settings.errorFilter(error);
21427}
21428exports.isFatalError = isFatalError;
21429function isAppliedFilter(filter, value) {
21430 return filter === null || filter(value);
21431}
21432exports.isAppliedFilter = isAppliedFilter;
21433function replacePathSegmentSeparator(filepath, separator) {
21434 return filepath.split(/[\\/]/).join(separator);
21435}
21436exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
21437function joinPathSegments(a, b, separator) {
21438 if (a === '') {
21439 return b;
21440 }
21441 return a + separator + b;
21442}
21443exports.joinPathSegments = joinPathSegments;
21444
21445
21446/***/ }),
21447/* 119 */
21448/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21449
21450"use strict";
21451
21452Object.defineProperty(exports, "__esModule", ({ value: true }));
21453const common = __webpack_require__(118);
21454class Reader {
21455 constructor(_root, _settings) {
21456 this._root = _root;
21457 this._settings = _settings;
21458 this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
21459 }
21460}
21461exports.default = Reader;
21462
21463
21464/***/ }),
21465/* 120 */
21466/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21467
21468"use strict";
21469
21470Object.defineProperty(exports, "__esModule", ({ value: true }));
21471const stream_1 = __webpack_require__(95);
21472const async_1 = __webpack_require__(106);
21473class StreamProvider {
21474 constructor(_root, _settings) {
21475 this._root = _root;
21476 this._settings = _settings;
21477 this._reader = new async_1.default(this._root, this._settings);
21478 this._stream = new stream_1.Readable({
21479 objectMode: true,
21480 read: () => { },
21481 destroy: this._reader.destroy.bind(this._reader)
21482 });
21483 }
21484 read() {
21485 this._reader.onError((error) => {
21486 this._stream.emit('error', error);
21487 });
21488 this._reader.onEntry((entry) => {
21489 this._stream.push(entry);
21490 });
21491 this._reader.onEnd(() => {
21492 this._stream.push(null);
21493 });
21494 this._reader.read();
21495 return this._stream;
21496 }
21497}
21498exports.default = StreamProvider;
21499
21500
21501/***/ }),
21502/* 121 */
21503/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21504
21505"use strict";
21506
21507Object.defineProperty(exports, "__esModule", ({ value: true }));
21508const sync_1 = __webpack_require__(122);
21509class SyncProvider {
21510 constructor(_root, _settings) {
21511 this._root = _root;
21512 this._settings = _settings;
21513 this._reader = new sync_1.default(this._root, this._settings);
21514 }
21515 read() {
21516 return this._reader.read();
21517 }
21518}
21519exports.default = SyncProvider;
21520
21521
21522/***/ }),
21523/* 122 */
21524/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21525
21526"use strict";
21527
21528Object.defineProperty(exports, "__esModule", ({ value: true }));
21529const fsScandir = __webpack_require__(107);
21530const common = __webpack_require__(118);
21531const reader_1 = __webpack_require__(119);
21532class SyncReader extends reader_1.default {
21533 constructor() {
21534 super(...arguments);
21535 this._scandir = fsScandir.scandirSync;
21536 this._storage = new Set();
21537 this._queue = new Set();
21538 }
21539 read() {
21540 this._pushToQueue(this._root, this._settings.basePath);
21541 this._handleQueue();
21542 return [...this._storage];
21543 }
21544 _pushToQueue(directory, base) {
21545 this._queue.add({ directory, base });
21546 }
21547 _handleQueue() {
21548 for (const item of this._queue.values()) {
21549 this._handleDirectory(item.directory, item.base);
21550 }
21551 }
21552 _handleDirectory(directory, base) {
21553 try {
21554 const entries = this._scandir(directory, this._settings.fsScandirSettings);
21555 for (const entry of entries) {
21556 this._handleEntry(entry, base);
21557 }
21558 }
21559 catch (error) {
21560 this._handleError(error);
21561 }
21562 }
21563 _handleError(error) {
21564 if (!common.isFatalError(this._settings, error)) {
21565 return;
21566 }
21567 throw error;
21568 }
21569 _handleEntry(entry, base) {
21570 const fullpath = entry.path;
21571 if (base !== undefined) {
21572 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
21573 }
21574 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
21575 this._pushToStorage(entry);
21576 }
21577 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
21578 this._pushToQueue(fullpath, entry.path);
21579 }
21580 }
21581 _pushToStorage(entry) {
21582 this._storage.add(entry);
21583 }
21584}
21585exports.default = SyncReader;
21586
21587
21588/***/ }),
21589/* 123 */
21590/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21591
21592"use strict";
21593
21594Object.defineProperty(exports, "__esModule", ({ value: true }));
21595const path = __webpack_require__(13);
21596const fsScandir = __webpack_require__(107);
21597class Settings {
21598 constructor(_options = {}) {
21599 this._options = _options;
21600 this.basePath = this._getValue(this._options.basePath, undefined);
21601 this.concurrency = this._getValue(this._options.concurrency, Infinity);
21602 this.deepFilter = this._getValue(this._options.deepFilter, null);
21603 this.entryFilter = this._getValue(this._options.entryFilter, null);
21604 this.errorFilter = this._getValue(this._options.errorFilter, null);
21605 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
21606 this.fsScandirSettings = new fsScandir.Settings({
21607 followSymbolicLinks: this._options.followSymbolicLinks,
21608 fs: this._options.fs,
21609 pathSegmentSeparator: this._options.pathSegmentSeparator,
21610 stats: this._options.stats,
21611 throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
21612 });
21613 }
21614 _getValue(option, value) {
21615 return option === undefined ? value : option;
21616 }
21617}
21618exports.default = Settings;
21619
21620
21621/***/ }),
21622/* 124 */
21623/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21624
21625"use strict";
21626
21627Object.defineProperty(exports, "__esModule", ({ value: true }));
21628const path = __webpack_require__(13);
21629const fsStat = __webpack_require__(99);
21630const utils = __webpack_require__(61);
21631class Reader {
21632 constructor(_settings) {
21633 this._settings = _settings;
21634 this._fsStatSettings = new fsStat.Settings({
21635 followSymbolicLink: this._settings.followSymbolicLinks,
21636 fs: this._settings.fs,
21637 throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
21638 });
21639 }
21640 _getFullEntryPath(filepath) {
21641 return path.resolve(this._settings.cwd, filepath);
21642 }
21643 _makeEntry(stats, pattern) {
21644 const entry = {
21645 name: pattern,
21646 path: pattern,
21647 dirent: utils.fs.createDirentFromStats(pattern, stats)
21648 };
21649 if (this._settings.stats) {
21650 entry.stats = stats;
21651 }
21652 return entry;
21653 }
21654 _isFatalError(error) {
21655 return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
21656 }
21657}
21658exports.default = Reader;
21659
21660
21661/***/ }),
21662/* 125 */
21663/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21664
21665"use strict";
21666
21667Object.defineProperty(exports, "__esModule", ({ value: true }));
21668const path = __webpack_require__(13);
21669const deep_1 = __webpack_require__(126);
21670const entry_1 = __webpack_require__(129);
21671const error_1 = __webpack_require__(130);
21672const entry_2 = __webpack_require__(131);
21673class Provider {
21674 constructor(_settings) {
21675 this._settings = _settings;
21676 this.errorFilter = new error_1.default(this._settings);
21677 this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
21678 this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
21679 this.entryTransformer = new entry_2.default(this._settings);
21680 }
21681 _getRootDirectory(task) {
21682 return path.resolve(this._settings.cwd, task.base);
21683 }
21684 _getReaderOptions(task) {
21685 const basePath = task.base === '.' ? '' : task.base;
21686 return {
21687 basePath,
21688 pathSegmentSeparator: '/',
21689 concurrency: this._settings.concurrency,
21690 deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
21691 entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
21692 errorFilter: this.errorFilter.getFilter(),
21693 followSymbolicLinks: this._settings.followSymbolicLinks,
21694 fs: this._settings.fs,
21695 stats: this._settings.stats,
21696 throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
21697 transform: this.entryTransformer.getTransformer()
21698 };
21699 }
21700 _getMicromatchOptions() {
21701 return {
21702 dot: this._settings.dot,
21703 matchBase: this._settings.baseNameMatch,
21704 nobrace: !this._settings.braceExpansion,
21705 nocase: !this._settings.caseSensitiveMatch,
21706 noext: !this._settings.extglob,
21707 noglobstar: !this._settings.globstar,
21708 posix: true,
21709 strictSlashes: false
21710 };
21711 }
21712}
21713exports.default = Provider;
21714
21715
21716/***/ }),
21717/* 126 */
21718/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21719
21720"use strict";
21721
21722Object.defineProperty(exports, "__esModule", ({ value: true }));
21723const utils = __webpack_require__(61);
21724const partial_1 = __webpack_require__(127);
21725class DeepFilter {
21726 constructor(_settings, _micromatchOptions) {
21727 this._settings = _settings;
21728 this._micromatchOptions = _micromatchOptions;
21729 }
21730 getFilter(basePath, positive, negative) {
21731 const matcher = this._getMatcher(positive);
21732 const negativeRe = this._getNegativePatternsRe(negative);
21733 return (entry) => this._filter(basePath, entry, matcher, negativeRe);
21734 }
21735 _getMatcher(patterns) {
21736 return new partial_1.default(patterns, this._settings, this._micromatchOptions);
21737 }
21738 _getNegativePatternsRe(patterns) {
21739 const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
21740 return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
21741 }
21742 _filter(basePath, entry, matcher, negativeRe) {
21743 if (this._isSkippedByDeep(basePath, entry.path)) {
21744 return false;
21745 }
21746 if (this._isSkippedSymbolicLink(entry)) {
21747 return false;
21748 }
21749 const filepath = utils.path.removeLeadingDotSegment(entry.path);
21750 if (this._isSkippedByPositivePatterns(filepath, matcher)) {
21751 return false;
21752 }
21753 return this._isSkippedByNegativePatterns(filepath, negativeRe);
21754 }
21755 _isSkippedByDeep(basePath, entryPath) {
21756 /**
21757 * Avoid unnecessary depth calculations when it doesn't matter.
21758 */
21759 if (this._settings.deep === Infinity) {
21760 return false;
21761 }
21762 return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
21763 }
21764 _getEntryLevel(basePath, entryPath) {
21765 const entryPathDepth = entryPath.split('/').length;
21766 if (basePath === '') {
21767 return entryPathDepth;
21768 }
21769 const basePathDepth = basePath.split('/').length;
21770 return entryPathDepth - basePathDepth;
21771 }
21772 _isSkippedSymbolicLink(entry) {
21773 return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
21774 }
21775 _isSkippedByPositivePatterns(entryPath, matcher) {
21776 return !this._settings.baseNameMatch && !matcher.match(entryPath);
21777 }
21778 _isSkippedByNegativePatterns(entryPath, patternsRe) {
21779 return !utils.pattern.matchAny(entryPath, patternsRe);
21780 }
21781}
21782exports.default = DeepFilter;
21783
21784
21785/***/ }),
21786/* 127 */
21787/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21788
21789"use strict";
21790
21791Object.defineProperty(exports, "__esModule", ({ value: true }));
21792const matcher_1 = __webpack_require__(128);
21793class PartialMatcher extends matcher_1.default {
21794 match(filepath) {
21795 const parts = filepath.split('/');
21796 const levels = parts.length;
21797 const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
21798 for (const pattern of patterns) {
21799 const section = pattern.sections[0];
21800 /**
21801 * In this case, the pattern has a globstar and we must read all directories unconditionally,
21802 * but only if the level has reached the end of the first group.
21803 *
21804 * fixtures/{a,b}/**
21805 * ^ true/false ^ always true
21806 */
21807 if (!pattern.complete && levels > section.length) {
21808 return true;
21809 }
21810 const match = parts.every((part, index) => {
21811 const segment = pattern.segments[index];
21812 if (segment.dynamic && segment.patternRe.test(part)) {
21813 return true;
21814 }
21815 if (!segment.dynamic && segment.pattern === part) {
21816 return true;
21817 }
21818 return false;
21819 });
21820 if (match) {
21821 return true;
21822 }
21823 }
21824 return false;
21825 }
21826}
21827exports.default = PartialMatcher;
21828
21829
21830/***/ }),
21831/* 128 */
21832/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21833
21834"use strict";
21835
21836Object.defineProperty(exports, "__esModule", ({ value: true }));
21837const utils = __webpack_require__(61);
21838class Matcher {
21839 constructor(_patterns, _settings, _micromatchOptions) {
21840 this._patterns = _patterns;
21841 this._settings = _settings;
21842 this._micromatchOptions = _micromatchOptions;
21843 this._storage = [];
21844 this._fillStorage();
21845 }
21846 _fillStorage() {
21847 /**
21848 * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
21849 * So, before expand patterns with brace expansion into separated patterns.
21850 */
21851 const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns);
21852 for (const pattern of patterns) {
21853 const segments = this._getPatternSegments(pattern);
21854 const sections = this._splitSegmentsIntoSections(segments);
21855 this._storage.push({
21856 complete: sections.length <= 1,
21857 pattern,
21858 segments,
21859 sections
21860 });
21861 }
21862 }
21863 _getPatternSegments(pattern) {
21864 const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
21865 return parts.map((part) => {
21866 const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
21867 if (!dynamic) {
21868 return {
21869 dynamic: false,
21870 pattern: part
21871 };
21872 }
21873 return {
21874 dynamic: true,
21875 pattern: part,
21876 patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
21877 };
21878 });
21879 }
21880 _splitSegmentsIntoSections(segments) {
21881 return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
21882 }
21883}
21884exports.default = Matcher;
21885
21886
21887/***/ }),
21888/* 129 */
21889/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21890
21891"use strict";
21892
21893Object.defineProperty(exports, "__esModule", ({ value: true }));
21894const utils = __webpack_require__(61);
21895class EntryFilter {
21896 constructor(_settings, _micromatchOptions) {
21897 this._settings = _settings;
21898 this._micromatchOptions = _micromatchOptions;
21899 this.index = new Map();
21900 }
21901 getFilter(positive, negative) {
21902 const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
21903 const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
21904 return (entry) => this._filter(entry, positiveRe, negativeRe);
21905 }
21906 _filter(entry, positiveRe, negativeRe) {
21907 if (this._settings.unique && this._isDuplicateEntry(entry)) {
21908 return false;
21909 }
21910 if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
21911 return false;
21912 }
21913 if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) {
21914 return false;
21915 }
21916 const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
21917 const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
21918 if (this._settings.unique && isMatched) {
21919 this._createIndexRecord(entry);
21920 }
21921 return isMatched;
21922 }
21923 _isDuplicateEntry(entry) {
21924 return this.index.has(entry.path);
21925 }
21926 _createIndexRecord(entry) {
21927 this.index.set(entry.path, undefined);
21928 }
21929 _onlyFileFilter(entry) {
21930 return this._settings.onlyFiles && !entry.dirent.isFile();
21931 }
21932 _onlyDirectoryFilter(entry) {
21933 return this._settings.onlyDirectories && !entry.dirent.isDirectory();
21934 }
21935 _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
21936 if (!this._settings.absolute) {
21937 return false;
21938 }
21939 const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
21940 return utils.pattern.matchAny(fullpath, patternsRe);
21941 }
21942 _isMatchToPatterns(entryPath, patternsRe) {
21943 const filepath = utils.path.removeLeadingDotSegment(entryPath);
21944 return utils.pattern.matchAny(filepath, patternsRe);
21945 }
21946}
21947exports.default = EntryFilter;
21948
21949
21950/***/ }),
21951/* 130 */
21952/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21953
21954"use strict";
21955
21956Object.defineProperty(exports, "__esModule", ({ value: true }));
21957const utils = __webpack_require__(61);
21958class ErrorFilter {
21959 constructor(_settings) {
21960 this._settings = _settings;
21961 }
21962 getFilter() {
21963 return (error) => this._isNonFatalError(error);
21964 }
21965 _isNonFatalError(error) {
21966 return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
21967 }
21968}
21969exports.default = ErrorFilter;
21970
21971
21972/***/ }),
21973/* 131 */
21974/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
21975
21976"use strict";
21977
21978Object.defineProperty(exports, "__esModule", ({ value: true }));
21979const utils = __webpack_require__(61);
21980class EntryTransformer {
21981 constructor(_settings) {
21982 this._settings = _settings;
21983 }
21984 getTransformer() {
21985 return (entry) => this._transform(entry);
21986 }
21987 _transform(entry) {
21988 let filepath = entry.path;
21989 if (this._settings.absolute) {
21990 filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
21991 filepath = utils.path.unixify(filepath);
21992 }
21993 if (this._settings.markDirectories && entry.dirent.isDirectory()) {
21994 filepath += '/';
21995 }
21996 if (!this._settings.objectMode) {
21997 return filepath;
21998 }
21999 return Object.assign(Object.assign({}, entry), { path: filepath });
22000 }
22001}
22002exports.default = EntryTransformer;
22003
22004
22005/***/ }),
22006/* 132 */
22007/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
22008
22009"use strict";
22010
22011Object.defineProperty(exports, "__esModule", ({ value: true }));
22012const stream_1 = __webpack_require__(95);
22013const stream_2 = __webpack_require__(98);
22014const provider_1 = __webpack_require__(125);
22015class ProviderStream extends provider_1.default {
22016 constructor() {
22017 super(...arguments);
22018 this._reader = new stream_2.default(this._settings);
22019 }
22020 read(task) {
22021 const root = this._getRootDirectory(task);
22022 const options = this._getReaderOptions(task);
22023 const source = this.api(root, task, options);
22024 const destination = new stream_1.Readable({ objectMode: true, read: () => { } });
22025 source
22026 .once('error', (error) => destination.emit('error', error))
22027 .on('data', (entry) => destination.emit('data', options.transform(entry)))
22028 .once('end', () => destination.emit('end'));
22029 destination
22030 .once('close', () => source.destroy());
22031 return destination;
22032 }
22033 api(root, task, options) {
22034 if (task.dynamic) {
22035 return this._reader.dynamic(root, options);
22036 }
22037 return this._reader.static(task.patterns, options);
22038 }
22039}
22040exports.default = ProviderStream;
22041
22042
22043/***/ }),
22044/* 133 */
22045/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
22046
22047"use strict";
22048
22049Object.defineProperty(exports, "__esModule", ({ value: true }));
22050const sync_1 = __webpack_require__(134);
22051const provider_1 = __webpack_require__(125);
22052class ProviderSync extends provider_1.default {
22053 constructor() {
22054 super(...arguments);
22055 this._reader = new sync_1.default(this._settings);
22056 }
22057 read(task) {
22058 const root = this._getRootDirectory(task);
22059 const options = this._getReaderOptions(task);
22060 const entries = this.api(root, task, options);
22061 return entries.map(options.transform);
22062 }
22063 api(root, task, options) {
22064 if (task.dynamic) {
22065 return this._reader.dynamic(root, options);
22066 }
22067 return this._reader.static(task.patterns, options);
22068 }
22069}
22070exports.default = ProviderSync;
22071
22072
22073/***/ }),
22074/* 134 */
22075/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
22076
22077"use strict";
22078
22079Object.defineProperty(exports, "__esModule", ({ value: true }));
22080const fsStat = __webpack_require__(99);
22081const fsWalk = __webpack_require__(104);
22082const reader_1 = __webpack_require__(124);
22083class ReaderSync extends reader_1.default {
22084 constructor() {
22085 super(...arguments);
22086 this._walkSync = fsWalk.walkSync;
22087 this._statSync = fsStat.statSync;
22088 }
22089 dynamic(root, options) {
22090 return this._walkSync(root, options);
22091 }
22092 static(patterns, options) {
22093 const entries = [];
22094 for (const pattern of patterns) {
22095 const filepath = this._getFullEntryPath(pattern);
22096 const entry = this._getEntry(filepath, pattern, options);
22097 if (entry === null || !options.entryFilter(entry)) {
22098 continue;
22099 }
22100 entries.push(entry);
22101 }
22102 return entries;
22103 }
22104 _getEntry(filepath, pattern, options) {
22105 try {
22106 const stats = this._getStat(filepath);
22107 return this._makeEntry(stats, pattern);
22108 }
22109 catch (error) {
22110 if (options.errorFilter(error)) {
22111 return null;
22112 }
22113 throw error;
22114 }
22115 }
22116 _getStat(filepath) {
22117 return this._statSync(filepath, this._fsStatSettings);
22118 }
22119}
22120exports.default = ReaderSync;
22121
22122
22123/***/ }),
22124/* 135 */
22125/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
22126
22127"use strict";
22128
22129Object.defineProperty(exports, "__esModule", ({ value: true }));
22130exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
22131const fs = __webpack_require__(40);
22132const os = __webpack_require__(14);
22133const CPU_COUNT = os.cpus().length;
22134exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
22135 lstat: fs.lstat,
22136 lstatSync: fs.lstatSync,
22137 stat: fs.stat,
22138 statSync: fs.statSync,
22139 readdir: fs.readdir,
22140 readdirSync: fs.readdirSync
22141};
22142class Settings {
22143 constructor(_options = {}) {
22144 this._options = _options;
22145 this.absolute = this._getValue(this._options.absolute, false);
22146 this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
22147 this.braceExpansion = this._getValue(this._options.braceExpansion, true);
22148 this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
22149 this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
22150 this.cwd = this._getValue(this._options.cwd, process.cwd());
22151 this.deep = this._getValue(this._options.deep, Infinity);
22152 this.dot = this._getValue(this._options.dot, false);
22153 this.extglob = this._getValue(this._options.extglob, true);
22154 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
22155 this.fs = this._getFileSystemMethods(this._options.fs);
22156 this.globstar = this._getValue(this._options.globstar, true);
22157 this.ignore = this._getValue(this._options.ignore, []);
22158 this.markDirectories = this._getValue(this._options.markDirectories, false);
22159 this.objectMode = this._getValue(this._options.objectMode, false);
22160 this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
22161 this.onlyFiles = this._getValue(this._options.onlyFiles, true);
22162 this.stats = this._getValue(this._options.stats, false);
22163 this.suppressErrors = this._getValue(this._options.suppressErrors, false);
22164 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
22165 this.unique = this._getValue(this._options.unique, true);
22166 if (this.onlyDirectories) {
22167 this.onlyFiles = false;
22168 }
22169 if (this.stats) {
22170 this.objectMode = true;
22171 }
22172 }
22173 _getValue(option, value) {
22174 return option === undefined ? value : option;
22175 }
22176 _getFileSystemMethods(methods = {}) {
22177 return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
22178 }
22179}
22180exports.default = Settings;
22181
22182
22183/***/ }),
22184/* 136 */,
22185/* 137 */,
22186/* 138 */,
22187/* 139 */,
22188/* 140 */,
22189/* 141 */,
22190/* 142 */,
22191/* 143 */,
22192/* 144 */,
22193/* 145 */,
22194/* 146 */,
22195/* 147 */,
22196/* 148 */
22197/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22198
22199"use strict";
22200__webpack_require__.r(__webpack_exports__);
22201/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22202/* harmony export */ "URI": () => /* binding */ URI,
22203/* harmony export */ "uriToFsPath": () => /* binding */ uriToFsPath
22204/* harmony export */ });
22205/*---------------------------------------------------------------------------------------------
22206 * Copyright (c) Microsoft Corporation. All rights reserved.
22207 * Licensed under the MIT License. See License.txt in the project root for license information.
22208 *--------------------------------------------------------------------------------------------*/
22209
22210var __extends = (undefined && undefined.__extends) || (function () {
22211 var extendStatics = function (d, b) {
22212 extendStatics = Object.setPrototypeOf ||
22213 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22214 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
22215 return extendStatics(d, b);
22216 };
22217 return function (d, b) {
22218 extendStatics(d, b);
22219 function __() { this.constructor = d; }
22220 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
22221 };
22222})();
22223var _a;
22224var isWindows;
22225if (typeof process === 'object') {
22226 isWindows = process.platform === 'win32';
22227}
22228else if (typeof navigator === 'object') {
22229 var userAgent = navigator.userAgent;
22230 isWindows = userAgent.indexOf('Windows') >= 0;
22231}
22232function isHighSurrogate(charCode) {
22233 return (0xD800 <= charCode && charCode <= 0xDBFF);
22234}
22235function isLowSurrogate(charCode) {
22236 return (0xDC00 <= charCode && charCode <= 0xDFFF);
22237}
22238function isLowerAsciiHex(code) {
22239 return code >= 97 /* a */ && code <= 102 /* f */;
22240}
22241function isLowerAsciiLetter(code) {
22242 return code >= 97 /* a */ && code <= 122 /* z */;
22243}
22244function isUpperAsciiLetter(code) {
22245 return code >= 65 /* A */ && code <= 90 /* Z */;
22246}
22247function isAsciiLetter(code) {
22248 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
22249}
22250//#endregion
22251var _schemePattern = /^\w[\w\d+.-]*$/;
22252var _singleSlashStart = /^\//;
22253var _doubleSlashStart = /^\/\//;
22254function _validateUri(ret, _strict) {
22255 // scheme, must be set
22256 if (!ret.scheme && _strict) {
22257 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
22258 }
22259 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
22260 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
22261 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
22262 throw new Error('[UriError]: Scheme contains illegal characters.');
22263 }
22264 // path, http://tools.ietf.org/html/rfc3986#section-3.3
22265 // If a URI contains an authority component, then the path component
22266 // must either be empty or begin with a slash ("/") character. If a URI
22267 // does not contain an authority component, then the path cannot begin
22268 // with two slash characters ("//").
22269 if (ret.path) {
22270 if (ret.authority) {
22271 if (!_singleSlashStart.test(ret.path)) {
22272 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');
22273 }
22274 }
22275 else {
22276 if (_doubleSlashStart.test(ret.path)) {
22277 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
22278 }
22279 }
22280 }
22281}
22282// for a while we allowed uris *without* schemes and this is the migration
22283// for them, e.g. an uri without scheme and without strict-mode warns and falls
22284// back to the file-scheme. that should cause the least carnage and still be a
22285// clear warning
22286function _schemeFix(scheme, _strict) {
22287 if (!scheme && !_strict) {
22288 return 'file';
22289 }
22290 return scheme;
22291}
22292// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
22293function _referenceResolution(scheme, path) {
22294 // the slash-character is our 'default base' as we don't
22295 // support constructing URIs relative to other URIs. This
22296 // also means that we alter and potentially break paths.
22297 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
22298 switch (scheme) {
22299 case 'https':
22300 case 'http':
22301 case 'file':
22302 if (!path) {
22303 path = _slash;
22304 }
22305 else if (path[0] !== _slash) {
22306 path = _slash + path;
22307 }
22308 break;
22309 }
22310 return path;
22311}
22312var _empty = '';
22313var _slash = '/';
22314var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
22315/**
22316 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
22317 * This class is a simple parser which creates the basic component parts
22318 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
22319 * and encoding.
22320 *
22321 * ```txt
22322 * foo://example.com:8042/over/there?name=ferret#nose
22323 * \_/ \______________/\_________/ \_________/ \__/
22324 * | | | | |
22325 * scheme authority path query fragment
22326 * | _____________________|__
22327 * / \ / \
22328 * urn:example:animal:ferret:nose
22329 * ```
22330 */
22331var URI = /** @class */ (function () {
22332 /**
22333 * @internal
22334 */
22335 function URI(schemeOrData, authority, path, query, fragment, _strict) {
22336 if (_strict === void 0) { _strict = false; }
22337 if (typeof schemeOrData === 'object') {
22338 this.scheme = schemeOrData.scheme || _empty;
22339 this.authority = schemeOrData.authority || _empty;
22340 this.path = schemeOrData.path || _empty;
22341 this.query = schemeOrData.query || _empty;
22342 this.fragment = schemeOrData.fragment || _empty;
22343 // no validation because it's this URI
22344 // that creates uri components.
22345 // _validateUri(this);
22346 }
22347 else {
22348 this.scheme = _schemeFix(schemeOrData, _strict);
22349 this.authority = authority || _empty;
22350 this.path = _referenceResolution(this.scheme, path || _empty);
22351 this.query = query || _empty;
22352 this.fragment = fragment || _empty;
22353 _validateUri(this, _strict);
22354 }
22355 }
22356 URI.isUri = function (thing) {
22357 if (thing instanceof URI) {
22358 return true;
22359 }
22360 if (!thing) {
22361 return false;
22362 }
22363 return typeof thing.authority === 'string'
22364 && typeof thing.fragment === 'string'
22365 && typeof thing.path === 'string'
22366 && typeof thing.query === 'string'
22367 && typeof thing.scheme === 'string'
22368 && typeof thing.fsPath === 'function'
22369 && typeof thing.with === 'function'
22370 && typeof thing.toString === 'function';
22371 };
22372 Object.defineProperty(URI.prototype, "fsPath", {
22373 // ---- filesystem path -----------------------
22374 /**
22375 * Returns a string representing the corresponding file system path of this URI.
22376 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
22377 * platform specific path separator.
22378 *
22379 * * Will *not* validate the path for invalid characters and semantics.
22380 * * Will *not* look at the scheme of this URI.
22381 * * The result shall *not* be used for display purposes but for accessing a file on disk.
22382 *
22383 *
22384 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
22385 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
22386 *
22387 * ```ts
22388 const u = URI.parse('file://server/c$/folder/file.txt')
22389 u.authority === 'server'
22390 u.path === '/shares/c$/file.txt'
22391 u.fsPath === '\\server\c$\folder\file.txt'
22392 ```
22393 *
22394 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
22395 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
22396 * with URIs that represent files on disk (`file` scheme).
22397 */
22398 get: function () {
22399 // if (this.scheme !== 'file') {
22400 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
22401 // }
22402 return uriToFsPath(this, false);
22403 },
22404 enumerable: true,
22405 configurable: true
22406 });
22407 // ---- modify to new -------------------------
22408 URI.prototype.with = function (change) {
22409 if (!change) {
22410 return this;
22411 }
22412 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
22413 if (scheme === undefined) {
22414 scheme = this.scheme;
22415 }
22416 else if (scheme === null) {
22417 scheme = _empty;
22418 }
22419 if (authority === undefined) {
22420 authority = this.authority;
22421 }
22422 else if (authority === null) {
22423 authority = _empty;
22424 }
22425 if (path === undefined) {
22426 path = this.path;
22427 }
22428 else if (path === null) {
22429 path = _empty;
22430 }
22431 if (query === undefined) {
22432 query = this.query;
22433 }
22434 else if (query === null) {
22435 query = _empty;
22436 }
22437 if (fragment === undefined) {
22438 fragment = this.fragment;
22439 }
22440 else if (fragment === null) {
22441 fragment = _empty;
22442 }
22443 if (scheme === this.scheme
22444 && authority === this.authority
22445 && path === this.path
22446 && query === this.query
22447 && fragment === this.fragment) {
22448 return this;
22449 }
22450 return new _URI(scheme, authority, path, query, fragment);
22451 };
22452 // ---- parse & validate ------------------------
22453 /**
22454 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
22455 * `file:///usr/home`, or `scheme:with/path`.
22456 *
22457 * @param value A string which represents an URI (see `URI#toString`).
22458 */
22459 URI.parse = function (value, _strict) {
22460 if (_strict === void 0) { _strict = false; }
22461 var match = _regexp.exec(value);
22462 if (!match) {
22463 return new _URI(_empty, _empty, _empty, _empty, _empty);
22464 }
22465 return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
22466 };
22467 /**
22468 * Creates a new URI from a file system path, e.g. `c:\my\files`,
22469 * `/usr/home`, or `\\server\share\some\path`.
22470 *
22471 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
22472 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
22473 * `URI.parse('file://' + path)` because the path might contain characters that are
22474 * interpreted (# and ?). See the following sample:
22475 * ```ts
22476 const good = URI.file('/coding/c#/project1');
22477 good.scheme === 'file';
22478 good.path === '/coding/c#/project1';
22479 good.fragment === '';
22480 const bad = URI.parse('file://' + '/coding/c#/project1');
22481 bad.scheme === 'file';
22482 bad.path === '/coding/c'; // path is now broken
22483 bad.fragment === '/project1';
22484 ```
22485 *
22486 * @param path A file system path (see `URI#fsPath`)
22487 */
22488 URI.file = function (path) {
22489 var authority = _empty;
22490 // normalize to fwd-slashes on windows,
22491 // on other systems bwd-slashes are valid
22492 // filename character, eg /f\oo/ba\r.txt
22493 if (isWindows) {
22494 path = path.replace(/\\/g, _slash);
22495 }
22496 // check for authority as used in UNC shares
22497 // or use the path as given
22498 if (path[0] === _slash && path[1] === _slash) {
22499 var idx = path.indexOf(_slash, 2);
22500 if (idx === -1) {
22501 authority = path.substring(2);
22502 path = _slash;
22503 }
22504 else {
22505 authority = path.substring(2, idx);
22506 path = path.substring(idx) || _slash;
22507 }
22508 }
22509 return new _URI('file', authority, path, _empty, _empty);
22510 };
22511 URI.from = function (components) {
22512 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
22513 };
22514 // /**
22515 // * Join a URI path with path fragments and normalizes the resulting path.
22516 // *
22517 // * @param uri The input URI.
22518 // * @param pathFragment The path fragment to add to the URI path.
22519 // * @returns The resulting URI.
22520 // */
22521 // static joinPath(uri: URI, ...pathFragment: string[]): URI {
22522 // if (!uri.path) {
22523 // throw new Error(`[UriError]: cannot call joinPaths on URI without path`);
22524 // }
22525 // let newPath: string;
22526 // if (isWindows && uri.scheme === 'file') {
22527 // newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
22528 // } else {
22529 // newPath = paths.posix.join(uri.path, ...pathFragment);
22530 // }
22531 // return uri.with({ path: newPath });
22532 // }
22533 // ---- printing/externalize ---------------------------
22534 /**
22535 * Creates a string representation for this URI. It's guaranteed that calling
22536 * `URI.parse` with the result of this function creates an URI which is equal
22537 * to this URI.
22538 *
22539 * * The result shall *not* be used for display purposes but for externalization or transport.
22540 * * The result will be encoded using the percentage encoding and encoding happens mostly
22541 * ignore the scheme-specific encoding rules.
22542 *
22543 * @param skipEncoding Do not encode the result, default is `false`
22544 */
22545 URI.prototype.toString = function (skipEncoding) {
22546 if (skipEncoding === void 0) { skipEncoding = false; }
22547 return _asFormatted(this, skipEncoding);
22548 };
22549 URI.prototype.toJSON = function () {
22550 return this;
22551 };
22552 URI.revive = function (data) {
22553 if (!data) {
22554 return data;
22555 }
22556 else if (data instanceof URI) {
22557 return data;
22558 }
22559 else {
22560 var result = new _URI(data);
22561 result._formatted = data.external;
22562 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
22563 return result;
22564 }
22565 };
22566 return URI;
22567}());
22568
22569var _pathSepMarker = isWindows ? 1 : undefined;
22570// eslint-disable-next-line @typescript-eslint/class-name-casing
22571var _URI = /** @class */ (function (_super) {
22572 __extends(_URI, _super);
22573 function _URI() {
22574 var _this = _super !== null && _super.apply(this, arguments) || this;
22575 _this._formatted = null;
22576 _this._fsPath = null;
22577 return _this;
22578 }
22579 Object.defineProperty(_URI.prototype, "fsPath", {
22580 get: function () {
22581 if (!this._fsPath) {
22582 this._fsPath = uriToFsPath(this, false);
22583 }
22584 return this._fsPath;
22585 },
22586 enumerable: true,
22587 configurable: true
22588 });
22589 _URI.prototype.toString = function (skipEncoding) {
22590 if (skipEncoding === void 0) { skipEncoding = false; }
22591 if (!skipEncoding) {
22592 if (!this._formatted) {
22593 this._formatted = _asFormatted(this, false);
22594 }
22595 return this._formatted;
22596 }
22597 else {
22598 // we don't cache that
22599 return _asFormatted(this, true);
22600 }
22601 };
22602 _URI.prototype.toJSON = function () {
22603 var res = {
22604 $mid: 1
22605 };
22606 // cached state
22607 if (this._fsPath) {
22608 res.fsPath = this._fsPath;
22609 res._sep = _pathSepMarker;
22610 }
22611 if (this._formatted) {
22612 res.external = this._formatted;
22613 }
22614 // uri components
22615 if (this.path) {
22616 res.path = this.path;
22617 }
22618 if (this.scheme) {
22619 res.scheme = this.scheme;
22620 }
22621 if (this.authority) {
22622 res.authority = this.authority;
22623 }
22624 if (this.query) {
22625 res.query = this.query;
22626 }
22627 if (this.fragment) {
22628 res.fragment = this.fragment;
22629 }
22630 return res;
22631 };
22632 return _URI;
22633}(URI));
22634// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
22635var encodeTable = (_a = {},
22636 _a[58 /* Colon */] = '%3A',
22637 _a[47 /* Slash */] = '%2F',
22638 _a[63 /* QuestionMark */] = '%3F',
22639 _a[35 /* Hash */] = '%23',
22640 _a[91 /* OpenSquareBracket */] = '%5B',
22641 _a[93 /* CloseSquareBracket */] = '%5D',
22642 _a[64 /* AtSign */] = '%40',
22643 _a[33 /* ExclamationMark */] = '%21',
22644 _a[36 /* DollarSign */] = '%24',
22645 _a[38 /* Ampersand */] = '%26',
22646 _a[39 /* SingleQuote */] = '%27',
22647 _a[40 /* OpenParen */] = '%28',
22648 _a[41 /* CloseParen */] = '%29',
22649 _a[42 /* Asterisk */] = '%2A',
22650 _a[43 /* Plus */] = '%2B',
22651 _a[44 /* Comma */] = '%2C',
22652 _a[59 /* Semicolon */] = '%3B',
22653 _a[61 /* Equals */] = '%3D',
22654 _a[32 /* Space */] = '%20',
22655 _a);
22656function encodeURIComponentFast(uriComponent, allowSlash) {
22657 var res = undefined;
22658 var nativeEncodePos = -1;
22659 for (var pos = 0; pos < uriComponent.length; pos++) {
22660 var code = uriComponent.charCodeAt(pos);
22661 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
22662 if ((code >= 97 /* a */ && code <= 122 /* z */)
22663 || (code >= 65 /* A */ && code <= 90 /* Z */)
22664 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
22665 || code === 45 /* Dash */
22666 || code === 46 /* Period */
22667 || code === 95 /* Underline */
22668 || code === 126 /* Tilde */
22669 || (allowSlash && code === 47 /* Slash */)) {
22670 // check if we are delaying native encode
22671 if (nativeEncodePos !== -1) {
22672 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
22673 nativeEncodePos = -1;
22674 }
22675 // check if we write into a new string (by default we try to return the param)
22676 if (res !== undefined) {
22677 res += uriComponent.charAt(pos);
22678 }
22679 }
22680 else {
22681 // encoding needed, we need to allocate a new string
22682 if (res === undefined) {
22683 res = uriComponent.substr(0, pos);
22684 }
22685 // check with default table first
22686 var escaped = encodeTable[code];
22687 if (escaped !== undefined) {
22688 // check if we are delaying native encode
22689 if (nativeEncodePos !== -1) {
22690 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
22691 nativeEncodePos = -1;
22692 }
22693 // append escaped variant to result
22694 res += escaped;
22695 }
22696 else if (nativeEncodePos === -1) {
22697 // use native encode only when needed
22698 nativeEncodePos = pos;
22699 }
22700 }
22701 }
22702 if (nativeEncodePos !== -1) {
22703 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
22704 }
22705 return res !== undefined ? res : uriComponent;
22706}
22707function encodeURIComponentMinimal(path) {
22708 var res = undefined;
22709 for (var pos = 0; pos < path.length; pos++) {
22710 var code = path.charCodeAt(pos);
22711 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
22712 if (res === undefined) {
22713 res = path.substr(0, pos);
22714 }
22715 res += encodeTable[code];
22716 }
22717 else {
22718 if (res !== undefined) {
22719 res += path[pos];
22720 }
22721 }
22722 }
22723 return res !== undefined ? res : path;
22724}
22725/**
22726 * Compute `fsPath` for the given uri
22727 */
22728function uriToFsPath(uri, keepDriveLetterCasing) {
22729 var value;
22730 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
22731 // unc path: file://shares/c$/far/boo
22732 value = "//" + uri.authority + uri.path;
22733 }
22734 else if (uri.path.charCodeAt(0) === 47 /* Slash */
22735 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
22736 && uri.path.charCodeAt(2) === 58 /* Colon */) {
22737 if (!keepDriveLetterCasing) {
22738 // windows drive letter: file:///c:/far/boo
22739 value = uri.path[1].toLowerCase() + uri.path.substr(2);
22740 }
22741 else {
22742 value = uri.path.substr(1);
22743 }
22744 }
22745 else {
22746 // other path
22747 value = uri.path;
22748 }
22749 if (isWindows) {
22750 value = value.replace(/\//g, '\\');
22751 }
22752 return value;
22753}
22754/**
22755 * Create the external version of a uri
22756 */
22757function _asFormatted(uri, skipEncoding) {
22758 var encoder = !skipEncoding
22759 ? encodeURIComponentFast
22760 : encodeURIComponentMinimal;
22761 var res = '';
22762 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
22763 if (scheme) {
22764 res += scheme;
22765 res += ':';
22766 }
22767 if (authority || scheme === 'file') {
22768 res += _slash;
22769 res += _slash;
22770 }
22771 if (authority) {
22772 var idx = authority.indexOf('@');
22773 if (idx !== -1) {
22774 // <user>@<auth>
22775 var userinfo = authority.substr(0, idx);
22776 authority = authority.substr(idx + 1);
22777 idx = userinfo.indexOf(':');
22778 if (idx === -1) {
22779 res += encoder(userinfo, false);
22780 }
22781 else {
22782 // <user>:<pass>@<auth>
22783 res += encoder(userinfo.substr(0, idx), false);
22784 res += ':';
22785 res += encoder(userinfo.substr(idx + 1), false);
22786 }
22787 res += '@';
22788 }
22789 authority = authority.toLowerCase();
22790 idx = authority.indexOf(':');
22791 if (idx === -1) {
22792 res += encoder(authority, false);
22793 }
22794 else {
22795 // <auth>:<port>
22796 res += encoder(authority.substr(0, idx), false);
22797 res += authority.substr(idx);
22798 }
22799 }
22800 if (path) {
22801 // lower-case windows drive letters in /C:/fff or C:/fff
22802 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
22803 var code = path.charCodeAt(1);
22804 if (code >= 65 /* A */ && code <= 90 /* Z */) {
22805 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
22806 }
22807 }
22808 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
22809 var code = path.charCodeAt(0);
22810 if (code >= 65 /* A */ && code <= 90 /* Z */) {
22811 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
22812 }
22813 }
22814 // encode the rest of the path
22815 res += encoder(path, true);
22816 }
22817 if (query) {
22818 res += '?';
22819 res += encoder(query, false);
22820 }
22821 if (fragment) {
22822 res += '#';
22823 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
22824 }
22825 return res;
22826}
22827// --- decode
22828function decodeURIComponentGraceful(str) {
22829 try {
22830 return decodeURIComponent(str);
22831 }
22832 catch (_a) {
22833 if (str.length > 3) {
22834 return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
22835 }
22836 else {
22837 return str;
22838 }
22839 }
22840}
22841var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
22842function percentDecode(str) {
22843 if (!str.match(_rEncodedAsHex)) {
22844 return str;
22845 }
22846 return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });
22847}
22848
22849
22850/***/ }),
22851/* 149 */,
22852/* 150 */,
22853/* 151 */,
22854/* 152 */,
22855/* 153 */,
22856/* 154 */,
22857/* 155 */,
22858/* 156 */,
22859/* 157 */,
22860/* 158 */,
22861/* 159 */,
22862/* 160 */,
22863/* 161 */,
22864/* 162 */,
22865/* 163 */,
22866/* 164 */,
22867/* 165 */
22868/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
22869
22870"use strict";
22871__webpack_require__.r(__webpack_exports__);
22872/* harmony export */ __webpack_require__.d(__webpack_exports__, {
22873/* harmony export */ "Observable": () => /* reexport safe */ _internal_Observable__WEBPACK_IMPORTED_MODULE_0__.Observable,
22874/* harmony export */ "ConnectableObservable": () => /* reexport safe */ _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__.ConnectableObservable,
22875/* harmony export */ "GroupedObservable": () => /* reexport safe */ _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__.GroupedObservable,
22876/* harmony export */ "observable": () => /* reexport safe */ _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__.observable,
22877/* harmony export */ "Subject": () => /* reexport safe */ _internal_Subject__WEBPACK_IMPORTED_MODULE_4__.Subject,
22878/* harmony export */ "BehaviorSubject": () => /* reexport safe */ _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__.BehaviorSubject,
22879/* harmony export */ "ReplaySubject": () => /* reexport safe */ _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__.ReplaySubject,
22880/* harmony export */ "AsyncSubject": () => /* reexport safe */ _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__.AsyncSubject,
22881/* harmony export */ "asapScheduler": () => /* reexport safe */ _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__.asap,
22882/* harmony export */ "asyncScheduler": () => /* reexport safe */ _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__.async,
22883/* harmony export */ "queueScheduler": () => /* reexport safe */ _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__.queue,
22884/* harmony export */ "animationFrameScheduler": () => /* reexport safe */ _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__.animationFrame,
22885/* harmony export */ "VirtualTimeScheduler": () => /* reexport safe */ _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__.VirtualTimeScheduler,
22886/* harmony export */ "VirtualAction": () => /* reexport safe */ _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__.VirtualAction,
22887/* harmony export */ "Scheduler": () => /* reexport safe */ _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__.Scheduler,
22888/* harmony export */ "Subscription": () => /* reexport safe */ _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__.Subscription,
22889/* harmony export */ "Subscriber": () => /* reexport safe */ _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__.Subscriber,
22890/* harmony export */ "Notification": () => /* reexport safe */ _internal_Notification__WEBPACK_IMPORTED_MODULE_16__.Notification,
22891/* harmony export */ "NotificationKind": () => /* reexport safe */ _internal_Notification__WEBPACK_IMPORTED_MODULE_16__.NotificationKind,
22892/* harmony export */ "pipe": () => /* reexport safe */ _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__.pipe,
22893/* harmony export */ "noop": () => /* reexport safe */ _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__.noop,
22894/* harmony export */ "identity": () => /* reexport safe */ _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__.identity,
22895/* harmony export */ "isObservable": () => /* reexport safe */ _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__.isObservable,
22896/* harmony export */ "ArgumentOutOfRangeError": () => /* reexport safe */ _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__.ArgumentOutOfRangeError,
22897/* harmony export */ "EmptyError": () => /* reexport safe */ _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__.EmptyError,
22898/* harmony export */ "ObjectUnsubscribedError": () => /* reexport safe */ _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__.ObjectUnsubscribedError,
22899/* harmony export */ "UnsubscriptionError": () => /* reexport safe */ _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__.UnsubscriptionError,
22900/* harmony export */ "TimeoutError": () => /* reexport safe */ _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__.TimeoutError,
22901/* harmony export */ "bindCallback": () => /* reexport safe */ _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__.bindCallback,
22902/* harmony export */ "bindNodeCallback": () => /* reexport safe */ _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__.bindNodeCallback,
22903/* harmony export */ "combineLatest": () => /* reexport safe */ _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__.combineLatest,
22904/* harmony export */ "concat": () => /* reexport safe */ _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__.concat,
22905/* harmony export */ "defer": () => /* reexport safe */ _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__.defer,
22906/* harmony export */ "empty": () => /* reexport safe */ _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__.empty,
22907/* harmony export */ "forkJoin": () => /* reexport safe */ _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__.forkJoin,
22908/* harmony export */ "from": () => /* reexport safe */ _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__.from,
22909/* harmony export */ "fromEvent": () => /* reexport safe */ _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__.fromEvent,
22910/* harmony export */ "fromEventPattern": () => /* reexport safe */ _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__.fromEventPattern,
22911/* harmony export */ "generate": () => /* reexport safe */ _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__.generate,
22912/* harmony export */ "iif": () => /* reexport safe */ _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__.iif,
22913/* harmony export */ "interval": () => /* reexport safe */ _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__.interval,
22914/* harmony export */ "merge": () => /* reexport safe */ _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__.merge,
22915/* harmony export */ "never": () => /* reexport safe */ _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__.never,
22916/* harmony export */ "of": () => /* reexport safe */ _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__.of,
22917/* harmony export */ "onErrorResumeNext": () => /* reexport safe */ _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__.onErrorResumeNext,
22918/* harmony export */ "pairs": () => /* reexport safe */ _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__.pairs,
22919/* harmony export */ "partition": () => /* reexport safe */ _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__.partition,
22920/* harmony export */ "race": () => /* reexport safe */ _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__.race,
22921/* harmony export */ "range": () => /* reexport safe */ _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__.range,
22922/* harmony export */ "throwError": () => /* reexport safe */ _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__.throwError,
22923/* harmony export */ "timer": () => /* reexport safe */ _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__.timer,
22924/* harmony export */ "using": () => /* reexport safe */ _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__.using,
22925/* harmony export */ "zip": () => /* reexport safe */ _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__.zip,
22926/* harmony export */ "scheduled": () => /* reexport safe */ _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__.scheduled,
22927/* harmony export */ "EMPTY": () => /* reexport safe */ _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__.EMPTY,
22928/* harmony export */ "NEVER": () => /* reexport safe */ _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__.NEVER,
22929/* harmony export */ "config": () => /* reexport safe */ _internal_config__WEBPACK_IMPORTED_MODULE_52__.config
22930/* harmony export */ });
22931/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
22932/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
22933/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
22934/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(180);
22935/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
22936/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(189);
22937/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(190);
22938/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(207);
22939/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(208);
22940/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(212);
22941/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(200);
22942/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(213);
22943/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(216);
22944/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(203);
22945/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(174);
22946/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(168);
22947/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(192);
22948/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(181);
22949/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(217);
22950/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(182);
22951/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(218);
22952/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(219);
22953/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(220);
22954/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(186);
22955/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(176);
22956/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(221);
22957/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(222);
22958/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(224);
22959/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(225);
22960/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(236);
22961/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(247);
22962/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(199);
22963/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(248);
22964/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(240);
22965/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(249);
22966/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(250);
22967/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(251);
22968/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(252);
22969/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(253);
22970/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(255);
22971/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(256);
22972/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(193);
22973/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(257);
22974/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(258);
22975/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(259);
22976/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(262);
22977/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(263);
22978/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(198);
22979/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(264);
22980/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(265);
22981/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(266);
22982/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(241);
22983/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(171);
22984/** PURE_IMPORTS_START PURE_IMPORTS_END */
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040//# sourceMappingURL=index.js.map
23041
23042
23043/***/ }),
23044/* 166 */
23045/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23046
23047"use strict";
23048__webpack_require__.r(__webpack_exports__);
23049/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23050/* harmony export */ "Observable": () => /* binding */ Observable
23051/* harmony export */ });
23052/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179);
23053/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167);
23054/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(180);
23055/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(181);
23056/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171);
23057/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
23058
23059
23060
23061
23062
23063var Observable = /*@__PURE__*/ (function () {
23064 function Observable(subscribe) {
23065 this._isScalar = false;
23066 if (subscribe) {
23067 this._subscribe = subscribe;
23068 }
23069 }
23070 Observable.prototype.lift = function (operator) {
23071 var observable = new Observable();
23072 observable.source = this;
23073 observable.operator = operator;
23074 return observable;
23075 };
23076 Observable.prototype.subscribe = function (observerOrNext, error, complete) {
23077 var operator = this.operator;
23078 var sink = (0,_util_toSubscriber__WEBPACK_IMPORTED_MODULE_0__.toSubscriber)(observerOrNext, error, complete);
23079 if (operator) {
23080 sink.add(operator.call(sink, this.source));
23081 }
23082 else {
23083 sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_1__.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
23084 this._subscribe(sink) :
23085 this._trySubscribe(sink));
23086 }
23087 if (_config__WEBPACK_IMPORTED_MODULE_1__.config.useDeprecatedSynchronousErrorHandling) {
23088 if (sink.syncErrorThrowable) {
23089 sink.syncErrorThrowable = false;
23090 if (sink.syncErrorThrown) {
23091 throw sink.syncErrorValue;
23092 }
23093 }
23094 }
23095 return sink;
23096 };
23097 Observable.prototype._trySubscribe = function (sink) {
23098 try {
23099 return this._subscribe(sink);
23100 }
23101 catch (err) {
23102 if (_config__WEBPACK_IMPORTED_MODULE_1__.config.useDeprecatedSynchronousErrorHandling) {
23103 sink.syncErrorThrown = true;
23104 sink.syncErrorValue = err;
23105 }
23106 if ((0,_util_canReportError__WEBPACK_IMPORTED_MODULE_2__.canReportError)(sink)) {
23107 sink.error(err);
23108 }
23109 else {
23110 console.warn(err);
23111 }
23112 }
23113 };
23114 Observable.prototype.forEach = function (next, promiseCtor) {
23115 var _this = this;
23116 promiseCtor = getPromiseCtor(promiseCtor);
23117 return new promiseCtor(function (resolve, reject) {
23118 var subscription;
23119 subscription = _this.subscribe(function (value) {
23120 try {
23121 next(value);
23122 }
23123 catch (err) {
23124 reject(err);
23125 if (subscription) {
23126 subscription.unsubscribe();
23127 }
23128 }
23129 }, reject, resolve);
23130 });
23131 };
23132 Observable.prototype._subscribe = function (subscriber) {
23133 var source = this.source;
23134 return source && source.subscribe(subscriber);
23135 };
23136 Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_3__.observable] = function () {
23137 return this;
23138 };
23139 Observable.prototype.pipe = function () {
23140 var operations = [];
23141 for (var _i = 0; _i < arguments.length; _i++) {
23142 operations[_i] = arguments[_i];
23143 }
23144 if (operations.length === 0) {
23145 return this;
23146 }
23147 return (0,_util_pipe__WEBPACK_IMPORTED_MODULE_4__.pipeFromArray)(operations)(this);
23148 };
23149 Observable.prototype.toPromise = function (promiseCtor) {
23150 var _this = this;
23151 promiseCtor = getPromiseCtor(promiseCtor);
23152 return new promiseCtor(function (resolve, reject) {
23153 var value;
23154 _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
23155 });
23156 };
23157 Observable.create = function (subscribe) {
23158 return new Observable(subscribe);
23159 };
23160 return Observable;
23161}());
23162
23163function getPromiseCtor(promiseCtor) {
23164 if (!promiseCtor) {
23165 promiseCtor = _config__WEBPACK_IMPORTED_MODULE_1__.config.Promise || Promise;
23166 }
23167 if (!promiseCtor) {
23168 throw new Error('no Promise impl found');
23169 }
23170 return promiseCtor;
23171}
23172//# sourceMappingURL=Observable.js.map
23173
23174
23175/***/ }),
23176/* 167 */
23177/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23178
23179"use strict";
23180__webpack_require__.r(__webpack_exports__);
23181/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23182/* harmony export */ "toSubscriber": () => /* binding */ toSubscriber
23183/* harmony export */ });
23184/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(168);
23185/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(173);
23186/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(170);
23187/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
23188
23189
23190
23191function toSubscriber(nextOrObserver, error, complete) {
23192 if (nextOrObserver) {
23193 if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber) {
23194 return nextOrObserver;
23195 }
23196 if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__.rxSubscriber]) {
23197 return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__.rxSubscriber]();
23198 }
23199 }
23200 if (!nextOrObserver && !error && !complete) {
23201 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber(_Observer__WEBPACK_IMPORTED_MODULE_2__.empty);
23202 }
23203 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber(nextOrObserver, error, complete);
23204}
23205//# sourceMappingURL=toSubscriber.js.map
23206
23207
23208/***/ }),
23209/* 168 */
23210/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23211
23212"use strict";
23213__webpack_require__.r(__webpack_exports__);
23214/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23215/* harmony export */ "Subscriber": () => /* binding */ Subscriber,
23216/* harmony export */ "SafeSubscriber": () => /* binding */ SafeSubscriber
23217/* harmony export */ });
23218/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
23219/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(175);
23220/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(170);
23221/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(174);
23222/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173);
23223/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(171);
23224/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(172);
23225/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
23226
23227
23228
23229
23230
23231
23232
23233var Subscriber = /*@__PURE__*/ (function (_super) {
23234 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(Subscriber, _super);
23235 function Subscriber(destinationOrNext, error, complete) {
23236 var _this = _super.call(this) || this;
23237 _this.syncErrorValue = null;
23238 _this.syncErrorThrown = false;
23239 _this.syncErrorThrowable = false;
23240 _this.isStopped = false;
23241 switch (arguments.length) {
23242 case 0:
23243 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__.empty;
23244 break;
23245 case 1:
23246 if (!destinationOrNext) {
23247 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__.empty;
23248 break;
23249 }
23250 if (typeof destinationOrNext === 'object') {
23251 if (destinationOrNext instanceof Subscriber) {
23252 _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
23253 _this.destination = destinationOrNext;
23254 destinationOrNext.add(_this);
23255 }
23256 else {
23257 _this.syncErrorThrowable = true;
23258 _this.destination = new SafeSubscriber(_this, destinationOrNext);
23259 }
23260 break;
23261 }
23262 default:
23263 _this.syncErrorThrowable = true;
23264 _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
23265 break;
23266 }
23267 return _this;
23268 }
23269 Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_2__.rxSubscriber] = function () { return this; };
23270 Subscriber.create = function (next, error, complete) {
23271 var subscriber = new Subscriber(next, error, complete);
23272 subscriber.syncErrorThrowable = false;
23273 return subscriber;
23274 };
23275 Subscriber.prototype.next = function (value) {
23276 if (!this.isStopped) {
23277 this._next(value);
23278 }
23279 };
23280 Subscriber.prototype.error = function (err) {
23281 if (!this.isStopped) {
23282 this.isStopped = true;
23283 this._error(err);
23284 }
23285 };
23286 Subscriber.prototype.complete = function () {
23287 if (!this.isStopped) {
23288 this.isStopped = true;
23289 this._complete();
23290 }
23291 };
23292 Subscriber.prototype.unsubscribe = function () {
23293 if (this.closed) {
23294 return;
23295 }
23296 this.isStopped = true;
23297 _super.prototype.unsubscribe.call(this);
23298 };
23299 Subscriber.prototype._next = function (value) {
23300 this.destination.next(value);
23301 };
23302 Subscriber.prototype._error = function (err) {
23303 this.destination.error(err);
23304 this.unsubscribe();
23305 };
23306 Subscriber.prototype._complete = function () {
23307 this.destination.complete();
23308 this.unsubscribe();
23309 };
23310 Subscriber.prototype._unsubscribeAndRecycle = function () {
23311 var _parentOrParents = this._parentOrParents;
23312 this._parentOrParents = null;
23313 this.unsubscribe();
23314 this.closed = false;
23315 this.isStopped = false;
23316 this._parentOrParents = _parentOrParents;
23317 return this;
23318 };
23319 return Subscriber;
23320}(_Subscription__WEBPACK_IMPORTED_MODULE_3__.Subscription));
23321
23322var SafeSubscriber = /*@__PURE__*/ (function (_super) {
23323 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SafeSubscriber, _super);
23324 function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
23325 var _this = _super.call(this) || this;
23326 _this._parentSubscriber = _parentSubscriber;
23327 var next;
23328 var context = _this;
23329 if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_4__.isFunction)(observerOrNext)) {
23330 next = observerOrNext;
23331 }
23332 else if (observerOrNext) {
23333 next = observerOrNext.next;
23334 error = observerOrNext.error;
23335 complete = observerOrNext.complete;
23336 if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_1__.empty) {
23337 context = Object.create(observerOrNext);
23338 if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_4__.isFunction)(context.unsubscribe)) {
23339 _this.add(context.unsubscribe.bind(context));
23340 }
23341 context.unsubscribe = _this.unsubscribe.bind(_this);
23342 }
23343 }
23344 _this._context = context;
23345 _this._next = next;
23346 _this._error = error;
23347 _this._complete = complete;
23348 return _this;
23349 }
23350 SafeSubscriber.prototype.next = function (value) {
23351 if (!this.isStopped && this._next) {
23352 var _parentSubscriber = this._parentSubscriber;
23353 if (!_config__WEBPACK_IMPORTED_MODULE_5__.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23354 this.__tryOrUnsub(this._next, value);
23355 }
23356 else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
23357 this.unsubscribe();
23358 }
23359 }
23360 };
23361 SafeSubscriber.prototype.error = function (err) {
23362 if (!this.isStopped) {
23363 var _parentSubscriber = this._parentSubscriber;
23364 var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__.config.useDeprecatedSynchronousErrorHandling;
23365 if (this._error) {
23366 if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23367 this.__tryOrUnsub(this._error, err);
23368 this.unsubscribe();
23369 }
23370 else {
23371 this.__tryOrSetError(_parentSubscriber, this._error, err);
23372 this.unsubscribe();
23373 }
23374 }
23375 else if (!_parentSubscriber.syncErrorThrowable) {
23376 this.unsubscribe();
23377 if (useDeprecatedSynchronousErrorHandling) {
23378 throw err;
23379 }
23380 (0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__.hostReportError)(err);
23381 }
23382 else {
23383 if (useDeprecatedSynchronousErrorHandling) {
23384 _parentSubscriber.syncErrorValue = err;
23385 _parentSubscriber.syncErrorThrown = true;
23386 }
23387 else {
23388 (0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__.hostReportError)(err);
23389 }
23390 this.unsubscribe();
23391 }
23392 }
23393 };
23394 SafeSubscriber.prototype.complete = function () {
23395 var _this = this;
23396 if (!this.isStopped) {
23397 var _parentSubscriber = this._parentSubscriber;
23398 if (this._complete) {
23399 var wrappedComplete = function () { return _this._complete.call(_this._context); };
23400 if (!_config__WEBPACK_IMPORTED_MODULE_5__.config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
23401 this.__tryOrUnsub(wrappedComplete);
23402 this.unsubscribe();
23403 }
23404 else {
23405 this.__tryOrSetError(_parentSubscriber, wrappedComplete);
23406 this.unsubscribe();
23407 }
23408 }
23409 else {
23410 this.unsubscribe();
23411 }
23412 }
23413 };
23414 SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
23415 try {
23416 fn.call(this._context, value);
23417 }
23418 catch (err) {
23419 this.unsubscribe();
23420 if (_config__WEBPACK_IMPORTED_MODULE_5__.config.useDeprecatedSynchronousErrorHandling) {
23421 throw err;
23422 }
23423 else {
23424 (0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__.hostReportError)(err);
23425 }
23426 }
23427 };
23428 SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
23429 if (!_config__WEBPACK_IMPORTED_MODULE_5__.config.useDeprecatedSynchronousErrorHandling) {
23430 throw new Error('bad call');
23431 }
23432 try {
23433 fn.call(this._context, value);
23434 }
23435 catch (err) {
23436 if (_config__WEBPACK_IMPORTED_MODULE_5__.config.useDeprecatedSynchronousErrorHandling) {
23437 parent.syncErrorValue = err;
23438 parent.syncErrorThrown = true;
23439 return true;
23440 }
23441 else {
23442 (0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__.hostReportError)(err);
23443 return true;
23444 }
23445 }
23446 return false;
23447 };
23448 SafeSubscriber.prototype._unsubscribe = function () {
23449 var _parentSubscriber = this._parentSubscriber;
23450 this._context = null;
23451 this._parentSubscriber = null;
23452 _parentSubscriber.unsubscribe();
23453 };
23454 return SafeSubscriber;
23455}(Subscriber));
23456
23457//# sourceMappingURL=Subscriber.js.map
23458
23459
23460/***/ }),
23461/* 169 */
23462/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23463
23464"use strict";
23465__webpack_require__.r(__webpack_exports__);
23466/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23467/* harmony export */ "__extends": () => /* binding */ __extends,
23468/* harmony export */ "__assign": () => /* binding */ __assign,
23469/* harmony export */ "__rest": () => /* binding */ __rest,
23470/* harmony export */ "__decorate": () => /* binding */ __decorate,
23471/* harmony export */ "__param": () => /* binding */ __param,
23472/* harmony export */ "__metadata": () => /* binding */ __metadata,
23473/* harmony export */ "__awaiter": () => /* binding */ __awaiter,
23474/* harmony export */ "__generator": () => /* binding */ __generator,
23475/* harmony export */ "__exportStar": () => /* binding */ __exportStar,
23476/* harmony export */ "__values": () => /* binding */ __values,
23477/* harmony export */ "__read": () => /* binding */ __read,
23478/* harmony export */ "__spread": () => /* binding */ __spread,
23479/* harmony export */ "__spreadArrays": () => /* binding */ __spreadArrays,
23480/* harmony export */ "__await": () => /* binding */ __await,
23481/* harmony export */ "__asyncGenerator": () => /* binding */ __asyncGenerator,
23482/* harmony export */ "__asyncDelegator": () => /* binding */ __asyncDelegator,
23483/* harmony export */ "__asyncValues": () => /* binding */ __asyncValues,
23484/* harmony export */ "__makeTemplateObject": () => /* binding */ __makeTemplateObject,
23485/* harmony export */ "__importStar": () => /* binding */ __importStar,
23486/* harmony export */ "__importDefault": () => /* binding */ __importDefault
23487/* harmony export */ });
23488/*! *****************************************************************************
23489Copyright (c) Microsoft Corporation. All rights reserved.
23490Licensed under the Apache License, Version 2.0 (the "License"); you may not use
23491this file except in compliance with the License. You may obtain a copy of the
23492License at http://www.apache.org/licenses/LICENSE-2.0
23493
23494THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23495KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
23496WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
23497MERCHANTABLITY OR NON-INFRINGEMENT.
23498
23499See the Apache Version 2.0 License for specific language governing permissions
23500and limitations under the License.
23501***************************************************************************** */
23502/* global Reflect, Promise */
23503
23504var extendStatics = function(d, b) {
23505 extendStatics = Object.setPrototypeOf ||
23506 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23507 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
23508 return extendStatics(d, b);
23509};
23510
23511function __extends(d, b) {
23512 extendStatics(d, b);
23513 function __() { this.constructor = d; }
23514 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23515}
23516
23517var __assign = function() {
23518 __assign = Object.assign || function __assign(t) {
23519 for (var s, i = 1, n = arguments.length; i < n; i++) {
23520 s = arguments[i];
23521 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
23522 }
23523 return t;
23524 }
23525 return __assign.apply(this, arguments);
23526}
23527
23528function __rest(s, e) {
23529 var t = {};
23530 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
23531 t[p] = s[p];
23532 if (s != null && typeof Object.getOwnPropertySymbols === "function")
23533 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23534 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23535 t[p[i]] = s[p[i]];
23536 }
23537 return t;
23538}
23539
23540function __decorate(decorators, target, key, desc) {
23541 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23542 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
23543 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
23544 return c > 3 && r && Object.defineProperty(target, key, r), r;
23545}
23546
23547function __param(paramIndex, decorator) {
23548 return function (target, key) { decorator(target, key, paramIndex); }
23549}
23550
23551function __metadata(metadataKey, metadataValue) {
23552 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
23553}
23554
23555function __awaiter(thisArg, _arguments, P, generator) {
23556 return new (P || (P = Promise))(function (resolve, reject) {
23557 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
23558 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23559 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
23560 step((generator = generator.apply(thisArg, _arguments || [])).next());
23561 });
23562}
23563
23564function __generator(thisArg, body) {
23565 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23566 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23567 function verb(n) { return function (v) { return step([n, v]); }; }
23568 function step(op) {
23569 if (f) throw new TypeError("Generator is already executing.");
23570 while (_) try {
23571 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;
23572 if (y = 0, t) op = [op[0] & 2, t.value];
23573 switch (op[0]) {
23574 case 0: case 1: t = op; break;
23575 case 4: _.label++; return { value: op[1], done: false };
23576 case 5: _.label++; y = op[1]; op = [0]; continue;
23577 case 7: op = _.ops.pop(); _.trys.pop(); continue;
23578 default:
23579 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
23580 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
23581 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
23582 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
23583 if (t[2]) _.ops.pop();
23584 _.trys.pop(); continue;
23585 }
23586 op = body.call(thisArg, _);
23587 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
23588 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
23589 }
23590}
23591
23592function __exportStar(m, exports) {
23593 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
23594}
23595
23596function __values(o) {
23597 var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
23598 if (m) return m.call(o);
23599 return {
23600 next: function () {
23601 if (o && i >= o.length) o = void 0;
23602 return { value: o && o[i++], done: !o };
23603 }
23604 };
23605}
23606
23607function __read(o, n) {
23608 var m = typeof Symbol === "function" && o[Symbol.iterator];
23609 if (!m) return o;
23610 var i = m.call(o), r, ar = [], e;
23611 try {
23612 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23613 }
23614 catch (error) { e = { error: error }; }
23615 finally {
23616 try {
23617 if (r && !r.done && (m = i["return"])) m.call(i);
23618 }
23619 finally { if (e) throw e.error; }
23620 }
23621 return ar;
23622}
23623
23624function __spread() {
23625 for (var ar = [], i = 0; i < arguments.length; i++)
23626 ar = ar.concat(__read(arguments[i]));
23627 return ar;
23628}
23629
23630function __spreadArrays() {
23631 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
23632 for (var r = Array(s), k = 0, i = 0; i < il; i++)
23633 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
23634 r[k] = a[j];
23635 return r;
23636};
23637
23638function __await(v) {
23639 return this instanceof __await ? (this.v = v, this) : new __await(v);
23640}
23641
23642function __asyncGenerator(thisArg, _arguments, generator) {
23643 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
23644 var g = generator.apply(thisArg, _arguments || []), i, q = [];
23645 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
23646 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
23647 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
23648 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
23649 function fulfill(value) { resume("next", value); }
23650 function reject(value) { resume("throw", value); }
23651 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
23652}
23653
23654function __asyncDelegator(o) {
23655 var i, p;
23656 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
23657 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
23658}
23659
23660function __asyncValues(o) {
23661 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
23662 var m = o[Symbol.asyncIterator], i;
23663 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
23664 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
23665 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
23666}
23667
23668function __makeTemplateObject(cooked, raw) {
23669 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
23670 return cooked;
23671};
23672
23673function __importStar(mod) {
23674 if (mod && mod.__esModule) return mod;
23675 var result = {};
23676 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
23677 result.default = mod;
23678 return result;
23679}
23680
23681function __importDefault(mod) {
23682 return (mod && mod.__esModule) ? mod : { default: mod };
23683}
23684
23685
23686/***/ }),
23687/* 170 */
23688/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23689
23690"use strict";
23691__webpack_require__.r(__webpack_exports__);
23692/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23693/* harmony export */ "empty": () => /* binding */ empty
23694/* harmony export */ });
23695/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(171);
23696/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
23697/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
23698
23699
23700var empty = {
23701 closed: true,
23702 next: function (value) { },
23703 error: function (err) {
23704 if (_config__WEBPACK_IMPORTED_MODULE_0__.config.useDeprecatedSynchronousErrorHandling) {
23705 throw err;
23706 }
23707 else {
23708 (0,_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__.hostReportError)(err);
23709 }
23710 },
23711 complete: function () { }
23712};
23713//# sourceMappingURL=Observer.js.map
23714
23715
23716/***/ }),
23717/* 171 */
23718/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23719
23720"use strict";
23721__webpack_require__.r(__webpack_exports__);
23722/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23723/* harmony export */ "config": () => /* binding */ config
23724/* harmony export */ });
23725/** PURE_IMPORTS_START PURE_IMPORTS_END */
23726var _enable_super_gross_mode_that_will_cause_bad_things = false;
23727var config = {
23728 Promise: undefined,
23729 set useDeprecatedSynchronousErrorHandling(value) {
23730 if (value) {
23731 var error = /*@__PURE__*/ new Error();
23732 /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
23733 }
23734 else if (_enable_super_gross_mode_that_will_cause_bad_things) {
23735 /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
23736 }
23737 _enable_super_gross_mode_that_will_cause_bad_things = value;
23738 },
23739 get useDeprecatedSynchronousErrorHandling() {
23740 return _enable_super_gross_mode_that_will_cause_bad_things;
23741 },
23742};
23743//# sourceMappingURL=config.js.map
23744
23745
23746/***/ }),
23747/* 172 */
23748/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23749
23750"use strict";
23751__webpack_require__.r(__webpack_exports__);
23752/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23753/* harmony export */ "hostReportError": () => /* binding */ hostReportError
23754/* harmony export */ });
23755/** PURE_IMPORTS_START PURE_IMPORTS_END */
23756function hostReportError(err) {
23757 setTimeout(function () { throw err; }, 0);
23758}
23759//# sourceMappingURL=hostReportError.js.map
23760
23761
23762/***/ }),
23763/* 173 */
23764/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23765
23766"use strict";
23767__webpack_require__.r(__webpack_exports__);
23768/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23769/* harmony export */ "rxSubscriber": () => /* binding */ rxSubscriber,
23770/* harmony export */ "$$rxSubscriber": () => /* binding */ $$rxSubscriber
23771/* harmony export */ });
23772/** PURE_IMPORTS_START PURE_IMPORTS_END */
23773var rxSubscriber = /*@__PURE__*/ (function () {
23774 return typeof Symbol === 'function'
23775 ? /*@__PURE__*/ Symbol('rxSubscriber')
23776 : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();
23777})();
23778var $$rxSubscriber = rxSubscriber;
23779//# sourceMappingURL=rxSubscriber.js.map
23780
23781
23782/***/ }),
23783/* 174 */
23784/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23785
23786"use strict";
23787__webpack_require__.r(__webpack_exports__);
23788/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23789/* harmony export */ "Subscription": () => /* binding */ Subscription
23790/* harmony export */ });
23791/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
23792/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(178);
23793/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(175);
23794/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
23795/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
23796
23797
23798
23799
23800var Subscription = /*@__PURE__*/ (function () {
23801 function Subscription(unsubscribe) {
23802 this.closed = false;
23803 this._parentOrParents = null;
23804 this._subscriptions = null;
23805 if (unsubscribe) {
23806 this._unsubscribe = unsubscribe;
23807 }
23808 }
23809 Subscription.prototype.unsubscribe = function () {
23810 var errors;
23811 if (this.closed) {
23812 return;
23813 }
23814 var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
23815 this.closed = true;
23816 this._parentOrParents = null;
23817 this._subscriptions = null;
23818 if (_parentOrParents instanceof Subscription) {
23819 _parentOrParents.remove(this);
23820 }
23821 else if (_parentOrParents !== null) {
23822 for (var index = 0; index < _parentOrParents.length; ++index) {
23823 var parent_1 = _parentOrParents[index];
23824 parent_1.remove(this);
23825 }
23826 }
23827 if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(_unsubscribe)) {
23828 try {
23829 _unsubscribe.call(this);
23830 }
23831 catch (e) {
23832 errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
23833 }
23834 }
23835 if ((0,_util_isArray__WEBPACK_IMPORTED_MODULE_2__.isArray)(_subscriptions)) {
23836 var index = -1;
23837 var len = _subscriptions.length;
23838 while (++index < len) {
23839 var sub = _subscriptions[index];
23840 if ((0,_util_isObject__WEBPACK_IMPORTED_MODULE_3__.isObject)(sub)) {
23841 try {
23842 sub.unsubscribe();
23843 }
23844 catch (e) {
23845 errors = errors || [];
23846 if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError) {
23847 errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
23848 }
23849 else {
23850 errors.push(e);
23851 }
23852 }
23853 }
23854 }
23855 }
23856 if (errors) {
23857 throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError(errors);
23858 }
23859 };
23860 Subscription.prototype.add = function (teardown) {
23861 var subscription = teardown;
23862 if (!teardown) {
23863 return Subscription.EMPTY;
23864 }
23865 switch (typeof teardown) {
23866 case 'function':
23867 subscription = new Subscription(teardown);
23868 case 'object':
23869 if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
23870 return subscription;
23871 }
23872 else if (this.closed) {
23873 subscription.unsubscribe();
23874 return subscription;
23875 }
23876 else if (!(subscription instanceof Subscription)) {
23877 var tmp = subscription;
23878 subscription = new Subscription();
23879 subscription._subscriptions = [tmp];
23880 }
23881 break;
23882 default: {
23883 throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
23884 }
23885 }
23886 var _parentOrParents = subscription._parentOrParents;
23887 if (_parentOrParents === null) {
23888 subscription._parentOrParents = this;
23889 }
23890 else if (_parentOrParents instanceof Subscription) {
23891 if (_parentOrParents === this) {
23892 return subscription;
23893 }
23894 subscription._parentOrParents = [_parentOrParents, this];
23895 }
23896 else if (_parentOrParents.indexOf(this) === -1) {
23897 _parentOrParents.push(this);
23898 }
23899 else {
23900 return subscription;
23901 }
23902 var subscriptions = this._subscriptions;
23903 if (subscriptions === null) {
23904 this._subscriptions = [subscription];
23905 }
23906 else {
23907 subscriptions.push(subscription);
23908 }
23909 return subscription;
23910 };
23911 Subscription.prototype.remove = function (subscription) {
23912 var subscriptions = this._subscriptions;
23913 if (subscriptions) {
23914 var subscriptionIndex = subscriptions.indexOf(subscription);
23915 if (subscriptionIndex !== -1) {
23916 subscriptions.splice(subscriptionIndex, 1);
23917 }
23918 }
23919 };
23920 Subscription.EMPTY = (function (empty) {
23921 empty.closed = true;
23922 return empty;
23923 }(new Subscription()));
23924 return Subscription;
23925}());
23926
23927function flattenUnsubscriptionErrors(errors) {
23928 return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError) ? err.errors : err); }, []);
23929}
23930//# sourceMappingURL=Subscription.js.map
23931
23932
23933/***/ }),
23934/* 175 */
23935/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23936
23937"use strict";
23938__webpack_require__.r(__webpack_exports__);
23939/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23940/* harmony export */ "isFunction": () => /* binding */ isFunction
23941/* harmony export */ });
23942/** PURE_IMPORTS_START PURE_IMPORTS_END */
23943function isFunction(x) {
23944 return typeof x === 'function';
23945}
23946//# sourceMappingURL=isFunction.js.map
23947
23948
23949/***/ }),
23950/* 176 */
23951/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23952
23953"use strict";
23954__webpack_require__.r(__webpack_exports__);
23955/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23956/* harmony export */ "UnsubscriptionError": () => /* binding */ UnsubscriptionError
23957/* harmony export */ });
23958/** PURE_IMPORTS_START PURE_IMPORTS_END */
23959var UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {
23960 function UnsubscriptionErrorImpl(errors) {
23961 Error.call(this);
23962 this.message = errors ?
23963 errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
23964 this.name = 'UnsubscriptionError';
23965 this.errors = errors;
23966 return this;
23967 }
23968 UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
23969 return UnsubscriptionErrorImpl;
23970})();
23971var UnsubscriptionError = UnsubscriptionErrorImpl;
23972//# sourceMappingURL=UnsubscriptionError.js.map
23973
23974
23975/***/ }),
23976/* 177 */
23977/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23978
23979"use strict";
23980__webpack_require__.r(__webpack_exports__);
23981/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23982/* harmony export */ "isArray": () => /* binding */ isArray
23983/* harmony export */ });
23984/** PURE_IMPORTS_START PURE_IMPORTS_END */
23985var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();
23986//# sourceMappingURL=isArray.js.map
23987
23988
23989/***/ }),
23990/* 178 */
23991/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
23992
23993"use strict";
23994__webpack_require__.r(__webpack_exports__);
23995/* harmony export */ __webpack_require__.d(__webpack_exports__, {
23996/* harmony export */ "isObject": () => /* binding */ isObject
23997/* harmony export */ });
23998/** PURE_IMPORTS_START PURE_IMPORTS_END */
23999function isObject(x) {
24000 return x !== null && typeof x === 'object';
24001}
24002//# sourceMappingURL=isObject.js.map
24003
24004
24005/***/ }),
24006/* 179 */
24007/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24008
24009"use strict";
24010__webpack_require__.r(__webpack_exports__);
24011/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24012/* harmony export */ "canReportError": () => /* binding */ canReportError
24013/* harmony export */ });
24014/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(168);
24015/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */
24016
24017function canReportError(observer) {
24018 while (observer) {
24019 var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
24020 if (closed_1 || isStopped) {
24021 return false;
24022 }
24023 else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber) {
24024 observer = destination;
24025 }
24026 else {
24027 observer = null;
24028 }
24029 }
24030 return true;
24031}
24032//# sourceMappingURL=canReportError.js.map
24033
24034
24035/***/ }),
24036/* 180 */
24037/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24038
24039"use strict";
24040__webpack_require__.r(__webpack_exports__);
24041/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24042/* harmony export */ "observable": () => /* binding */ observable
24043/* harmony export */ });
24044/** PURE_IMPORTS_START PURE_IMPORTS_END */
24045var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();
24046//# sourceMappingURL=observable.js.map
24047
24048
24049/***/ }),
24050/* 181 */
24051/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24052
24053"use strict";
24054__webpack_require__.r(__webpack_exports__);
24055/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24056/* harmony export */ "pipe": () => /* binding */ pipe,
24057/* harmony export */ "pipeFromArray": () => /* binding */ pipeFromArray
24058/* harmony export */ });
24059/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(182);
24060/** PURE_IMPORTS_START _identity PURE_IMPORTS_END */
24061
24062function pipe() {
24063 var fns = [];
24064 for (var _i = 0; _i < arguments.length; _i++) {
24065 fns[_i] = arguments[_i];
24066 }
24067 return pipeFromArray(fns);
24068}
24069function pipeFromArray(fns) {
24070 if (fns.length === 0) {
24071 return _identity__WEBPACK_IMPORTED_MODULE_0__.identity;
24072 }
24073 if (fns.length === 1) {
24074 return fns[0];
24075 }
24076 return function piped(input) {
24077 return fns.reduce(function (prev, fn) { return fn(prev); }, input);
24078 };
24079}
24080//# sourceMappingURL=pipe.js.map
24081
24082
24083/***/ }),
24084/* 182 */
24085/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24086
24087"use strict";
24088__webpack_require__.r(__webpack_exports__);
24089/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24090/* harmony export */ "identity": () => /* binding */ identity
24091/* harmony export */ });
24092/** PURE_IMPORTS_START PURE_IMPORTS_END */
24093function identity(x) {
24094 return x;
24095}
24096//# sourceMappingURL=identity.js.map
24097
24098
24099/***/ }),
24100/* 183 */
24101/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24102
24103"use strict";
24104__webpack_require__.r(__webpack_exports__);
24105/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24106/* harmony export */ "ConnectableObservable": () => /* binding */ ConnectableObservable,
24107/* harmony export */ "connectableObservableDescriptor": () => /* binding */ connectableObservableDescriptor
24108/* harmony export */ });
24109/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24110/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
24111/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166);
24112/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(168);
24113/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
24114/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(184);
24115/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
24116
24117
24118
24119
24120
24121
24122var ConnectableObservable = /*@__PURE__*/ (function (_super) {
24123 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ConnectableObservable, _super);
24124 function ConnectableObservable(source, subjectFactory) {
24125 var _this = _super.call(this) || this;
24126 _this.source = source;
24127 _this.subjectFactory = subjectFactory;
24128 _this._refCount = 0;
24129 _this._isComplete = false;
24130 return _this;
24131 }
24132 ConnectableObservable.prototype._subscribe = function (subscriber) {
24133 return this.getSubject().subscribe(subscriber);
24134 };
24135 ConnectableObservable.prototype.getSubject = function () {
24136 var subject = this._subject;
24137 if (!subject || subject.isStopped) {
24138 this._subject = this.subjectFactory();
24139 }
24140 return this._subject;
24141 };
24142 ConnectableObservable.prototype.connect = function () {
24143 var connection = this._connection;
24144 if (!connection) {
24145 this._isComplete = false;
24146 connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
24147 connection.add(this.source
24148 .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
24149 if (connection.closed) {
24150 this._connection = null;
24151 connection = _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription.EMPTY;
24152 }
24153 }
24154 return connection;
24155 };
24156 ConnectableObservable.prototype.refCount = function () {
24157 return (0,_operators_refCount__WEBPACK_IMPORTED_MODULE_2__.refCount)()(this);
24158 };
24159 return ConnectableObservable;
24160}(_Observable__WEBPACK_IMPORTED_MODULE_3__.Observable));
24161
24162var connectableObservableDescriptor = /*@__PURE__*/ (function () {
24163 var connectableProto = ConnectableObservable.prototype;
24164 return {
24165 operator: { value: null },
24166 _refCount: { value: 0, writable: true },
24167 _subject: { value: null, writable: true },
24168 _connection: { value: null, writable: true },
24169 _subscribe: { value: connectableProto._subscribe },
24170 _isComplete: { value: connectableProto._isComplete, writable: true },
24171 getSubject: { value: connectableProto.getSubject },
24172 connect: { value: connectableProto.connect },
24173 refCount: { value: connectableProto.refCount }
24174 };
24175})();
24176var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
24177 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ConnectableSubscriber, _super);
24178 function ConnectableSubscriber(destination, connectable) {
24179 var _this = _super.call(this, destination) || this;
24180 _this.connectable = connectable;
24181 return _this;
24182 }
24183 ConnectableSubscriber.prototype._error = function (err) {
24184 this._unsubscribe();
24185 _super.prototype._error.call(this, err);
24186 };
24187 ConnectableSubscriber.prototype._complete = function () {
24188 this.connectable._isComplete = true;
24189 this._unsubscribe();
24190 _super.prototype._complete.call(this);
24191 };
24192 ConnectableSubscriber.prototype._unsubscribe = function () {
24193 var connectable = this.connectable;
24194 if (connectable) {
24195 this.connectable = null;
24196 var connection = connectable._connection;
24197 connectable._refCount = 0;
24198 connectable._subject = null;
24199 connectable._connection = null;
24200 if (connection) {
24201 connection.unsubscribe();
24202 }
24203 }
24204 };
24205 return ConnectableSubscriber;
24206}(_Subject__WEBPACK_IMPORTED_MODULE_4__.SubjectSubscriber));
24207var RefCountOperator = /*@__PURE__*/ (function () {
24208 function RefCountOperator(connectable) {
24209 this.connectable = connectable;
24210 }
24211 RefCountOperator.prototype.call = function (subscriber, source) {
24212 var connectable = this.connectable;
24213 connectable._refCount++;
24214 var refCounter = new RefCountSubscriber(subscriber, connectable);
24215 var subscription = source.subscribe(refCounter);
24216 if (!refCounter.closed) {
24217 refCounter.connection = connectable.connect();
24218 }
24219 return subscription;
24220 };
24221 return RefCountOperator;
24222}());
24223var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
24224 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(RefCountSubscriber, _super);
24225 function RefCountSubscriber(destination, connectable) {
24226 var _this = _super.call(this, destination) || this;
24227 _this.connectable = connectable;
24228 return _this;
24229 }
24230 RefCountSubscriber.prototype._unsubscribe = function () {
24231 var connectable = this.connectable;
24232 if (!connectable) {
24233 this.connection = null;
24234 return;
24235 }
24236 this.connectable = null;
24237 var refCount = connectable._refCount;
24238 if (refCount <= 0) {
24239 this.connection = null;
24240 return;
24241 }
24242 connectable._refCount = refCount - 1;
24243 if (refCount > 1) {
24244 this.connection = null;
24245 return;
24246 }
24247 var connection = this.connection;
24248 var sharedConnection = connectable._connection;
24249 this.connection = null;
24250 if (sharedConnection && (!connection || sharedConnection === connection)) {
24251 sharedConnection.unsubscribe();
24252 }
24253 };
24254 return RefCountSubscriber;
24255}(_Subscriber__WEBPACK_IMPORTED_MODULE_5__.Subscriber));
24256//# sourceMappingURL=ConnectableObservable.js.map
24257
24258
24259/***/ }),
24260/* 184 */
24261/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24262
24263"use strict";
24264__webpack_require__.r(__webpack_exports__);
24265/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24266/* harmony export */ "refCount": () => /* binding */ refCount
24267/* harmony export */ });
24268/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24269/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
24270/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
24271
24272
24273function refCount() {
24274 return function refCountOperatorFunction(source) {
24275 return source.lift(new RefCountOperator(source));
24276 };
24277}
24278var RefCountOperator = /*@__PURE__*/ (function () {
24279 function RefCountOperator(connectable) {
24280 this.connectable = connectable;
24281 }
24282 RefCountOperator.prototype.call = function (subscriber, source) {
24283 var connectable = this.connectable;
24284 connectable._refCount++;
24285 var refCounter = new RefCountSubscriber(subscriber, connectable);
24286 var subscription = source.subscribe(refCounter);
24287 if (!refCounter.closed) {
24288 refCounter.connection = connectable.connect();
24289 }
24290 return subscription;
24291 };
24292 return RefCountOperator;
24293}());
24294var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
24295 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(RefCountSubscriber, _super);
24296 function RefCountSubscriber(destination, connectable) {
24297 var _this = _super.call(this, destination) || this;
24298 _this.connectable = connectable;
24299 return _this;
24300 }
24301 RefCountSubscriber.prototype._unsubscribe = function () {
24302 var connectable = this.connectable;
24303 if (!connectable) {
24304 this.connection = null;
24305 return;
24306 }
24307 this.connectable = null;
24308 var refCount = connectable._refCount;
24309 if (refCount <= 0) {
24310 this.connection = null;
24311 return;
24312 }
24313 connectable._refCount = refCount - 1;
24314 if (refCount > 1) {
24315 this.connection = null;
24316 return;
24317 }
24318 var connection = this.connection;
24319 var sharedConnection = connectable._connection;
24320 this.connection = null;
24321 if (sharedConnection && (!connection || sharedConnection === connection)) {
24322 sharedConnection.unsubscribe();
24323 }
24324 };
24325 return RefCountSubscriber;
24326}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
24327//# sourceMappingURL=refCount.js.map
24328
24329
24330/***/ }),
24331/* 185 */
24332/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24333
24334"use strict";
24335__webpack_require__.r(__webpack_exports__);
24336/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24337/* harmony export */ "SubjectSubscriber": () => /* binding */ SubjectSubscriber,
24338/* harmony export */ "Subject": () => /* binding */ Subject,
24339/* harmony export */ "AnonymousSubject": () => /* binding */ AnonymousSubject
24340/* harmony export */ });
24341/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24342/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(166);
24343/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
24344/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(174);
24345/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(186);
24346/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(187);
24347/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173);
24348/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
24349
24350
24351
24352
24353
24354
24355
24356var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
24357 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SubjectSubscriber, _super);
24358 function SubjectSubscriber(destination) {
24359 var _this = _super.call(this, destination) || this;
24360 _this.destination = destination;
24361 return _this;
24362 }
24363 return SubjectSubscriber;
24364}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
24365
24366var Subject = /*@__PURE__*/ (function (_super) {
24367 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(Subject, _super);
24368 function Subject() {
24369 var _this = _super.call(this) || this;
24370 _this.observers = [];
24371 _this.closed = false;
24372 _this.isStopped = false;
24373 _this.hasError = false;
24374 _this.thrownError = null;
24375 return _this;
24376 }
24377 Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_2__.rxSubscriber] = function () {
24378 return new SubjectSubscriber(this);
24379 };
24380 Subject.prototype.lift = function (operator) {
24381 var subject = new AnonymousSubject(this, this);
24382 subject.operator = operator;
24383 return subject;
24384 };
24385 Subject.prototype.next = function (value) {
24386 if (this.closed) {
24387 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
24388 }
24389 if (!this.isStopped) {
24390 var observers = this.observers;
24391 var len = observers.length;
24392 var copy = observers.slice();
24393 for (var i = 0; i < len; i++) {
24394 copy[i].next(value);
24395 }
24396 }
24397 };
24398 Subject.prototype.error = function (err) {
24399 if (this.closed) {
24400 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
24401 }
24402 this.hasError = true;
24403 this.thrownError = err;
24404 this.isStopped = true;
24405 var observers = this.observers;
24406 var len = observers.length;
24407 var copy = observers.slice();
24408 for (var i = 0; i < len; i++) {
24409 copy[i].error(err);
24410 }
24411 this.observers.length = 0;
24412 };
24413 Subject.prototype.complete = function () {
24414 if (this.closed) {
24415 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
24416 }
24417 this.isStopped = true;
24418 var observers = this.observers;
24419 var len = observers.length;
24420 var copy = observers.slice();
24421 for (var i = 0; i < len; i++) {
24422 copy[i].complete();
24423 }
24424 this.observers.length = 0;
24425 };
24426 Subject.prototype.unsubscribe = function () {
24427 this.isStopped = true;
24428 this.closed = true;
24429 this.observers = null;
24430 };
24431 Subject.prototype._trySubscribe = function (subscriber) {
24432 if (this.closed) {
24433 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
24434 }
24435 else {
24436 return _super.prototype._trySubscribe.call(this, subscriber);
24437 }
24438 };
24439 Subject.prototype._subscribe = function (subscriber) {
24440 if (this.closed) {
24441 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__.ObjectUnsubscribedError();
24442 }
24443 else if (this.hasError) {
24444 subscriber.error(this.thrownError);
24445 return _Subscription__WEBPACK_IMPORTED_MODULE_4__.Subscription.EMPTY;
24446 }
24447 else if (this.isStopped) {
24448 subscriber.complete();
24449 return _Subscription__WEBPACK_IMPORTED_MODULE_4__.Subscription.EMPTY;
24450 }
24451 else {
24452 this.observers.push(subscriber);
24453 return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__.SubjectSubscription(this, subscriber);
24454 }
24455 };
24456 Subject.prototype.asObservable = function () {
24457 var observable = new _Observable__WEBPACK_IMPORTED_MODULE_6__.Observable();
24458 observable.source = this;
24459 return observable;
24460 };
24461 Subject.create = function (destination, source) {
24462 return new AnonymousSubject(destination, source);
24463 };
24464 return Subject;
24465}(_Observable__WEBPACK_IMPORTED_MODULE_6__.Observable));
24466
24467var AnonymousSubject = /*@__PURE__*/ (function (_super) {
24468 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AnonymousSubject, _super);
24469 function AnonymousSubject(destination, source) {
24470 var _this = _super.call(this) || this;
24471 _this.destination = destination;
24472 _this.source = source;
24473 return _this;
24474 }
24475 AnonymousSubject.prototype.next = function (value) {
24476 var destination = this.destination;
24477 if (destination && destination.next) {
24478 destination.next(value);
24479 }
24480 };
24481 AnonymousSubject.prototype.error = function (err) {
24482 var destination = this.destination;
24483 if (destination && destination.error) {
24484 this.destination.error(err);
24485 }
24486 };
24487 AnonymousSubject.prototype.complete = function () {
24488 var destination = this.destination;
24489 if (destination && destination.complete) {
24490 this.destination.complete();
24491 }
24492 };
24493 AnonymousSubject.prototype._subscribe = function (subscriber) {
24494 var source = this.source;
24495 if (source) {
24496 return this.source.subscribe(subscriber);
24497 }
24498 else {
24499 return _Subscription__WEBPACK_IMPORTED_MODULE_4__.Subscription.EMPTY;
24500 }
24501 };
24502 return AnonymousSubject;
24503}(Subject));
24504
24505//# sourceMappingURL=Subject.js.map
24506
24507
24508/***/ }),
24509/* 186 */
24510/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24511
24512"use strict";
24513__webpack_require__.r(__webpack_exports__);
24514/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24515/* harmony export */ "ObjectUnsubscribedError": () => /* binding */ ObjectUnsubscribedError
24516/* harmony export */ });
24517/** PURE_IMPORTS_START PURE_IMPORTS_END */
24518var ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {
24519 function ObjectUnsubscribedErrorImpl() {
24520 Error.call(this);
24521 this.message = 'object unsubscribed';
24522 this.name = 'ObjectUnsubscribedError';
24523 return this;
24524 }
24525 ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
24526 return ObjectUnsubscribedErrorImpl;
24527})();
24528var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
24529//# sourceMappingURL=ObjectUnsubscribedError.js.map
24530
24531
24532/***/ }),
24533/* 187 */
24534/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24535
24536"use strict";
24537__webpack_require__.r(__webpack_exports__);
24538/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24539/* harmony export */ "SubjectSubscription": () => /* binding */ SubjectSubscription
24540/* harmony export */ });
24541/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24542/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
24543/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
24544
24545
24546var SubjectSubscription = /*@__PURE__*/ (function (_super) {
24547 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SubjectSubscription, _super);
24548 function SubjectSubscription(subject, subscriber) {
24549 var _this = _super.call(this) || this;
24550 _this.subject = subject;
24551 _this.subscriber = subscriber;
24552 _this.closed = false;
24553 return _this;
24554 }
24555 SubjectSubscription.prototype.unsubscribe = function () {
24556 if (this.closed) {
24557 return;
24558 }
24559 this.closed = true;
24560 var subject = this.subject;
24561 var observers = subject.observers;
24562 this.subject = null;
24563 if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
24564 return;
24565 }
24566 var subscriberIndex = observers.indexOf(this.subscriber);
24567 if (subscriberIndex !== -1) {
24568 observers.splice(subscriberIndex, 1);
24569 }
24570 };
24571 return SubjectSubscription;
24572}(_Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription));
24573
24574//# sourceMappingURL=SubjectSubscription.js.map
24575
24576
24577/***/ }),
24578/* 188 */
24579/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24580
24581"use strict";
24582__webpack_require__.r(__webpack_exports__);
24583/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24584/* harmony export */ "groupBy": () => /* binding */ groupBy,
24585/* harmony export */ "GroupedObservable": () => /* binding */ GroupedObservable
24586/* harmony export */ });
24587/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24588/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
24589/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(174);
24590/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(166);
24591/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
24592/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
24593
24594
24595
24596
24597
24598function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
24599 return function (source) {
24600 return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
24601 };
24602}
24603var GroupByOperator = /*@__PURE__*/ (function () {
24604 function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
24605 this.keySelector = keySelector;
24606 this.elementSelector = elementSelector;
24607 this.durationSelector = durationSelector;
24608 this.subjectSelector = subjectSelector;
24609 }
24610 GroupByOperator.prototype.call = function (subscriber, source) {
24611 return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
24612 };
24613 return GroupByOperator;
24614}());
24615var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
24616 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(GroupBySubscriber, _super);
24617 function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
24618 var _this = _super.call(this, destination) || this;
24619 _this.keySelector = keySelector;
24620 _this.elementSelector = elementSelector;
24621 _this.durationSelector = durationSelector;
24622 _this.subjectSelector = subjectSelector;
24623 _this.groups = null;
24624 _this.attemptedToUnsubscribe = false;
24625 _this.count = 0;
24626 return _this;
24627 }
24628 GroupBySubscriber.prototype._next = function (value) {
24629 var key;
24630 try {
24631 key = this.keySelector(value);
24632 }
24633 catch (err) {
24634 this.error(err);
24635 return;
24636 }
24637 this._group(value, key);
24638 };
24639 GroupBySubscriber.prototype._group = function (value, key) {
24640 var groups = this.groups;
24641 if (!groups) {
24642 groups = this.groups = new Map();
24643 }
24644 var group = groups.get(key);
24645 var element;
24646 if (this.elementSelector) {
24647 try {
24648 element = this.elementSelector(value);
24649 }
24650 catch (err) {
24651 this.error(err);
24652 }
24653 }
24654 else {
24655 element = value;
24656 }
24657 if (!group) {
24658 group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_1__.Subject());
24659 groups.set(key, group);
24660 var groupedObservable = new GroupedObservable(key, group, this);
24661 this.destination.next(groupedObservable);
24662 if (this.durationSelector) {
24663 var duration = void 0;
24664 try {
24665 duration = this.durationSelector(new GroupedObservable(key, group));
24666 }
24667 catch (err) {
24668 this.error(err);
24669 return;
24670 }
24671 this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
24672 }
24673 }
24674 if (!group.closed) {
24675 group.next(element);
24676 }
24677 };
24678 GroupBySubscriber.prototype._error = function (err) {
24679 var groups = this.groups;
24680 if (groups) {
24681 groups.forEach(function (group, key) {
24682 group.error(err);
24683 });
24684 groups.clear();
24685 }
24686 this.destination.error(err);
24687 };
24688 GroupBySubscriber.prototype._complete = function () {
24689 var groups = this.groups;
24690 if (groups) {
24691 groups.forEach(function (group, key) {
24692 group.complete();
24693 });
24694 groups.clear();
24695 }
24696 this.destination.complete();
24697 };
24698 GroupBySubscriber.prototype.removeGroup = function (key) {
24699 this.groups.delete(key);
24700 };
24701 GroupBySubscriber.prototype.unsubscribe = function () {
24702 if (!this.closed) {
24703 this.attemptedToUnsubscribe = true;
24704 if (this.count === 0) {
24705 _super.prototype.unsubscribe.call(this);
24706 }
24707 }
24708 };
24709 return GroupBySubscriber;
24710}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
24711var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
24712 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(GroupDurationSubscriber, _super);
24713 function GroupDurationSubscriber(key, group, parent) {
24714 var _this = _super.call(this, group) || this;
24715 _this.key = key;
24716 _this.group = group;
24717 _this.parent = parent;
24718 return _this;
24719 }
24720 GroupDurationSubscriber.prototype._next = function (value) {
24721 this.complete();
24722 };
24723 GroupDurationSubscriber.prototype._unsubscribe = function () {
24724 var _a = this, parent = _a.parent, key = _a.key;
24725 this.key = this.parent = null;
24726 if (parent) {
24727 parent.removeGroup(key);
24728 }
24729 };
24730 return GroupDurationSubscriber;
24731}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
24732var GroupedObservable = /*@__PURE__*/ (function (_super) {
24733 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(GroupedObservable, _super);
24734 function GroupedObservable(key, groupSubject, refCountSubscription) {
24735 var _this = _super.call(this) || this;
24736 _this.key = key;
24737 _this.groupSubject = groupSubject;
24738 _this.refCountSubscription = refCountSubscription;
24739 return _this;
24740 }
24741 GroupedObservable.prototype._subscribe = function (subscriber) {
24742 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_3__.Subscription();
24743 var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
24744 if (refCountSubscription && !refCountSubscription.closed) {
24745 subscription.add(new InnerRefCountSubscription(refCountSubscription));
24746 }
24747 subscription.add(groupSubject.subscribe(subscriber));
24748 return subscription;
24749 };
24750 return GroupedObservable;
24751}(_Observable__WEBPACK_IMPORTED_MODULE_4__.Observable));
24752
24753var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
24754 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(InnerRefCountSubscription, _super);
24755 function InnerRefCountSubscription(parent) {
24756 var _this = _super.call(this) || this;
24757 _this.parent = parent;
24758 parent.count++;
24759 return _this;
24760 }
24761 InnerRefCountSubscription.prototype.unsubscribe = function () {
24762 var parent = this.parent;
24763 if (!parent.closed && !this.closed) {
24764 _super.prototype.unsubscribe.call(this);
24765 parent.count -= 1;
24766 if (parent.count === 0 && parent.attemptedToUnsubscribe) {
24767 parent.unsubscribe();
24768 }
24769 }
24770 };
24771 return InnerRefCountSubscription;
24772}(_Subscription__WEBPACK_IMPORTED_MODULE_3__.Subscription));
24773//# sourceMappingURL=groupBy.js.map
24774
24775
24776/***/ }),
24777/* 189 */
24778/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24779
24780"use strict";
24781__webpack_require__.r(__webpack_exports__);
24782/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24783/* harmony export */ "BehaviorSubject": () => /* binding */ BehaviorSubject
24784/* harmony export */ });
24785/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24786/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
24787/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(186);
24788/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
24789
24790
24791
24792var BehaviorSubject = /*@__PURE__*/ (function (_super) {
24793 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(BehaviorSubject, _super);
24794 function BehaviorSubject(_value) {
24795 var _this = _super.call(this) || this;
24796 _this._value = _value;
24797 return _this;
24798 }
24799 Object.defineProperty(BehaviorSubject.prototype, "value", {
24800 get: function () {
24801 return this.getValue();
24802 },
24803 enumerable: true,
24804 configurable: true
24805 });
24806 BehaviorSubject.prototype._subscribe = function (subscriber) {
24807 var subscription = _super.prototype._subscribe.call(this, subscriber);
24808 if (subscription && !subscription.closed) {
24809 subscriber.next(this._value);
24810 }
24811 return subscription;
24812 };
24813 BehaviorSubject.prototype.getValue = function () {
24814 if (this.hasError) {
24815 throw this.thrownError;
24816 }
24817 else if (this.closed) {
24818 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__.ObjectUnsubscribedError();
24819 }
24820 else {
24821 return this._value;
24822 }
24823 };
24824 BehaviorSubject.prototype.next = function (value) {
24825 _super.prototype.next.call(this, this._value = value);
24826 };
24827 return BehaviorSubject;
24828}(_Subject__WEBPACK_IMPORTED_MODULE_2__.Subject));
24829
24830//# sourceMappingURL=BehaviorSubject.js.map
24831
24832
24833/***/ }),
24834/* 190 */
24835/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24836
24837"use strict";
24838__webpack_require__.r(__webpack_exports__);
24839/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24840/* harmony export */ "ReplaySubject": () => /* binding */ ReplaySubject
24841/* harmony export */ });
24842/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24843/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(185);
24844/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(200);
24845/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(174);
24846/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(191);
24847/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(186);
24848/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(187);
24849/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
24850
24851
24852
24853
24854
24855
24856
24857var ReplaySubject = /*@__PURE__*/ (function (_super) {
24858 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ReplaySubject, _super);
24859 function ReplaySubject(bufferSize, windowTime, scheduler) {
24860 if (bufferSize === void 0) {
24861 bufferSize = Number.POSITIVE_INFINITY;
24862 }
24863 if (windowTime === void 0) {
24864 windowTime = Number.POSITIVE_INFINITY;
24865 }
24866 var _this = _super.call(this) || this;
24867 _this.scheduler = scheduler;
24868 _this._events = [];
24869 _this._infiniteTimeWindow = false;
24870 _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
24871 _this._windowTime = windowTime < 1 ? 1 : windowTime;
24872 if (windowTime === Number.POSITIVE_INFINITY) {
24873 _this._infiniteTimeWindow = true;
24874 _this.next = _this.nextInfiniteTimeWindow;
24875 }
24876 else {
24877 _this.next = _this.nextTimeWindow;
24878 }
24879 return _this;
24880 }
24881 ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
24882 var _events = this._events;
24883 _events.push(value);
24884 if (_events.length > this._bufferSize) {
24885 _events.shift();
24886 }
24887 _super.prototype.next.call(this, value);
24888 };
24889 ReplaySubject.prototype.nextTimeWindow = function (value) {
24890 this._events.push(new ReplayEvent(this._getNow(), value));
24891 this._trimBufferThenGetEvents();
24892 _super.prototype.next.call(this, value);
24893 };
24894 ReplaySubject.prototype._subscribe = function (subscriber) {
24895 var _infiniteTimeWindow = this._infiniteTimeWindow;
24896 var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
24897 var scheduler = this.scheduler;
24898 var len = _events.length;
24899 var subscription;
24900 if (this.closed) {
24901 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__.ObjectUnsubscribedError();
24902 }
24903 else if (this.isStopped || this.hasError) {
24904 subscription = _Subscription__WEBPACK_IMPORTED_MODULE_2__.Subscription.EMPTY;
24905 }
24906 else {
24907 this.observers.push(subscriber);
24908 subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_3__.SubjectSubscription(this, subscriber);
24909 }
24910 if (scheduler) {
24911 subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__.ObserveOnSubscriber(subscriber, scheduler));
24912 }
24913 if (_infiniteTimeWindow) {
24914 for (var i = 0; i < len && !subscriber.closed; i++) {
24915 subscriber.next(_events[i]);
24916 }
24917 }
24918 else {
24919 for (var i = 0; i < len && !subscriber.closed; i++) {
24920 subscriber.next(_events[i].value);
24921 }
24922 }
24923 if (this.hasError) {
24924 subscriber.error(this.thrownError);
24925 }
24926 else if (this.isStopped) {
24927 subscriber.complete();
24928 }
24929 return subscription;
24930 };
24931 ReplaySubject.prototype._getNow = function () {
24932 return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_5__.queue).now();
24933 };
24934 ReplaySubject.prototype._trimBufferThenGetEvents = function () {
24935 var now = this._getNow();
24936 var _bufferSize = this._bufferSize;
24937 var _windowTime = this._windowTime;
24938 var _events = this._events;
24939 var eventsCount = _events.length;
24940 var spliceCount = 0;
24941 while (spliceCount < eventsCount) {
24942 if ((now - _events[spliceCount].time) < _windowTime) {
24943 break;
24944 }
24945 spliceCount++;
24946 }
24947 if (eventsCount > _bufferSize) {
24948 spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
24949 }
24950 if (spliceCount > 0) {
24951 _events.splice(0, spliceCount);
24952 }
24953 return _events;
24954 };
24955 return ReplaySubject;
24956}(_Subject__WEBPACK_IMPORTED_MODULE_6__.Subject));
24957
24958var ReplayEvent = /*@__PURE__*/ (function () {
24959 function ReplayEvent(time, value) {
24960 this.time = time;
24961 this.value = value;
24962 }
24963 return ReplayEvent;
24964}());
24965//# sourceMappingURL=ReplaySubject.js.map
24966
24967
24968/***/ }),
24969/* 191 */
24970/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
24971
24972"use strict";
24973__webpack_require__.r(__webpack_exports__);
24974/* harmony export */ __webpack_require__.d(__webpack_exports__, {
24975/* harmony export */ "observeOn": () => /* binding */ observeOn,
24976/* harmony export */ "ObserveOnOperator": () => /* binding */ ObserveOnOperator,
24977/* harmony export */ "ObserveOnSubscriber": () => /* binding */ ObserveOnSubscriber,
24978/* harmony export */ "ObserveOnMessage": () => /* binding */ ObserveOnMessage
24979/* harmony export */ });
24980/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
24981/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
24982/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(192);
24983/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
24984
24985
24986
24987function observeOn(scheduler, delay) {
24988 if (delay === void 0) {
24989 delay = 0;
24990 }
24991 return function observeOnOperatorFunction(source) {
24992 return source.lift(new ObserveOnOperator(scheduler, delay));
24993 };
24994}
24995var ObserveOnOperator = /*@__PURE__*/ (function () {
24996 function ObserveOnOperator(scheduler, delay) {
24997 if (delay === void 0) {
24998 delay = 0;
24999 }
25000 this.scheduler = scheduler;
25001 this.delay = delay;
25002 }
25003 ObserveOnOperator.prototype.call = function (subscriber, source) {
25004 return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
25005 };
25006 return ObserveOnOperator;
25007}());
25008
25009var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
25010 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ObserveOnSubscriber, _super);
25011 function ObserveOnSubscriber(destination, scheduler, delay) {
25012 if (delay === void 0) {
25013 delay = 0;
25014 }
25015 var _this = _super.call(this, destination) || this;
25016 _this.scheduler = scheduler;
25017 _this.delay = delay;
25018 return _this;
25019 }
25020 ObserveOnSubscriber.dispatch = function (arg) {
25021 var notification = arg.notification, destination = arg.destination;
25022 notification.observe(destination);
25023 this.unsubscribe();
25024 };
25025 ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
25026 var destination = this.destination;
25027 destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
25028 };
25029 ObserveOnSubscriber.prototype._next = function (value) {
25030 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__.Notification.createNext(value));
25031 };
25032 ObserveOnSubscriber.prototype._error = function (err) {
25033 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__.Notification.createError(err));
25034 this.unsubscribe();
25035 };
25036 ObserveOnSubscriber.prototype._complete = function () {
25037 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__.Notification.createComplete());
25038 this.unsubscribe();
25039 };
25040 return ObserveOnSubscriber;
25041}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
25042
25043var ObserveOnMessage = /*@__PURE__*/ (function () {
25044 function ObserveOnMessage(notification, destination) {
25045 this.notification = notification;
25046 this.destination = destination;
25047 }
25048 return ObserveOnMessage;
25049}());
25050
25051//# sourceMappingURL=observeOn.js.map
25052
25053
25054/***/ }),
25055/* 192 */
25056/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25057
25058"use strict";
25059__webpack_require__.r(__webpack_exports__);
25060/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25061/* harmony export */ "NotificationKind": () => /* binding */ NotificationKind,
25062/* harmony export */ "Notification": () => /* binding */ Notification
25063/* harmony export */ });
25064/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(199);
25065/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193);
25066/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(198);
25067/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
25068
25069
25070
25071var NotificationKind;
25072/*@__PURE__*/ (function (NotificationKind) {
25073 NotificationKind["NEXT"] = "N";
25074 NotificationKind["ERROR"] = "E";
25075 NotificationKind["COMPLETE"] = "C";
25076})(NotificationKind || (NotificationKind = {}));
25077var Notification = /*@__PURE__*/ (function () {
25078 function Notification(kind, value, error) {
25079 this.kind = kind;
25080 this.value = value;
25081 this.error = error;
25082 this.hasValue = kind === 'N';
25083 }
25084 Notification.prototype.observe = function (observer) {
25085 switch (this.kind) {
25086 case 'N':
25087 return observer.next && observer.next(this.value);
25088 case 'E':
25089 return observer.error && observer.error(this.error);
25090 case 'C':
25091 return observer.complete && observer.complete();
25092 }
25093 };
25094 Notification.prototype.do = function (next, error, complete) {
25095 var kind = this.kind;
25096 switch (kind) {
25097 case 'N':
25098 return next && next(this.value);
25099 case 'E':
25100 return error && error(this.error);
25101 case 'C':
25102 return complete && complete();
25103 }
25104 };
25105 Notification.prototype.accept = function (nextOrObserver, error, complete) {
25106 if (nextOrObserver && typeof nextOrObserver.next === 'function') {
25107 return this.observe(nextOrObserver);
25108 }
25109 else {
25110 return this.do(nextOrObserver, error, complete);
25111 }
25112 };
25113 Notification.prototype.toObservable = function () {
25114 var kind = this.kind;
25115 switch (kind) {
25116 case 'N':
25117 return (0,_observable_of__WEBPACK_IMPORTED_MODULE_0__.of)(this.value);
25118 case 'E':
25119 return (0,_observable_throwError__WEBPACK_IMPORTED_MODULE_1__.throwError)(this.error);
25120 case 'C':
25121 return (0,_observable_empty__WEBPACK_IMPORTED_MODULE_2__.empty)();
25122 }
25123 throw new Error('unexpected notification kind value');
25124 };
25125 Notification.createNext = function (value) {
25126 if (typeof value !== 'undefined') {
25127 return new Notification('N', value);
25128 }
25129 return Notification.undefinedValueNotification;
25130 };
25131 Notification.createError = function (err) {
25132 return new Notification('E', undefined, err);
25133 };
25134 Notification.createComplete = function () {
25135 return Notification.completeNotification;
25136 };
25137 Notification.completeNotification = new Notification('C');
25138 Notification.undefinedValueNotification = new Notification('N', undefined);
25139 return Notification;
25140}());
25141
25142//# sourceMappingURL=Notification.js.map
25143
25144
25145/***/ }),
25146/* 193 */
25147/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25148
25149"use strict";
25150__webpack_require__.r(__webpack_exports__);
25151/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25152/* harmony export */ "of": () => /* binding */ of
25153/* harmony export */ });
25154/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
25155/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(196);
25156/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(195);
25157/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
25158
25159
25160
25161function of() {
25162 var args = [];
25163 for (var _i = 0; _i < arguments.length; _i++) {
25164 args[_i] = arguments[_i];
25165 }
25166 var scheduler = args[args.length - 1];
25167 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(scheduler)) {
25168 args.pop();
25169 return (0,_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_1__.scheduleArray)(args, scheduler);
25170 }
25171 else {
25172 return (0,_fromArray__WEBPACK_IMPORTED_MODULE_2__.fromArray)(args);
25173 }
25174}
25175//# sourceMappingURL=of.js.map
25176
25177
25178/***/ }),
25179/* 194 */
25180/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25181
25182"use strict";
25183__webpack_require__.r(__webpack_exports__);
25184/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25185/* harmony export */ "isScheduler": () => /* binding */ isScheduler
25186/* harmony export */ });
25187/** PURE_IMPORTS_START PURE_IMPORTS_END */
25188function isScheduler(value) {
25189 return value && typeof value.schedule === 'function';
25190}
25191//# sourceMappingURL=isScheduler.js.map
25192
25193
25194/***/ }),
25195/* 195 */
25196/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25197
25198"use strict";
25199__webpack_require__.r(__webpack_exports__);
25200/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25201/* harmony export */ "scheduleArray": () => /* binding */ scheduleArray
25202/* harmony export */ });
25203/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
25204/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
25205/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
25206
25207
25208function scheduleArray(input, scheduler) {
25209 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
25210 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
25211 var i = 0;
25212 sub.add(scheduler.schedule(function () {
25213 if (i === input.length) {
25214 subscriber.complete();
25215 return;
25216 }
25217 subscriber.next(input[i++]);
25218 if (!subscriber.closed) {
25219 sub.add(this.schedule());
25220 }
25221 }));
25222 return sub;
25223 });
25224}
25225//# sourceMappingURL=scheduleArray.js.map
25226
25227
25228/***/ }),
25229/* 196 */
25230/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25231
25232"use strict";
25233__webpack_require__.r(__webpack_exports__);
25234/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25235/* harmony export */ "fromArray": () => /* binding */ fromArray
25236/* harmony export */ });
25237/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
25238/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
25239/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(195);
25240/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */
25241
25242
25243
25244function fromArray(input, scheduler) {
25245 if (!scheduler) {
25246 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable((0,_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__.subscribeToArray)(input));
25247 }
25248 else {
25249 return (0,_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__.scheduleArray)(input, scheduler);
25250 }
25251}
25252//# sourceMappingURL=fromArray.js.map
25253
25254
25255/***/ }),
25256/* 197 */
25257/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25258
25259"use strict";
25260__webpack_require__.r(__webpack_exports__);
25261/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25262/* harmony export */ "subscribeToArray": () => /* binding */ subscribeToArray
25263/* harmony export */ });
25264/** PURE_IMPORTS_START PURE_IMPORTS_END */
25265var subscribeToArray = function (array) {
25266 return function (subscriber) {
25267 for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
25268 subscriber.next(array[i]);
25269 }
25270 subscriber.complete();
25271 };
25272};
25273//# sourceMappingURL=subscribeToArray.js.map
25274
25275
25276/***/ }),
25277/* 198 */
25278/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25279
25280"use strict";
25281__webpack_require__.r(__webpack_exports__);
25282/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25283/* harmony export */ "throwError": () => /* binding */ throwError
25284/* harmony export */ });
25285/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
25286/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
25287
25288function throwError(error, scheduler) {
25289 if (!scheduler) {
25290 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) { return subscriber.error(error); });
25291 }
25292 else {
25293 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
25294 }
25295}
25296function dispatch(_a) {
25297 var error = _a.error, subscriber = _a.subscriber;
25298 subscriber.error(error);
25299}
25300//# sourceMappingURL=throwError.js.map
25301
25302
25303/***/ }),
25304/* 199 */
25305/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25306
25307"use strict";
25308__webpack_require__.r(__webpack_exports__);
25309/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25310/* harmony export */ "EMPTY": () => /* binding */ EMPTY,
25311/* harmony export */ "empty": () => /* binding */ empty
25312/* harmony export */ });
25313/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
25314/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
25315
25316var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) { return subscriber.complete(); });
25317function empty(scheduler) {
25318 return scheduler ? emptyScheduled(scheduler) : EMPTY;
25319}
25320function emptyScheduled(scheduler) {
25321 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
25322}
25323//# sourceMappingURL=empty.js.map
25324
25325
25326/***/ }),
25327/* 200 */
25328/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25329
25330"use strict";
25331__webpack_require__.r(__webpack_exports__);
25332/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25333/* harmony export */ "queue": () => /* binding */ queue
25334/* harmony export */ });
25335/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(204);
25336/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(201);
25337/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
25338
25339
25340var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_0__.QueueScheduler(_QueueAction__WEBPACK_IMPORTED_MODULE_1__.QueueAction);
25341//# sourceMappingURL=queue.js.map
25342
25343
25344/***/ }),
25345/* 201 */
25346/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25347
25348"use strict";
25349__webpack_require__.r(__webpack_exports__);
25350/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25351/* harmony export */ "QueueScheduler": () => /* binding */ QueueScheduler
25352/* harmony export */ });
25353/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25354/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
25355/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25356
25357
25358var QueueScheduler = /*@__PURE__*/ (function (_super) {
25359 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(QueueScheduler, _super);
25360 function QueueScheduler() {
25361 return _super !== null && _super.apply(this, arguments) || this;
25362 }
25363 return QueueScheduler;
25364}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__.AsyncScheduler));
25365
25366//# sourceMappingURL=QueueScheduler.js.map
25367
25368
25369/***/ }),
25370/* 202 */
25371/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25372
25373"use strict";
25374__webpack_require__.r(__webpack_exports__);
25375/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25376/* harmony export */ "AsyncScheduler": () => /* binding */ AsyncScheduler
25377/* harmony export */ });
25378/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25379/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
25380/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
25381
25382
25383var AsyncScheduler = /*@__PURE__*/ (function (_super) {
25384 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AsyncScheduler, _super);
25385 function AsyncScheduler(SchedulerAction, now) {
25386 if (now === void 0) {
25387 now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__.Scheduler.now;
25388 }
25389 var _this = _super.call(this, SchedulerAction, function () {
25390 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
25391 return AsyncScheduler.delegate.now();
25392 }
25393 else {
25394 return now();
25395 }
25396 }) || this;
25397 _this.actions = [];
25398 _this.active = false;
25399 _this.scheduled = undefined;
25400 return _this;
25401 }
25402 AsyncScheduler.prototype.schedule = function (work, delay, state) {
25403 if (delay === void 0) {
25404 delay = 0;
25405 }
25406 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
25407 return AsyncScheduler.delegate.schedule(work, delay, state);
25408 }
25409 else {
25410 return _super.prototype.schedule.call(this, work, delay, state);
25411 }
25412 };
25413 AsyncScheduler.prototype.flush = function (action) {
25414 var actions = this.actions;
25415 if (this.active) {
25416 actions.push(action);
25417 return;
25418 }
25419 var error;
25420 this.active = true;
25421 do {
25422 if (error = action.execute(action.state, action.delay)) {
25423 break;
25424 }
25425 } while (action = actions.shift());
25426 this.active = false;
25427 if (error) {
25428 while (action = actions.shift()) {
25429 action.unsubscribe();
25430 }
25431 throw error;
25432 }
25433 };
25434 return AsyncScheduler;
25435}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__.Scheduler));
25436
25437//# sourceMappingURL=AsyncScheduler.js.map
25438
25439
25440/***/ }),
25441/* 203 */
25442/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25443
25444"use strict";
25445__webpack_require__.r(__webpack_exports__);
25446/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25447/* harmony export */ "Scheduler": () => /* binding */ Scheduler
25448/* harmony export */ });
25449var Scheduler = /*@__PURE__*/ (function () {
25450 function Scheduler(SchedulerAction, now) {
25451 if (now === void 0) {
25452 now = Scheduler.now;
25453 }
25454 this.SchedulerAction = SchedulerAction;
25455 this.now = now;
25456 }
25457 Scheduler.prototype.schedule = function (work, delay, state) {
25458 if (delay === void 0) {
25459 delay = 0;
25460 }
25461 return new this.SchedulerAction(this, work).schedule(state, delay);
25462 };
25463 Scheduler.now = function () { return Date.now(); };
25464 return Scheduler;
25465}());
25466
25467//# sourceMappingURL=Scheduler.js.map
25468
25469
25470/***/ }),
25471/* 204 */
25472/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25473
25474"use strict";
25475__webpack_require__.r(__webpack_exports__);
25476/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25477/* harmony export */ "QueueAction": () => /* binding */ QueueAction
25478/* harmony export */ });
25479/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25480/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
25481/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
25482
25483
25484var QueueAction = /*@__PURE__*/ (function (_super) {
25485 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(QueueAction, _super);
25486 function QueueAction(scheduler, work) {
25487 var _this = _super.call(this, scheduler, work) || this;
25488 _this.scheduler = scheduler;
25489 _this.work = work;
25490 return _this;
25491 }
25492 QueueAction.prototype.schedule = function (state, delay) {
25493 if (delay === void 0) {
25494 delay = 0;
25495 }
25496 if (delay > 0) {
25497 return _super.prototype.schedule.call(this, state, delay);
25498 }
25499 this.delay = delay;
25500 this.state = state;
25501 this.scheduler.flush(this);
25502 return this;
25503 };
25504 QueueAction.prototype.execute = function (state, delay) {
25505 return (delay > 0 || this.closed) ?
25506 _super.prototype.execute.call(this, state, delay) :
25507 this._execute(state, delay);
25508 };
25509 QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25510 if (delay === void 0) {
25511 delay = 0;
25512 }
25513 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25514 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25515 }
25516 return scheduler.flush(this);
25517 };
25518 return QueueAction;
25519}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__.AsyncAction));
25520
25521//# sourceMappingURL=QueueAction.js.map
25522
25523
25524/***/ }),
25525/* 205 */
25526/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25527
25528"use strict";
25529__webpack_require__.r(__webpack_exports__);
25530/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25531/* harmony export */ "AsyncAction": () => /* binding */ AsyncAction
25532/* harmony export */ });
25533/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25534/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206);
25535/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
25536
25537
25538var AsyncAction = /*@__PURE__*/ (function (_super) {
25539 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AsyncAction, _super);
25540 function AsyncAction(scheduler, work) {
25541 var _this = _super.call(this, scheduler, work) || this;
25542 _this.scheduler = scheduler;
25543 _this.work = work;
25544 _this.pending = false;
25545 return _this;
25546 }
25547 AsyncAction.prototype.schedule = function (state, delay) {
25548 if (delay === void 0) {
25549 delay = 0;
25550 }
25551 if (this.closed) {
25552 return this;
25553 }
25554 this.state = state;
25555 var id = this.id;
25556 var scheduler = this.scheduler;
25557 if (id != null) {
25558 this.id = this.recycleAsyncId(scheduler, id, delay);
25559 }
25560 this.pending = true;
25561 this.delay = delay;
25562 this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
25563 return this;
25564 };
25565 AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25566 if (delay === void 0) {
25567 delay = 0;
25568 }
25569 return setInterval(scheduler.flush.bind(scheduler, this), delay);
25570 };
25571 AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25572 if (delay === void 0) {
25573 delay = 0;
25574 }
25575 if (delay !== null && this.delay === delay && this.pending === false) {
25576 return id;
25577 }
25578 clearInterval(id);
25579 return undefined;
25580 };
25581 AsyncAction.prototype.execute = function (state, delay) {
25582 if (this.closed) {
25583 return new Error('executing a cancelled action');
25584 }
25585 this.pending = false;
25586 var error = this._execute(state, delay);
25587 if (error) {
25588 return error;
25589 }
25590 else if (this.pending === false && this.id != null) {
25591 this.id = this.recycleAsyncId(this.scheduler, this.id, null);
25592 }
25593 };
25594 AsyncAction.prototype._execute = function (state, delay) {
25595 var errored = false;
25596 var errorValue = undefined;
25597 try {
25598 this.work(state);
25599 }
25600 catch (e) {
25601 errored = true;
25602 errorValue = !!e && e || new Error(e);
25603 }
25604 if (errored) {
25605 this.unsubscribe();
25606 return errorValue;
25607 }
25608 };
25609 AsyncAction.prototype._unsubscribe = function () {
25610 var id = this.id;
25611 var scheduler = this.scheduler;
25612 var actions = scheduler.actions;
25613 var index = actions.indexOf(this);
25614 this.work = null;
25615 this.state = null;
25616 this.pending = false;
25617 this.scheduler = null;
25618 if (index !== -1) {
25619 actions.splice(index, 1);
25620 }
25621 if (id != null) {
25622 this.id = this.recycleAsyncId(scheduler, id, null);
25623 }
25624 this.delay = null;
25625 };
25626 return AsyncAction;
25627}(_Action__WEBPACK_IMPORTED_MODULE_1__.Action));
25628
25629//# sourceMappingURL=AsyncAction.js.map
25630
25631
25632/***/ }),
25633/* 206 */
25634/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25635
25636"use strict";
25637__webpack_require__.r(__webpack_exports__);
25638/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25639/* harmony export */ "Action": () => /* binding */ Action
25640/* harmony export */ });
25641/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25642/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
25643/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
25644
25645
25646var Action = /*@__PURE__*/ (function (_super) {
25647 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(Action, _super);
25648 function Action(scheduler, work) {
25649 return _super.call(this) || this;
25650 }
25651 Action.prototype.schedule = function (state, delay) {
25652 if (delay === void 0) {
25653 delay = 0;
25654 }
25655 return this;
25656 };
25657 return Action;
25658}(_Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription));
25659
25660//# sourceMappingURL=Action.js.map
25661
25662
25663/***/ }),
25664/* 207 */
25665/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25666
25667"use strict";
25668__webpack_require__.r(__webpack_exports__);
25669/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25670/* harmony export */ "AsyncSubject": () => /* binding */ AsyncSubject
25671/* harmony export */ });
25672/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25673/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
25674/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
25675/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
25676
25677
25678
25679var AsyncSubject = /*@__PURE__*/ (function (_super) {
25680 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AsyncSubject, _super);
25681 function AsyncSubject() {
25682 var _this = _super !== null && _super.apply(this, arguments) || this;
25683 _this.value = null;
25684 _this.hasNext = false;
25685 _this.hasCompleted = false;
25686 return _this;
25687 }
25688 AsyncSubject.prototype._subscribe = function (subscriber) {
25689 if (this.hasError) {
25690 subscriber.error(this.thrownError);
25691 return _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription.EMPTY;
25692 }
25693 else if (this.hasCompleted && this.hasNext) {
25694 subscriber.next(this.value);
25695 subscriber.complete();
25696 return _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription.EMPTY;
25697 }
25698 return _super.prototype._subscribe.call(this, subscriber);
25699 };
25700 AsyncSubject.prototype.next = function (value) {
25701 if (!this.hasCompleted) {
25702 this.value = value;
25703 this.hasNext = true;
25704 }
25705 };
25706 AsyncSubject.prototype.error = function (error) {
25707 if (!this.hasCompleted) {
25708 _super.prototype.error.call(this, error);
25709 }
25710 };
25711 AsyncSubject.prototype.complete = function () {
25712 this.hasCompleted = true;
25713 if (this.hasNext) {
25714 _super.prototype.next.call(this, this.value);
25715 }
25716 _super.prototype.complete.call(this);
25717 };
25718 return AsyncSubject;
25719}(_Subject__WEBPACK_IMPORTED_MODULE_2__.Subject));
25720
25721//# sourceMappingURL=AsyncSubject.js.map
25722
25723
25724/***/ }),
25725/* 208 */
25726/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25727
25728"use strict";
25729__webpack_require__.r(__webpack_exports__);
25730/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25731/* harmony export */ "asap": () => /* binding */ asap
25732/* harmony export */ });
25733/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(210);
25734/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(209);
25735/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
25736
25737
25738var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_0__.AsapScheduler(_AsapAction__WEBPACK_IMPORTED_MODULE_1__.AsapAction);
25739//# sourceMappingURL=asap.js.map
25740
25741
25742/***/ }),
25743/* 209 */
25744/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25745
25746"use strict";
25747__webpack_require__.r(__webpack_exports__);
25748/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25749/* harmony export */ "AsapScheduler": () => /* binding */ AsapScheduler
25750/* harmony export */ });
25751/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25752/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
25753/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25754
25755
25756var AsapScheduler = /*@__PURE__*/ (function (_super) {
25757 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AsapScheduler, _super);
25758 function AsapScheduler() {
25759 return _super !== null && _super.apply(this, arguments) || this;
25760 }
25761 AsapScheduler.prototype.flush = function (action) {
25762 this.active = true;
25763 this.scheduled = undefined;
25764 var actions = this.actions;
25765 var error;
25766 var index = -1;
25767 var count = actions.length;
25768 action = action || actions.shift();
25769 do {
25770 if (error = action.execute(action.state, action.delay)) {
25771 break;
25772 }
25773 } while (++index < count && (action = actions.shift()));
25774 this.active = false;
25775 if (error) {
25776 while (++index < count && (action = actions.shift())) {
25777 action.unsubscribe();
25778 }
25779 throw error;
25780 }
25781 };
25782 return AsapScheduler;
25783}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__.AsyncScheduler));
25784
25785//# sourceMappingURL=AsapScheduler.js.map
25786
25787
25788/***/ }),
25789/* 210 */
25790/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25791
25792"use strict";
25793__webpack_require__.r(__webpack_exports__);
25794/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25795/* harmony export */ "AsapAction": () => /* binding */ AsapAction
25796/* harmony export */ });
25797/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25798/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
25799/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
25800/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
25801
25802
25803
25804var AsapAction = /*@__PURE__*/ (function (_super) {
25805 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AsapAction, _super);
25806 function AsapAction(scheduler, work) {
25807 var _this = _super.call(this, scheduler, work) || this;
25808 _this.scheduler = scheduler;
25809 _this.work = work;
25810 return _this;
25811 }
25812 AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25813 if (delay === void 0) {
25814 delay = 0;
25815 }
25816 if (delay !== null && delay > 0) {
25817 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25818 }
25819 scheduler.actions.push(this);
25820 return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__.Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));
25821 };
25822 AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25823 if (delay === void 0) {
25824 delay = 0;
25825 }
25826 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
25827 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
25828 }
25829 if (scheduler.actions.length === 0) {
25830 _util_Immediate__WEBPACK_IMPORTED_MODULE_1__.Immediate.clearImmediate(id);
25831 scheduler.scheduled = undefined;
25832 }
25833 return undefined;
25834 };
25835 return AsapAction;
25836}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__.AsyncAction));
25837
25838//# sourceMappingURL=AsapAction.js.map
25839
25840
25841/***/ }),
25842/* 211 */
25843/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25844
25845"use strict";
25846__webpack_require__.r(__webpack_exports__);
25847/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25848/* harmony export */ "Immediate": () => /* binding */ Immediate,
25849/* harmony export */ "TestTools": () => /* binding */ TestTools
25850/* harmony export */ });
25851/** PURE_IMPORTS_START PURE_IMPORTS_END */
25852var nextHandle = 1;
25853var RESOLVED = /*@__PURE__*/ (function () { return /*@__PURE__*/ Promise.resolve(); })();
25854var activeHandles = {};
25855function findAndClearHandle(handle) {
25856 if (handle in activeHandles) {
25857 delete activeHandles[handle];
25858 return true;
25859 }
25860 return false;
25861}
25862var Immediate = {
25863 setImmediate: function (cb) {
25864 var handle = nextHandle++;
25865 activeHandles[handle] = true;
25866 RESOLVED.then(function () { return findAndClearHandle(handle) && cb(); });
25867 return handle;
25868 },
25869 clearImmediate: function (handle) {
25870 findAndClearHandle(handle);
25871 },
25872};
25873var TestTools = {
25874 pending: function () {
25875 return Object.keys(activeHandles).length;
25876 }
25877};
25878//# sourceMappingURL=Immediate.js.map
25879
25880
25881/***/ }),
25882/* 212 */
25883/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25884
25885"use strict";
25886__webpack_require__.r(__webpack_exports__);
25887/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25888/* harmony export */ "async": () => /* binding */ async
25889/* harmony export */ });
25890/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
25891/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(202);
25892/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
25893
25894
25895var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__.AsyncScheduler(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__.AsyncAction);
25896//# sourceMappingURL=async.js.map
25897
25898
25899/***/ }),
25900/* 213 */
25901/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25902
25903"use strict";
25904__webpack_require__.r(__webpack_exports__);
25905/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25906/* harmony export */ "animationFrame": () => /* binding */ animationFrame
25907/* harmony export */ });
25908/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215);
25909/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(214);
25910/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
25911
25912
25913var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_0__.AnimationFrameScheduler(_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_1__.AnimationFrameAction);
25914//# sourceMappingURL=animationFrame.js.map
25915
25916
25917/***/ }),
25918/* 214 */
25919/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25920
25921"use strict";
25922__webpack_require__.r(__webpack_exports__);
25923/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25924/* harmony export */ "AnimationFrameScheduler": () => /* binding */ AnimationFrameScheduler
25925/* harmony export */ });
25926/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25927/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
25928/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
25929
25930
25931var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
25932 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AnimationFrameScheduler, _super);
25933 function AnimationFrameScheduler() {
25934 return _super !== null && _super.apply(this, arguments) || this;
25935 }
25936 AnimationFrameScheduler.prototype.flush = function (action) {
25937 this.active = true;
25938 this.scheduled = undefined;
25939 var actions = this.actions;
25940 var error;
25941 var index = -1;
25942 var count = actions.length;
25943 action = action || actions.shift();
25944 do {
25945 if (error = action.execute(action.state, action.delay)) {
25946 break;
25947 }
25948 } while (++index < count && (action = actions.shift()));
25949 this.active = false;
25950 if (error) {
25951 while (++index < count && (action = actions.shift())) {
25952 action.unsubscribe();
25953 }
25954 throw error;
25955 }
25956 };
25957 return AnimationFrameScheduler;
25958}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__.AsyncScheduler));
25959
25960//# sourceMappingURL=AnimationFrameScheduler.js.map
25961
25962
25963/***/ }),
25964/* 215 */
25965/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25966
25967"use strict";
25968__webpack_require__.r(__webpack_exports__);
25969/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25970/* harmony export */ "AnimationFrameAction": () => /* binding */ AnimationFrameAction
25971/* harmony export */ });
25972/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
25973/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
25974/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
25975
25976
25977var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
25978 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AnimationFrameAction, _super);
25979 function AnimationFrameAction(scheduler, work) {
25980 var _this = _super.call(this, scheduler, work) || this;
25981 _this.scheduler = scheduler;
25982 _this.work = work;
25983 return _this;
25984 }
25985 AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
25986 if (delay === void 0) {
25987 delay = 0;
25988 }
25989 if (delay !== null && delay > 0) {
25990 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
25991 }
25992 scheduler.actions.push(this);
25993 return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
25994 };
25995 AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
25996 if (delay === void 0) {
25997 delay = 0;
25998 }
25999 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
26000 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
26001 }
26002 if (scheduler.actions.length === 0) {
26003 cancelAnimationFrame(id);
26004 scheduler.scheduled = undefined;
26005 }
26006 return undefined;
26007 };
26008 return AnimationFrameAction;
26009}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__.AsyncAction));
26010
26011//# sourceMappingURL=AnimationFrameAction.js.map
26012
26013
26014/***/ }),
26015/* 216 */
26016/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26017
26018"use strict";
26019__webpack_require__.r(__webpack_exports__);
26020/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26021/* harmony export */ "VirtualTimeScheduler": () => /* binding */ VirtualTimeScheduler,
26022/* harmony export */ "VirtualAction": () => /* binding */ VirtualAction
26023/* harmony export */ });
26024/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
26025/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
26026/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
26027/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
26028
26029
26030
26031var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
26032 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(VirtualTimeScheduler, _super);
26033 function VirtualTimeScheduler(SchedulerAction, maxFrames) {
26034 if (SchedulerAction === void 0) {
26035 SchedulerAction = VirtualAction;
26036 }
26037 if (maxFrames === void 0) {
26038 maxFrames = Number.POSITIVE_INFINITY;
26039 }
26040 var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
26041 _this.maxFrames = maxFrames;
26042 _this.frame = 0;
26043 _this.index = -1;
26044 return _this;
26045 }
26046 VirtualTimeScheduler.prototype.flush = function () {
26047 var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
26048 var error, action;
26049 while ((action = actions[0]) && action.delay <= maxFrames) {
26050 actions.shift();
26051 this.frame = action.delay;
26052 if (error = action.execute(action.state, action.delay)) {
26053 break;
26054 }
26055 }
26056 if (error) {
26057 while (action = actions.shift()) {
26058 action.unsubscribe();
26059 }
26060 throw error;
26061 }
26062 };
26063 VirtualTimeScheduler.frameTimeFactor = 10;
26064 return VirtualTimeScheduler;
26065}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__.AsyncScheduler));
26066
26067var VirtualAction = /*@__PURE__*/ (function (_super) {
26068 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(VirtualAction, _super);
26069 function VirtualAction(scheduler, work, index) {
26070 if (index === void 0) {
26071 index = scheduler.index += 1;
26072 }
26073 var _this = _super.call(this, scheduler, work) || this;
26074 _this.scheduler = scheduler;
26075 _this.work = work;
26076 _this.index = index;
26077 _this.active = true;
26078 _this.index = scheduler.index = index;
26079 return _this;
26080 }
26081 VirtualAction.prototype.schedule = function (state, delay) {
26082 if (delay === void 0) {
26083 delay = 0;
26084 }
26085 if (!this.id) {
26086 return _super.prototype.schedule.call(this, state, delay);
26087 }
26088 this.active = false;
26089 var action = new VirtualAction(this.scheduler, this.work);
26090 this.add(action);
26091 return action.schedule(state, delay);
26092 };
26093 VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
26094 if (delay === void 0) {
26095 delay = 0;
26096 }
26097 this.delay = scheduler.frame + delay;
26098 var actions = scheduler.actions;
26099 actions.push(this);
26100 actions.sort(VirtualAction.sortActions);
26101 return true;
26102 };
26103 VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
26104 if (delay === void 0) {
26105 delay = 0;
26106 }
26107 return undefined;
26108 };
26109 VirtualAction.prototype._execute = function (state, delay) {
26110 if (this.active === true) {
26111 return _super.prototype._execute.call(this, state, delay);
26112 }
26113 };
26114 VirtualAction.sortActions = function (a, b) {
26115 if (a.delay === b.delay) {
26116 if (a.index === b.index) {
26117 return 0;
26118 }
26119 else if (a.index > b.index) {
26120 return 1;
26121 }
26122 else {
26123 return -1;
26124 }
26125 }
26126 else if (a.delay > b.delay) {
26127 return 1;
26128 }
26129 else {
26130 return -1;
26131 }
26132 };
26133 return VirtualAction;
26134}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__.AsyncAction));
26135
26136//# sourceMappingURL=VirtualTimeScheduler.js.map
26137
26138
26139/***/ }),
26140/* 217 */
26141/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26142
26143"use strict";
26144__webpack_require__.r(__webpack_exports__);
26145/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26146/* harmony export */ "noop": () => /* binding */ noop
26147/* harmony export */ });
26148/** PURE_IMPORTS_START PURE_IMPORTS_END */
26149function noop() { }
26150//# sourceMappingURL=noop.js.map
26151
26152
26153/***/ }),
26154/* 218 */
26155/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26156
26157"use strict";
26158__webpack_require__.r(__webpack_exports__);
26159/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26160/* harmony export */ "isObservable": () => /* binding */ isObservable
26161/* harmony export */ });
26162/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
26163/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
26164
26165function isObservable(obj) {
26166 return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
26167}
26168//# sourceMappingURL=isObservable.js.map
26169
26170
26171/***/ }),
26172/* 219 */
26173/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26174
26175"use strict";
26176__webpack_require__.r(__webpack_exports__);
26177/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26178/* harmony export */ "ArgumentOutOfRangeError": () => /* binding */ ArgumentOutOfRangeError
26179/* harmony export */ });
26180/** PURE_IMPORTS_START PURE_IMPORTS_END */
26181var ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {
26182 function ArgumentOutOfRangeErrorImpl() {
26183 Error.call(this);
26184 this.message = 'argument out of range';
26185 this.name = 'ArgumentOutOfRangeError';
26186 return this;
26187 }
26188 ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26189 return ArgumentOutOfRangeErrorImpl;
26190})();
26191var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
26192//# sourceMappingURL=ArgumentOutOfRangeError.js.map
26193
26194
26195/***/ }),
26196/* 220 */
26197/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26198
26199"use strict";
26200__webpack_require__.r(__webpack_exports__);
26201/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26202/* harmony export */ "EmptyError": () => /* binding */ EmptyError
26203/* harmony export */ });
26204/** PURE_IMPORTS_START PURE_IMPORTS_END */
26205var EmptyErrorImpl = /*@__PURE__*/ (function () {
26206 function EmptyErrorImpl() {
26207 Error.call(this);
26208 this.message = 'no elements in sequence';
26209 this.name = 'EmptyError';
26210 return this;
26211 }
26212 EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26213 return EmptyErrorImpl;
26214})();
26215var EmptyError = EmptyErrorImpl;
26216//# sourceMappingURL=EmptyError.js.map
26217
26218
26219/***/ }),
26220/* 221 */
26221/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26222
26223"use strict";
26224__webpack_require__.r(__webpack_exports__);
26225/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26226/* harmony export */ "TimeoutError": () => /* binding */ TimeoutError
26227/* harmony export */ });
26228/** PURE_IMPORTS_START PURE_IMPORTS_END */
26229var TimeoutErrorImpl = /*@__PURE__*/ (function () {
26230 function TimeoutErrorImpl() {
26231 Error.call(this);
26232 this.message = 'Timeout has occurred';
26233 this.name = 'TimeoutError';
26234 return this;
26235 }
26236 TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
26237 return TimeoutErrorImpl;
26238})();
26239var TimeoutError = TimeoutErrorImpl;
26240//# sourceMappingURL=TimeoutError.js.map
26241
26242
26243/***/ }),
26244/* 222 */
26245/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26246
26247"use strict";
26248__webpack_require__.r(__webpack_exports__);
26249/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26250/* harmony export */ "bindCallback": () => /* binding */ bindCallback
26251/* harmony export */ });
26252/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166);
26253/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(207);
26254/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
26255/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(179);
26256/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
26257/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
26258/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
26259
26260
26261
26262
26263
26264
26265function bindCallback(callbackFunc, resultSelector, scheduler) {
26266 if (resultSelector) {
26267 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(resultSelector)) {
26268 scheduler = resultSelector;
26269 }
26270 else {
26271 return function () {
26272 var args = [];
26273 for (var _i = 0; _i < arguments.length; _i++) {
26274 args[_i] = arguments[_i];
26275 }
26276 return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe((0,_operators_map__WEBPACK_IMPORTED_MODULE_1__.map)(function (args) { return (0,_util_isArray__WEBPACK_IMPORTED_MODULE_2__.isArray)(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
26277 };
26278 }
26279 }
26280 return function () {
26281 var args = [];
26282 for (var _i = 0; _i < arguments.length; _i++) {
26283 args[_i] = arguments[_i];
26284 }
26285 var context = this;
26286 var subject;
26287 var params = {
26288 context: context,
26289 subject: subject,
26290 callbackFunc: callbackFunc,
26291 scheduler: scheduler,
26292 };
26293 return new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(function (subscriber) {
26294 if (!scheduler) {
26295 if (!subject) {
26296 subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_4__.AsyncSubject();
26297 var handler = function () {
26298 var innerArgs = [];
26299 for (var _i = 0; _i < arguments.length; _i++) {
26300 innerArgs[_i] = arguments[_i];
26301 }
26302 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
26303 subject.complete();
26304 };
26305 try {
26306 callbackFunc.apply(context, args.concat([handler]));
26307 }
26308 catch (err) {
26309 if ((0,_util_canReportError__WEBPACK_IMPORTED_MODULE_5__.canReportError)(subject)) {
26310 subject.error(err);
26311 }
26312 else {
26313 console.warn(err);
26314 }
26315 }
26316 }
26317 return subject.subscribe(subscriber);
26318 }
26319 else {
26320 var state = {
26321 args: args, subscriber: subscriber, params: params,
26322 };
26323 return scheduler.schedule(dispatch, 0, state);
26324 }
26325 });
26326 };
26327}
26328function dispatch(state) {
26329 var _this = this;
26330 var self = this;
26331 var args = state.args, subscriber = state.subscriber, params = state.params;
26332 var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
26333 var subject = params.subject;
26334 if (!subject) {
26335 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_4__.AsyncSubject();
26336 var handler = function () {
26337 var innerArgs = [];
26338 for (var _i = 0; _i < arguments.length; _i++) {
26339 innerArgs[_i] = arguments[_i];
26340 }
26341 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
26342 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
26343 };
26344 try {
26345 callbackFunc.apply(context, args.concat([handler]));
26346 }
26347 catch (err) {
26348 subject.error(err);
26349 }
26350 }
26351 this.add(subject.subscribe(subscriber));
26352}
26353function dispatchNext(state) {
26354 var value = state.value, subject = state.subject;
26355 subject.next(value);
26356 subject.complete();
26357}
26358function dispatchError(state) {
26359 var err = state.err, subject = state.subject;
26360 subject.error(err);
26361}
26362//# sourceMappingURL=bindCallback.js.map
26363
26364
26365/***/ }),
26366/* 223 */
26367/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26368
26369"use strict";
26370__webpack_require__.r(__webpack_exports__);
26371/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26372/* harmony export */ "map": () => /* binding */ map,
26373/* harmony export */ "MapOperator": () => /* binding */ MapOperator
26374/* harmony export */ });
26375/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
26376/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
26377/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26378
26379
26380function map(project, thisArg) {
26381 return function mapOperation(source) {
26382 if (typeof project !== 'function') {
26383 throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
26384 }
26385 return source.lift(new MapOperator(project, thisArg));
26386 };
26387}
26388var MapOperator = /*@__PURE__*/ (function () {
26389 function MapOperator(project, thisArg) {
26390 this.project = project;
26391 this.thisArg = thisArg;
26392 }
26393 MapOperator.prototype.call = function (subscriber, source) {
26394 return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
26395 };
26396 return MapOperator;
26397}());
26398
26399var MapSubscriber = /*@__PURE__*/ (function (_super) {
26400 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(MapSubscriber, _super);
26401 function MapSubscriber(destination, project, thisArg) {
26402 var _this = _super.call(this, destination) || this;
26403 _this.project = project;
26404 _this.count = 0;
26405 _this.thisArg = thisArg || _this;
26406 return _this;
26407 }
26408 MapSubscriber.prototype._next = function (value) {
26409 var result;
26410 try {
26411 result = this.project.call(this.thisArg, value, this.count++);
26412 }
26413 catch (err) {
26414 this.destination.error(err);
26415 return;
26416 }
26417 this.destination.next(result);
26418 };
26419 return MapSubscriber;
26420}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
26421//# sourceMappingURL=map.js.map
26422
26423
26424/***/ }),
26425/* 224 */
26426/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26427
26428"use strict";
26429__webpack_require__.r(__webpack_exports__);
26430/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26431/* harmony export */ "bindNodeCallback": () => /* binding */ bindNodeCallback
26432/* harmony export */ });
26433/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166);
26434/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(207);
26435/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
26436/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(179);
26437/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
26438/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
26439/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
26440
26441
26442
26443
26444
26445
26446function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
26447 if (resultSelector) {
26448 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(resultSelector)) {
26449 scheduler = resultSelector;
26450 }
26451 else {
26452 return function () {
26453 var args = [];
26454 for (var _i = 0; _i < arguments.length; _i++) {
26455 args[_i] = arguments[_i];
26456 }
26457 return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe((0,_operators_map__WEBPACK_IMPORTED_MODULE_1__.map)(function (args) { return (0,_util_isArray__WEBPACK_IMPORTED_MODULE_2__.isArray)(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
26458 };
26459 }
26460 }
26461 return function () {
26462 var args = [];
26463 for (var _i = 0; _i < arguments.length; _i++) {
26464 args[_i] = arguments[_i];
26465 }
26466 var params = {
26467 subject: undefined,
26468 args: args,
26469 callbackFunc: callbackFunc,
26470 scheduler: scheduler,
26471 context: this,
26472 };
26473 return new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(function (subscriber) {
26474 var context = params.context;
26475 var subject = params.subject;
26476 if (!scheduler) {
26477 if (!subject) {
26478 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_4__.AsyncSubject();
26479 var handler = function () {
26480 var innerArgs = [];
26481 for (var _i = 0; _i < arguments.length; _i++) {
26482 innerArgs[_i] = arguments[_i];
26483 }
26484 var err = innerArgs.shift();
26485 if (err) {
26486 subject.error(err);
26487 return;
26488 }
26489 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
26490 subject.complete();
26491 };
26492 try {
26493 callbackFunc.apply(context, args.concat([handler]));
26494 }
26495 catch (err) {
26496 if ((0,_util_canReportError__WEBPACK_IMPORTED_MODULE_5__.canReportError)(subject)) {
26497 subject.error(err);
26498 }
26499 else {
26500 console.warn(err);
26501 }
26502 }
26503 }
26504 return subject.subscribe(subscriber);
26505 }
26506 else {
26507 return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
26508 }
26509 });
26510 };
26511}
26512function dispatch(state) {
26513 var _this = this;
26514 var params = state.params, subscriber = state.subscriber, context = state.context;
26515 var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
26516 var subject = params.subject;
26517 if (!subject) {
26518 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_4__.AsyncSubject();
26519 var handler = function () {
26520 var innerArgs = [];
26521 for (var _i = 0; _i < arguments.length; _i++) {
26522 innerArgs[_i] = arguments[_i];
26523 }
26524 var err = innerArgs.shift();
26525 if (err) {
26526 _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
26527 }
26528 else {
26529 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
26530 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
26531 }
26532 };
26533 try {
26534 callbackFunc.apply(context, args.concat([handler]));
26535 }
26536 catch (err) {
26537 this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
26538 }
26539 }
26540 this.add(subject.subscribe(subscriber));
26541}
26542function dispatchNext(arg) {
26543 var value = arg.value, subject = arg.subject;
26544 subject.next(value);
26545 subject.complete();
26546}
26547function dispatchError(arg) {
26548 var err = arg.err, subject = arg.subject;
26549 subject.error(err);
26550}
26551//# sourceMappingURL=bindNodeCallback.js.map
26552
26553
26554/***/ }),
26555/* 225 */
26556/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26557
26558"use strict";
26559__webpack_require__.r(__webpack_exports__);
26560/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26561/* harmony export */ "combineLatest": () => /* binding */ combineLatest,
26562/* harmony export */ "CombineLatestOperator": () => /* binding */ CombineLatestOperator,
26563/* harmony export */ "CombineLatestSubscriber": () => /* binding */ CombineLatestSubscriber
26564/* harmony export */ });
26565/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
26566/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
26567/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
26568/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(235);
26569/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(226);
26570/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(196);
26571/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
26572
26573
26574
26575
26576
26577
26578var NONE = {};
26579function combineLatest() {
26580 var observables = [];
26581 for (var _i = 0; _i < arguments.length; _i++) {
26582 observables[_i] = arguments[_i];
26583 }
26584 var resultSelector = null;
26585 var scheduler = null;
26586 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(observables[observables.length - 1])) {
26587 scheduler = observables.pop();
26588 }
26589 if (typeof observables[observables.length - 1] === 'function') {
26590 resultSelector = observables.pop();
26591 }
26592 if (observables.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_2__.isArray)(observables[0])) {
26593 observables = observables[0];
26594 }
26595 return (0,_fromArray__WEBPACK_IMPORTED_MODULE_3__.fromArray)(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
26596}
26597var CombineLatestOperator = /*@__PURE__*/ (function () {
26598 function CombineLatestOperator(resultSelector) {
26599 this.resultSelector = resultSelector;
26600 }
26601 CombineLatestOperator.prototype.call = function (subscriber, source) {
26602 return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
26603 };
26604 return CombineLatestOperator;
26605}());
26606
26607var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
26608 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(CombineLatestSubscriber, _super);
26609 function CombineLatestSubscriber(destination, resultSelector) {
26610 var _this = _super.call(this, destination) || this;
26611 _this.resultSelector = resultSelector;
26612 _this.active = 0;
26613 _this.values = [];
26614 _this.observables = [];
26615 return _this;
26616 }
26617 CombineLatestSubscriber.prototype._next = function (observable) {
26618 this.values.push(NONE);
26619 this.observables.push(observable);
26620 };
26621 CombineLatestSubscriber.prototype._complete = function () {
26622 var observables = this.observables;
26623 var len = observables.length;
26624 if (len === 0) {
26625 this.destination.complete();
26626 }
26627 else {
26628 this.active = len;
26629 this.toRespond = len;
26630 for (var i = 0; i < len; i++) {
26631 var observable = observables[i];
26632 this.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__.subscribeToResult)(this, observable, observable, i));
26633 }
26634 }
26635 };
26636 CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
26637 if ((this.active -= 1) === 0) {
26638 this.destination.complete();
26639 }
26640 };
26641 CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26642 var values = this.values;
26643 var oldVal = values[outerIndex];
26644 var toRespond = !this.toRespond
26645 ? 0
26646 : oldVal === NONE ? --this.toRespond : this.toRespond;
26647 values[outerIndex] = innerValue;
26648 if (toRespond === 0) {
26649 if (this.resultSelector) {
26650 this._tryResultSelector(values);
26651 }
26652 else {
26653 this.destination.next(values.slice());
26654 }
26655 }
26656 };
26657 CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
26658 var result;
26659 try {
26660 result = this.resultSelector.apply(this, values);
26661 }
26662 catch (err) {
26663 this.destination.error(err);
26664 return;
26665 }
26666 this.destination.next(result);
26667 };
26668 return CombineLatestSubscriber;
26669}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__.OuterSubscriber));
26670
26671//# sourceMappingURL=combineLatest.js.map
26672
26673
26674/***/ }),
26675/* 226 */
26676/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26677
26678"use strict";
26679__webpack_require__.r(__webpack_exports__);
26680/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26681/* harmony export */ "subscribeToResult": () => /* binding */ subscribeToResult
26682/* harmony export */ });
26683/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(227);
26684/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
26685/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
26686/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */
26687
26688
26689
26690function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber) {
26691 if (innerSubscriber === void 0) {
26692 innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__.InnerSubscriber(outerSubscriber, outerValue, outerIndex);
26693 }
26694 if (innerSubscriber.closed) {
26695 return undefined;
26696 }
26697 if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable) {
26698 return result.subscribe(innerSubscriber);
26699 }
26700 return (0,_subscribeTo__WEBPACK_IMPORTED_MODULE_2__.subscribeTo)(result)(innerSubscriber);
26701}
26702//# sourceMappingURL=subscribeToResult.js.map
26703
26704
26705/***/ }),
26706/* 227 */
26707/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26708
26709"use strict";
26710__webpack_require__.r(__webpack_exports__);
26711/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26712/* harmony export */ "InnerSubscriber": () => /* binding */ InnerSubscriber
26713/* harmony export */ });
26714/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
26715/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
26716/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26717
26718
26719var InnerSubscriber = /*@__PURE__*/ (function (_super) {
26720 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(InnerSubscriber, _super);
26721 function InnerSubscriber(parent, outerValue, outerIndex) {
26722 var _this = _super.call(this) || this;
26723 _this.parent = parent;
26724 _this.outerValue = outerValue;
26725 _this.outerIndex = outerIndex;
26726 _this.index = 0;
26727 return _this;
26728 }
26729 InnerSubscriber.prototype._next = function (value) {
26730 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
26731 };
26732 InnerSubscriber.prototype._error = function (error) {
26733 this.parent.notifyError(error, this);
26734 this.unsubscribe();
26735 };
26736 InnerSubscriber.prototype._complete = function () {
26737 this.parent.notifyComplete(this);
26738 this.unsubscribe();
26739 };
26740 return InnerSubscriber;
26741}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
26742
26743//# sourceMappingURL=InnerSubscriber.js.map
26744
26745
26746/***/ }),
26747/* 228 */
26748/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26749
26750"use strict";
26751__webpack_require__.r(__webpack_exports__);
26752/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26753/* harmony export */ "subscribeTo": () => /* binding */ subscribeTo
26754/* harmony export */ });
26755/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(197);
26756/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(232);
26757/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(234);
26758/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(229);
26759/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(230);
26760/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(231);
26761/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(178);
26762/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(233);
26763/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(180);
26764/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774var subscribeTo = function (result) {
26775 if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__.observable] === 'function') {
26776 return (0,_subscribeToObservable__WEBPACK_IMPORTED_MODULE_1__.subscribeToObservable)(result);
26777 }
26778 else if ((0,_isArrayLike__WEBPACK_IMPORTED_MODULE_2__.isArrayLike)(result)) {
26779 return (0,_subscribeToArray__WEBPACK_IMPORTED_MODULE_3__.subscribeToArray)(result);
26780 }
26781 else if ((0,_isPromise__WEBPACK_IMPORTED_MODULE_4__.isPromise)(result)) {
26782 return (0,_subscribeToPromise__WEBPACK_IMPORTED_MODULE_5__.subscribeToPromise)(result);
26783 }
26784 else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__.iterator] === 'function') {
26785 return (0,_subscribeToIterable__WEBPACK_IMPORTED_MODULE_7__.subscribeToIterable)(result);
26786 }
26787 else {
26788 var value = (0,_isObject__WEBPACK_IMPORTED_MODULE_8__.isObject)(result) ? 'an invalid object' : "'" + result + "'";
26789 var msg = "You provided " + value + " where a stream was expected."
26790 + ' You can provide an Observable, Promise, Array, or Iterable.';
26791 throw new TypeError(msg);
26792 }
26793};
26794//# sourceMappingURL=subscribeTo.js.map
26795
26796
26797/***/ }),
26798/* 229 */
26799/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26800
26801"use strict";
26802__webpack_require__.r(__webpack_exports__);
26803/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26804/* harmony export */ "subscribeToObservable": () => /* binding */ subscribeToObservable
26805/* harmony export */ });
26806/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(180);
26807/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
26808
26809var subscribeToObservable = function (obj) {
26810 return function (subscriber) {
26811 var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__.observable]();
26812 if (typeof obs.subscribe !== 'function') {
26813 throw new TypeError('Provided object does not correctly implement Symbol.observable');
26814 }
26815 else {
26816 return obs.subscribe(subscriber);
26817 }
26818 };
26819};
26820//# sourceMappingURL=subscribeToObservable.js.map
26821
26822
26823/***/ }),
26824/* 230 */
26825/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26826
26827"use strict";
26828__webpack_require__.r(__webpack_exports__);
26829/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26830/* harmony export */ "isArrayLike": () => /* binding */ isArrayLike
26831/* harmony export */ });
26832/** PURE_IMPORTS_START PURE_IMPORTS_END */
26833var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
26834//# sourceMappingURL=isArrayLike.js.map
26835
26836
26837/***/ }),
26838/* 231 */
26839/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26840
26841"use strict";
26842__webpack_require__.r(__webpack_exports__);
26843/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26844/* harmony export */ "isPromise": () => /* binding */ isPromise
26845/* harmony export */ });
26846/** PURE_IMPORTS_START PURE_IMPORTS_END */
26847function isPromise(value) {
26848 return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
26849}
26850//# sourceMappingURL=isPromise.js.map
26851
26852
26853/***/ }),
26854/* 232 */
26855/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26856
26857"use strict";
26858__webpack_require__.r(__webpack_exports__);
26859/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26860/* harmony export */ "subscribeToPromise": () => /* binding */ subscribeToPromise
26861/* harmony export */ });
26862/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
26863/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
26864
26865var subscribeToPromise = function (promise) {
26866 return function (subscriber) {
26867 promise.then(function (value) {
26868 if (!subscriber.closed) {
26869 subscriber.next(value);
26870 subscriber.complete();
26871 }
26872 }, function (err) { return subscriber.error(err); })
26873 .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__.hostReportError);
26874 return subscriber;
26875 };
26876};
26877//# sourceMappingURL=subscribeToPromise.js.map
26878
26879
26880/***/ }),
26881/* 233 */
26882/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26883
26884"use strict";
26885__webpack_require__.r(__webpack_exports__);
26886/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26887/* harmony export */ "getSymbolIterator": () => /* binding */ getSymbolIterator,
26888/* harmony export */ "iterator": () => /* binding */ iterator,
26889/* harmony export */ "$$iterator": () => /* binding */ $$iterator
26890/* harmony export */ });
26891/** PURE_IMPORTS_START PURE_IMPORTS_END */
26892function getSymbolIterator() {
26893 if (typeof Symbol !== 'function' || !Symbol.iterator) {
26894 return '@@iterator';
26895 }
26896 return Symbol.iterator;
26897}
26898var iterator = /*@__PURE__*/ getSymbolIterator();
26899var $$iterator = iterator;
26900//# sourceMappingURL=iterator.js.map
26901
26902
26903/***/ }),
26904/* 234 */
26905/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26906
26907"use strict";
26908__webpack_require__.r(__webpack_exports__);
26909/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26910/* harmony export */ "subscribeToIterable": () => /* binding */ subscribeToIterable
26911/* harmony export */ });
26912/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
26913/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
26914
26915var subscribeToIterable = function (iterable) {
26916 return function (subscriber) {
26917 var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__.iterator]();
26918 do {
26919 var item = iterator.next();
26920 if (item.done) {
26921 subscriber.complete();
26922 break;
26923 }
26924 subscriber.next(item.value);
26925 if (subscriber.closed) {
26926 break;
26927 }
26928 } while (true);
26929 if (typeof iterator.return === 'function') {
26930 subscriber.add(function () {
26931 if (iterator.return) {
26932 iterator.return();
26933 }
26934 });
26935 }
26936 return subscriber;
26937 };
26938};
26939//# sourceMappingURL=subscribeToIterable.js.map
26940
26941
26942/***/ }),
26943/* 235 */
26944/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26945
26946"use strict";
26947__webpack_require__.r(__webpack_exports__);
26948/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26949/* harmony export */ "OuterSubscriber": () => /* binding */ OuterSubscriber
26950/* harmony export */ });
26951/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
26952/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
26953/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26954
26955
26956var OuterSubscriber = /*@__PURE__*/ (function (_super) {
26957 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(OuterSubscriber, _super);
26958 function OuterSubscriber() {
26959 return _super !== null && _super.apply(this, arguments) || this;
26960 }
26961 OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26962 this.destination.next(innerValue);
26963 };
26964 OuterSubscriber.prototype.notifyError = function (error, innerSub) {
26965 this.destination.error(error);
26966 };
26967 OuterSubscriber.prototype.notifyComplete = function (innerSub) {
26968 this.destination.complete();
26969 };
26970 return OuterSubscriber;
26971}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
26972
26973//# sourceMappingURL=OuterSubscriber.js.map
26974
26975
26976/***/ }),
26977/* 236 */
26978/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26979
26980"use strict";
26981__webpack_require__.r(__webpack_exports__);
26982/* harmony export */ __webpack_require__.d(__webpack_exports__, {
26983/* harmony export */ "concat": () => /* binding */ concat
26984/* harmony export */ });
26985/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(193);
26986/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
26987/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */
26988
26989
26990function concat() {
26991 var observables = [];
26992 for (var _i = 0; _i < arguments.length; _i++) {
26993 observables[_i] = arguments[_i];
26994 }
26995 return (0,_operators_concatAll__WEBPACK_IMPORTED_MODULE_0__.concatAll)()(_of__WEBPACK_IMPORTED_MODULE_1__.of.apply(void 0, observables));
26996}
26997//# sourceMappingURL=concat.js.map
26998
26999
27000/***/ }),
27001/* 237 */
27002/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27003
27004"use strict";
27005__webpack_require__.r(__webpack_exports__);
27006/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27007/* harmony export */ "concatAll": () => /* binding */ concatAll
27008/* harmony export */ });
27009/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(238);
27010/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
27011
27012function concatAll() {
27013 return (0,_mergeAll__WEBPACK_IMPORTED_MODULE_0__.mergeAll)(1);
27014}
27015//# sourceMappingURL=concatAll.js.map
27016
27017
27018/***/ }),
27019/* 238 */
27020/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27021
27022"use strict";
27023__webpack_require__.r(__webpack_exports__);
27024/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27025/* harmony export */ "mergeAll": () => /* binding */ mergeAll
27026/* harmony export */ });
27027/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
27028/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(182);
27029/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
27030
27031
27032function mergeAll(concurrent) {
27033 if (concurrent === void 0) {
27034 concurrent = Number.POSITIVE_INFINITY;
27035 }
27036 return (0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.mergeMap)(_util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, concurrent);
27037}
27038//# sourceMappingURL=mergeAll.js.map
27039
27040
27041/***/ }),
27042/* 239 */
27043/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27044
27045"use strict";
27046__webpack_require__.r(__webpack_exports__);
27047/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27048/* harmony export */ "mergeMap": () => /* binding */ mergeMap,
27049/* harmony export */ "MergeMapOperator": () => /* binding */ MergeMapOperator,
27050/* harmony export */ "MergeMapSubscriber": () => /* binding */ MergeMapSubscriber
27051/* harmony export */ });
27052/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
27053/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(226);
27054/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(235);
27055/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
27056/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
27057/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
27058/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
27059
27060
27061
27062
27063
27064
27065function mergeMap(project, resultSelector, concurrent) {
27066 if (concurrent === void 0) {
27067 concurrent = Number.POSITIVE_INFINITY;
27068 }
27069 if (typeof resultSelector === 'function') {
27070 return function (source) { return source.pipe(mergeMap(function (a, i) { return (0,_observable_from__WEBPACK_IMPORTED_MODULE_1__.from)(project(a, i)).pipe((0,_map__WEBPACK_IMPORTED_MODULE_2__.map)(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
27071 }
27072 else if (typeof resultSelector === 'number') {
27073 concurrent = resultSelector;
27074 }
27075 return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
27076}
27077var MergeMapOperator = /*@__PURE__*/ (function () {
27078 function MergeMapOperator(project, concurrent) {
27079 if (concurrent === void 0) {
27080 concurrent = Number.POSITIVE_INFINITY;
27081 }
27082 this.project = project;
27083 this.concurrent = concurrent;
27084 }
27085 MergeMapOperator.prototype.call = function (observer, source) {
27086 return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
27087 };
27088 return MergeMapOperator;
27089}());
27090
27091var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
27092 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(MergeMapSubscriber, _super);
27093 function MergeMapSubscriber(destination, project, concurrent) {
27094 if (concurrent === void 0) {
27095 concurrent = Number.POSITIVE_INFINITY;
27096 }
27097 var _this = _super.call(this, destination) || this;
27098 _this.project = project;
27099 _this.concurrent = concurrent;
27100 _this.hasCompleted = false;
27101 _this.buffer = [];
27102 _this.active = 0;
27103 _this.index = 0;
27104 return _this;
27105 }
27106 MergeMapSubscriber.prototype._next = function (value) {
27107 if (this.active < this.concurrent) {
27108 this._tryNext(value);
27109 }
27110 else {
27111 this.buffer.push(value);
27112 }
27113 };
27114 MergeMapSubscriber.prototype._tryNext = function (value) {
27115 var result;
27116 var index = this.index++;
27117 try {
27118 result = this.project(value, index);
27119 }
27120 catch (err) {
27121 this.destination.error(err);
27122 return;
27123 }
27124 this.active++;
27125 this._innerSub(result, value, index);
27126 };
27127 MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
27128 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__.InnerSubscriber(this, value, index);
27129 var destination = this.destination;
27130 destination.add(innerSubscriber);
27131 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__.subscribeToResult)(this, ish, undefined, undefined, innerSubscriber);
27132 if (innerSubscription !== innerSubscriber) {
27133 destination.add(innerSubscription);
27134 }
27135 };
27136 MergeMapSubscriber.prototype._complete = function () {
27137 this.hasCompleted = true;
27138 if (this.active === 0 && this.buffer.length === 0) {
27139 this.destination.complete();
27140 }
27141 this.unsubscribe();
27142 };
27143 MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27144 this.destination.next(innerValue);
27145 };
27146 MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
27147 var buffer = this.buffer;
27148 this.remove(innerSub);
27149 this.active--;
27150 if (buffer.length > 0) {
27151 this._next(buffer.shift());
27152 }
27153 else if (this.active === 0 && this.hasCompleted) {
27154 this.destination.complete();
27155 }
27156 };
27157 return MergeMapSubscriber;
27158}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__.OuterSubscriber));
27159
27160//# sourceMappingURL=mergeMap.js.map
27161
27162
27163/***/ }),
27164/* 240 */
27165/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27166
27167"use strict";
27168__webpack_require__.r(__webpack_exports__);
27169/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27170/* harmony export */ "from": () => /* binding */ from
27171/* harmony export */ });
27172/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
27173/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(228);
27174/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(241);
27175/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */
27176
27177
27178
27179function from(input, scheduler) {
27180 if (!scheduler) {
27181 if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable) {
27182 return input;
27183 }
27184 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable((0,_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__.subscribeTo)(input));
27185 }
27186 else {
27187 return (0,_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__.scheduled)(input, scheduler);
27188 }
27189}
27190//# sourceMappingURL=from.js.map
27191
27192
27193/***/ }),
27194/* 241 */
27195/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27196
27197"use strict";
27198__webpack_require__.r(__webpack_exports__);
27199/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27200/* harmony export */ "scheduled": () => /* binding */ scheduled
27201/* harmony export */ });
27202/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
27203/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(244);
27204/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(195);
27205/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(246);
27206/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
27207/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(231);
27208/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(230);
27209/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(245);
27210/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */
27211
27212
27213
27214
27215
27216
27217
27218
27219function scheduled(input, scheduler) {
27220 if (input != null) {
27221 if ((0,_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_0__.isInteropObservable)(input)) {
27222 return (0,_scheduleObservable__WEBPACK_IMPORTED_MODULE_1__.scheduleObservable)(input, scheduler);
27223 }
27224 else if ((0,_util_isPromise__WEBPACK_IMPORTED_MODULE_2__.isPromise)(input)) {
27225 return (0,_schedulePromise__WEBPACK_IMPORTED_MODULE_3__.schedulePromise)(input, scheduler);
27226 }
27227 else if ((0,_util_isArrayLike__WEBPACK_IMPORTED_MODULE_4__.isArrayLike)(input)) {
27228 return (0,_scheduleArray__WEBPACK_IMPORTED_MODULE_5__.scheduleArray)(input, scheduler);
27229 }
27230 else if ((0,_util_isIterable__WEBPACK_IMPORTED_MODULE_6__.isIterable)(input) || typeof input === 'string') {
27231 return (0,_scheduleIterable__WEBPACK_IMPORTED_MODULE_7__.scheduleIterable)(input, scheduler);
27232 }
27233 }
27234 throw new TypeError((input !== null && typeof input || input) + ' is not observable');
27235}
27236//# sourceMappingURL=scheduled.js.map
27237
27238
27239/***/ }),
27240/* 242 */
27241/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27242
27243"use strict";
27244__webpack_require__.r(__webpack_exports__);
27245/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27246/* harmony export */ "isInteropObservable": () => /* binding */ isInteropObservable
27247/* harmony export */ });
27248/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(180);
27249/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
27250
27251function isInteropObservable(input) {
27252 return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__.observable] === 'function';
27253}
27254//# sourceMappingURL=isInteropObservable.js.map
27255
27256
27257/***/ }),
27258/* 243 */
27259/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27260
27261"use strict";
27262__webpack_require__.r(__webpack_exports__);
27263/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27264/* harmony export */ "scheduleObservable": () => /* binding */ scheduleObservable
27265/* harmony export */ });
27266/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
27267/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
27268/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(180);
27269/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
27270
27271
27272
27273function scheduleObservable(input, scheduler) {
27274 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
27275 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
27276 sub.add(scheduler.schedule(function () {
27277 var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__.observable]();
27278 sub.add(observable.subscribe({
27279 next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
27280 error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
27281 complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
27282 }));
27283 }));
27284 return sub;
27285 });
27286}
27287//# sourceMappingURL=scheduleObservable.js.map
27288
27289
27290/***/ }),
27291/* 244 */
27292/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27293
27294"use strict";
27295__webpack_require__.r(__webpack_exports__);
27296/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27297/* harmony export */ "schedulePromise": () => /* binding */ schedulePromise
27298/* harmony export */ });
27299/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
27300/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
27301/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
27302
27303
27304function schedulePromise(input, scheduler) {
27305 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
27306 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
27307 sub.add(scheduler.schedule(function () {
27308 return input.then(function (value) {
27309 sub.add(scheduler.schedule(function () {
27310 subscriber.next(value);
27311 sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
27312 }));
27313 }, function (err) {
27314 sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
27315 });
27316 }));
27317 return sub;
27318 });
27319}
27320//# sourceMappingURL=schedulePromise.js.map
27321
27322
27323/***/ }),
27324/* 245 */
27325/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27326
27327"use strict";
27328__webpack_require__.r(__webpack_exports__);
27329/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27330/* harmony export */ "isIterable": () => /* binding */ isIterable
27331/* harmony export */ });
27332/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(233);
27333/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
27334
27335function isIterable(input) {
27336 return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__.iterator] === 'function';
27337}
27338//# sourceMappingURL=isIterable.js.map
27339
27340
27341/***/ }),
27342/* 246 */
27343/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27344
27345"use strict";
27346__webpack_require__.r(__webpack_exports__);
27347/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27348/* harmony export */ "scheduleIterable": () => /* binding */ scheduleIterable
27349/* harmony export */ });
27350/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
27351/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
27352/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(233);
27353/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */
27354
27355
27356
27357function scheduleIterable(input, scheduler) {
27358 if (!input) {
27359 throw new Error('Iterable cannot be null');
27360 }
27361 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
27362 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
27363 var iterator;
27364 sub.add(function () {
27365 if (iterator && typeof iterator.return === 'function') {
27366 iterator.return();
27367 }
27368 });
27369 sub.add(scheduler.schedule(function () {
27370 iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__.iterator]();
27371 sub.add(scheduler.schedule(function () {
27372 if (subscriber.closed) {
27373 return;
27374 }
27375 var value;
27376 var done;
27377 try {
27378 var result = iterator.next();
27379 value = result.value;
27380 done = result.done;
27381 }
27382 catch (err) {
27383 subscriber.error(err);
27384 return;
27385 }
27386 if (done) {
27387 subscriber.complete();
27388 }
27389 else {
27390 subscriber.next(value);
27391 this.schedule();
27392 }
27393 }));
27394 }));
27395 return sub;
27396 });
27397}
27398//# sourceMappingURL=scheduleIterable.js.map
27399
27400
27401/***/ }),
27402/* 247 */
27403/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27404
27405"use strict";
27406__webpack_require__.r(__webpack_exports__);
27407/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27408/* harmony export */ "defer": () => /* binding */ defer
27409/* harmony export */ });
27410/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
27411/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
27412/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(199);
27413/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
27414
27415
27416
27417function defer(observableFactory) {
27418 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
27419 var input;
27420 try {
27421 input = observableFactory();
27422 }
27423 catch (err) {
27424 subscriber.error(err);
27425 return undefined;
27426 }
27427 var source = input ? (0,_from__WEBPACK_IMPORTED_MODULE_1__.from)(input) : (0,_empty__WEBPACK_IMPORTED_MODULE_2__.empty)();
27428 return source.subscribe(subscriber);
27429 });
27430}
27431//# sourceMappingURL=defer.js.map
27432
27433
27434/***/ }),
27435/* 248 */
27436/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27437
27438"use strict";
27439__webpack_require__.r(__webpack_exports__);
27440/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27441/* harmony export */ "forkJoin": () => /* binding */ forkJoin
27442/* harmony export */ });
27443/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166);
27444/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177);
27445/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
27446/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
27447/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(240);
27448/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */
27449
27450
27451
27452
27453
27454function forkJoin() {
27455 var sources = [];
27456 for (var _i = 0; _i < arguments.length; _i++) {
27457 sources[_i] = arguments[_i];
27458 }
27459 if (sources.length === 1) {
27460 var first_1 = sources[0];
27461 if ((0,_util_isArray__WEBPACK_IMPORTED_MODULE_0__.isArray)(first_1)) {
27462 return forkJoinInternal(first_1, null);
27463 }
27464 if ((0,_util_isObject__WEBPACK_IMPORTED_MODULE_1__.isObject)(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
27465 var keys = Object.keys(first_1);
27466 return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
27467 }
27468 }
27469 if (typeof sources[sources.length - 1] === 'function') {
27470 var resultSelector_1 = sources.pop();
27471 sources = (sources.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_0__.isArray)(sources[0])) ? sources[0] : sources;
27472 return forkJoinInternal(sources, null).pipe((0,_operators_map__WEBPACK_IMPORTED_MODULE_2__.map)(function (args) { return resultSelector_1.apply(void 0, args); }));
27473 }
27474 return forkJoinInternal(sources, null);
27475}
27476function forkJoinInternal(sources, keys) {
27477 return new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(function (subscriber) {
27478 var len = sources.length;
27479 if (len === 0) {
27480 subscriber.complete();
27481 return;
27482 }
27483 var values = new Array(len);
27484 var completed = 0;
27485 var emitted = 0;
27486 var _loop_1 = function (i) {
27487 var source = (0,_from__WEBPACK_IMPORTED_MODULE_4__.from)(sources[i]);
27488 var hasValue = false;
27489 subscriber.add(source.subscribe({
27490 next: function (value) {
27491 if (!hasValue) {
27492 hasValue = true;
27493 emitted++;
27494 }
27495 values[i] = value;
27496 },
27497 error: function (err) { return subscriber.error(err); },
27498 complete: function () {
27499 completed++;
27500 if (completed === len || !hasValue) {
27501 if (emitted === len) {
27502 subscriber.next(keys ?
27503 keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
27504 values);
27505 }
27506 subscriber.complete();
27507 }
27508 }
27509 }));
27510 };
27511 for (var i = 0; i < len; i++) {
27512 _loop_1(i);
27513 }
27514 });
27515}
27516//# sourceMappingURL=forkJoin.js.map
27517
27518
27519/***/ }),
27520/* 249 */
27521/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27522
27523"use strict";
27524__webpack_require__.r(__webpack_exports__);
27525/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27526/* harmony export */ "fromEvent": () => /* binding */ fromEvent
27527/* harmony export */ });
27528/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166);
27529/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
27530/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(175);
27531/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
27532/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
27533
27534
27535
27536
27537var toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();
27538function fromEvent(target, eventName, options, resultSelector) {
27539 if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(options)) {
27540 resultSelector = options;
27541 options = undefined;
27542 }
27543 if (resultSelector) {
27544 return fromEvent(target, eventName, options).pipe((0,_operators_map__WEBPACK_IMPORTED_MODULE_1__.map)(function (args) { return (0,_util_isArray__WEBPACK_IMPORTED_MODULE_2__.isArray)(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
27545 }
27546 return new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(function (subscriber) {
27547 function handler(e) {
27548 if (arguments.length > 1) {
27549 subscriber.next(Array.prototype.slice.call(arguments));
27550 }
27551 else {
27552 subscriber.next(e);
27553 }
27554 }
27555 setupSubscription(target, eventName, handler, subscriber, options);
27556 });
27557}
27558function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
27559 var unsubscribe;
27560 if (isEventTarget(sourceObj)) {
27561 var source_1 = sourceObj;
27562 sourceObj.addEventListener(eventName, handler, options);
27563 unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
27564 }
27565 else if (isJQueryStyleEventEmitter(sourceObj)) {
27566 var source_2 = sourceObj;
27567 sourceObj.on(eventName, handler);
27568 unsubscribe = function () { return source_2.off(eventName, handler); };
27569 }
27570 else if (isNodeStyleEventEmitter(sourceObj)) {
27571 var source_3 = sourceObj;
27572 sourceObj.addListener(eventName, handler);
27573 unsubscribe = function () { return source_3.removeListener(eventName, handler); };
27574 }
27575 else if (sourceObj && sourceObj.length) {
27576 for (var i = 0, len = sourceObj.length; i < len; i++) {
27577 setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
27578 }
27579 }
27580 else {
27581 throw new TypeError('Invalid event target');
27582 }
27583 subscriber.add(unsubscribe);
27584}
27585function isNodeStyleEventEmitter(sourceObj) {
27586 return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
27587}
27588function isJQueryStyleEventEmitter(sourceObj) {
27589 return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
27590}
27591function isEventTarget(sourceObj) {
27592 return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
27593}
27594//# sourceMappingURL=fromEvent.js.map
27595
27596
27597/***/ }),
27598/* 250 */
27599/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27600
27601"use strict";
27602__webpack_require__.r(__webpack_exports__);
27603/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27604/* harmony export */ "fromEventPattern": () => /* binding */ fromEventPattern
27605/* harmony export */ });
27606/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(166);
27607/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
27608/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(175);
27609/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(223);
27610/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
27611
27612
27613
27614
27615function fromEventPattern(addHandler, removeHandler, resultSelector) {
27616 if (resultSelector) {
27617 return fromEventPattern(addHandler, removeHandler).pipe((0,_operators_map__WEBPACK_IMPORTED_MODULE_0__.map)(function (args) { return (0,_util_isArray__WEBPACK_IMPORTED_MODULE_1__.isArray)(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
27618 }
27619 return new _Observable__WEBPACK_IMPORTED_MODULE_2__.Observable(function (subscriber) {
27620 var handler = function () {
27621 var e = [];
27622 for (var _i = 0; _i < arguments.length; _i++) {
27623 e[_i] = arguments[_i];
27624 }
27625 return subscriber.next(e.length === 1 ? e[0] : e);
27626 };
27627 var retValue;
27628 try {
27629 retValue = addHandler(handler);
27630 }
27631 catch (err) {
27632 subscriber.error(err);
27633 return undefined;
27634 }
27635 if (!(0,_util_isFunction__WEBPACK_IMPORTED_MODULE_3__.isFunction)(removeHandler)) {
27636 return undefined;
27637 }
27638 return function () { return removeHandler(handler, retValue); };
27639 });
27640}
27641//# sourceMappingURL=fromEventPattern.js.map
27642
27643
27644/***/ }),
27645/* 251 */
27646/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27647
27648"use strict";
27649__webpack_require__.r(__webpack_exports__);
27650/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27651/* harmony export */ "generate": () => /* binding */ generate
27652/* harmony export */ });
27653/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(166);
27654/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(182);
27655/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
27656/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
27657
27658
27659
27660function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
27661 var resultSelector;
27662 var initialState;
27663 if (arguments.length == 1) {
27664 var options = initialStateOrOptions;
27665 initialState = options.initialState;
27666 condition = options.condition;
27667 iterate = options.iterate;
27668 resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_0__.identity;
27669 scheduler = options.scheduler;
27670 }
27671 else if (resultSelectorOrObservable === undefined || (0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(resultSelectorOrObservable)) {
27672 initialState = initialStateOrOptions;
27673 resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_0__.identity;
27674 scheduler = resultSelectorOrObservable;
27675 }
27676 else {
27677 initialState = initialStateOrOptions;
27678 resultSelector = resultSelectorOrObservable;
27679 }
27680 return new _Observable__WEBPACK_IMPORTED_MODULE_2__.Observable(function (subscriber) {
27681 var state = initialState;
27682 if (scheduler) {
27683 return scheduler.schedule(dispatch, 0, {
27684 subscriber: subscriber,
27685 iterate: iterate,
27686 condition: condition,
27687 resultSelector: resultSelector,
27688 state: state
27689 });
27690 }
27691 do {
27692 if (condition) {
27693 var conditionResult = void 0;
27694 try {
27695 conditionResult = condition(state);
27696 }
27697 catch (err) {
27698 subscriber.error(err);
27699 return undefined;
27700 }
27701 if (!conditionResult) {
27702 subscriber.complete();
27703 break;
27704 }
27705 }
27706 var value = void 0;
27707 try {
27708 value = resultSelector(state);
27709 }
27710 catch (err) {
27711 subscriber.error(err);
27712 return undefined;
27713 }
27714 subscriber.next(value);
27715 if (subscriber.closed) {
27716 break;
27717 }
27718 try {
27719 state = iterate(state);
27720 }
27721 catch (err) {
27722 subscriber.error(err);
27723 return undefined;
27724 }
27725 } while (true);
27726 return undefined;
27727 });
27728}
27729function dispatch(state) {
27730 var subscriber = state.subscriber, condition = state.condition;
27731 if (subscriber.closed) {
27732 return undefined;
27733 }
27734 if (state.needIterate) {
27735 try {
27736 state.state = state.iterate(state.state);
27737 }
27738 catch (err) {
27739 subscriber.error(err);
27740 return undefined;
27741 }
27742 }
27743 else {
27744 state.needIterate = true;
27745 }
27746 if (condition) {
27747 var conditionResult = void 0;
27748 try {
27749 conditionResult = condition(state.state);
27750 }
27751 catch (err) {
27752 subscriber.error(err);
27753 return undefined;
27754 }
27755 if (!conditionResult) {
27756 subscriber.complete();
27757 return undefined;
27758 }
27759 if (subscriber.closed) {
27760 return undefined;
27761 }
27762 }
27763 var value;
27764 try {
27765 value = state.resultSelector(state.state);
27766 }
27767 catch (err) {
27768 subscriber.error(err);
27769 return undefined;
27770 }
27771 if (subscriber.closed) {
27772 return undefined;
27773 }
27774 subscriber.next(value);
27775 if (subscriber.closed) {
27776 return undefined;
27777 }
27778 return this.schedule(state);
27779}
27780//# sourceMappingURL=generate.js.map
27781
27782
27783/***/ }),
27784/* 252 */
27785/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27786
27787"use strict";
27788__webpack_require__.r(__webpack_exports__);
27789/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27790/* harmony export */ "iif": () => /* binding */ iif
27791/* harmony export */ });
27792/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(247);
27793/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
27794/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
27795
27796
27797function iif(condition, trueResult, falseResult) {
27798 if (trueResult === void 0) {
27799 trueResult = _empty__WEBPACK_IMPORTED_MODULE_0__.EMPTY;
27800 }
27801 if (falseResult === void 0) {
27802 falseResult = _empty__WEBPACK_IMPORTED_MODULE_0__.EMPTY;
27803 }
27804 return (0,_defer__WEBPACK_IMPORTED_MODULE_1__.defer)(function () { return condition() ? trueResult : falseResult; });
27805}
27806//# sourceMappingURL=iif.js.map
27807
27808
27809/***/ }),
27810/* 253 */
27811/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27812
27813"use strict";
27814__webpack_require__.r(__webpack_exports__);
27815/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27816/* harmony export */ "interval": () => /* binding */ interval
27817/* harmony export */ });
27818/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(166);
27819/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(212);
27820/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(254);
27821/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
27822
27823
27824
27825function interval(period, scheduler) {
27826 if (period === void 0) {
27827 period = 0;
27828 }
27829 if (scheduler === void 0) {
27830 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.async;
27831 }
27832 if (!(0,_util_isNumeric__WEBPACK_IMPORTED_MODULE_1__.isNumeric)(period) || period < 0) {
27833 period = 0;
27834 }
27835 if (!scheduler || typeof scheduler.schedule !== 'function') {
27836 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.async;
27837 }
27838 return new _Observable__WEBPACK_IMPORTED_MODULE_2__.Observable(function (subscriber) {
27839 subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
27840 return subscriber;
27841 });
27842}
27843function dispatch(state) {
27844 var subscriber = state.subscriber, counter = state.counter, period = state.period;
27845 subscriber.next(counter);
27846 this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
27847}
27848//# sourceMappingURL=interval.js.map
27849
27850
27851/***/ }),
27852/* 254 */
27853/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27854
27855"use strict";
27856__webpack_require__.r(__webpack_exports__);
27857/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27858/* harmony export */ "isNumeric": () => /* binding */ isNumeric
27859/* harmony export */ });
27860/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177);
27861/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
27862
27863function isNumeric(val) {
27864 return !(0,_isArray__WEBPACK_IMPORTED_MODULE_0__.isArray)(val) && (val - parseFloat(val) + 1) >= 0;
27865}
27866//# sourceMappingURL=isNumeric.js.map
27867
27868
27869/***/ }),
27870/* 255 */
27871/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27872
27873"use strict";
27874__webpack_require__.r(__webpack_exports__);
27875/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27876/* harmony export */ "merge": () => /* binding */ merge
27877/* harmony export */ });
27878/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
27879/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
27880/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(238);
27881/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(196);
27882/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
27883
27884
27885
27886
27887function merge() {
27888 var observables = [];
27889 for (var _i = 0; _i < arguments.length; _i++) {
27890 observables[_i] = arguments[_i];
27891 }
27892 var concurrent = Number.POSITIVE_INFINITY;
27893 var scheduler = null;
27894 var last = observables[observables.length - 1];
27895 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(last)) {
27896 scheduler = observables.pop();
27897 if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
27898 concurrent = observables.pop();
27899 }
27900 }
27901 else if (typeof last === 'number') {
27902 concurrent = observables.pop();
27903 }
27904 if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable) {
27905 return observables[0];
27906 }
27907 return (0,_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__.mergeAll)(concurrent)((0,_fromArray__WEBPACK_IMPORTED_MODULE_3__.fromArray)(observables, scheduler));
27908}
27909//# sourceMappingURL=merge.js.map
27910
27911
27912/***/ }),
27913/* 256 */
27914/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27915
27916"use strict";
27917__webpack_require__.r(__webpack_exports__);
27918/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27919/* harmony export */ "NEVER": () => /* binding */ NEVER,
27920/* harmony export */ "never": () => /* binding */ never
27921/* harmony export */ });
27922/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
27923/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(217);
27924/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
27925
27926
27927var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(_util_noop__WEBPACK_IMPORTED_MODULE_1__.noop);
27928function never() {
27929 return NEVER;
27930}
27931//# sourceMappingURL=never.js.map
27932
27933
27934/***/ }),
27935/* 257 */
27936/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27937
27938"use strict";
27939__webpack_require__.r(__webpack_exports__);
27940/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27941/* harmony export */ "onErrorResumeNext": () => /* binding */ onErrorResumeNext
27942/* harmony export */ });
27943/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(166);
27944/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(240);
27945/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
27946/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199);
27947/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
27948
27949
27950
27951
27952function onErrorResumeNext() {
27953 var sources = [];
27954 for (var _i = 0; _i < arguments.length; _i++) {
27955 sources[_i] = arguments[_i];
27956 }
27957 if (sources.length === 0) {
27958 return _empty__WEBPACK_IMPORTED_MODULE_0__.EMPTY;
27959 }
27960 var first = sources[0], remainder = sources.slice(1);
27961 if (sources.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_1__.isArray)(first)) {
27962 return onErrorResumeNext.apply(void 0, first);
27963 }
27964 return new _Observable__WEBPACK_IMPORTED_MODULE_2__.Observable(function (subscriber) {
27965 var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
27966 return (0,_from__WEBPACK_IMPORTED_MODULE_3__.from)(first).subscribe({
27967 next: function (value) { subscriber.next(value); },
27968 error: subNext,
27969 complete: subNext,
27970 });
27971 });
27972}
27973//# sourceMappingURL=onErrorResumeNext.js.map
27974
27975
27976/***/ }),
27977/* 258 */
27978/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27979
27980"use strict";
27981__webpack_require__.r(__webpack_exports__);
27982/* harmony export */ __webpack_require__.d(__webpack_exports__, {
27983/* harmony export */ "pairs": () => /* binding */ pairs,
27984/* harmony export */ "dispatch": () => /* binding */ dispatch
27985/* harmony export */ });
27986/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
27987/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
27988/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
27989
27990
27991function pairs(obj, scheduler) {
27992 if (!scheduler) {
27993 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
27994 var keys = Object.keys(obj);
27995 for (var i = 0; i < keys.length && !subscriber.closed; i++) {
27996 var key = keys[i];
27997 if (obj.hasOwnProperty(key)) {
27998 subscriber.next([key, obj[key]]);
27999 }
28000 }
28001 subscriber.complete();
28002 });
28003 }
28004 else {
28005 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
28006 var keys = Object.keys(obj);
28007 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
28008 subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
28009 return subscription;
28010 });
28011 }
28012}
28013function dispatch(state) {
28014 var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
28015 if (!subscriber.closed) {
28016 if (index < keys.length) {
28017 var key = keys[index];
28018 subscriber.next([key, obj[key]]);
28019 subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
28020 }
28021 else {
28022 subscriber.complete();
28023 }
28024 }
28025}
28026//# sourceMappingURL=pairs.js.map
28027
28028
28029/***/ }),
28030/* 259 */
28031/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28032
28033"use strict";
28034__webpack_require__.r(__webpack_exports__);
28035/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28036/* harmony export */ "partition": () => /* binding */ partition
28037/* harmony export */ });
28038/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(261);
28039/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
28040/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(260);
28041/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
28042/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
28043
28044
28045
28046
28047function partition(source, predicate, thisArg) {
28048 return [
28049 (0,_operators_filter__WEBPACK_IMPORTED_MODULE_0__.filter)(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable((0,_util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__.subscribeTo)(source))),
28050 (0,_operators_filter__WEBPACK_IMPORTED_MODULE_0__.filter)((0,_util_not__WEBPACK_IMPORTED_MODULE_3__.not)(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_1__.Observable((0,_util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__.subscribeTo)(source)))
28051 ];
28052}
28053//# sourceMappingURL=partition.js.map
28054
28055
28056/***/ }),
28057/* 260 */
28058/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28059
28060"use strict";
28061__webpack_require__.r(__webpack_exports__);
28062/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28063/* harmony export */ "filter": () => /* binding */ filter
28064/* harmony export */ });
28065/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
28066/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
28067/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
28068
28069
28070function filter(predicate, thisArg) {
28071 return function filterOperatorFunction(source) {
28072 return source.lift(new FilterOperator(predicate, thisArg));
28073 };
28074}
28075var FilterOperator = /*@__PURE__*/ (function () {
28076 function FilterOperator(predicate, thisArg) {
28077 this.predicate = predicate;
28078 this.thisArg = thisArg;
28079 }
28080 FilterOperator.prototype.call = function (subscriber, source) {
28081 return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
28082 };
28083 return FilterOperator;
28084}());
28085var FilterSubscriber = /*@__PURE__*/ (function (_super) {
28086 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(FilterSubscriber, _super);
28087 function FilterSubscriber(destination, predicate, thisArg) {
28088 var _this = _super.call(this, destination) || this;
28089 _this.predicate = predicate;
28090 _this.thisArg = thisArg;
28091 _this.count = 0;
28092 return _this;
28093 }
28094 FilterSubscriber.prototype._next = function (value) {
28095 var result;
28096 try {
28097 result = this.predicate.call(this.thisArg, value, this.count++);
28098 }
28099 catch (err) {
28100 this.destination.error(err);
28101 return;
28102 }
28103 if (result) {
28104 this.destination.next(value);
28105 }
28106 };
28107 return FilterSubscriber;
28108}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
28109//# sourceMappingURL=filter.js.map
28110
28111
28112/***/ }),
28113/* 261 */
28114/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28115
28116"use strict";
28117__webpack_require__.r(__webpack_exports__);
28118/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28119/* harmony export */ "not": () => /* binding */ not
28120/* harmony export */ });
28121/** PURE_IMPORTS_START PURE_IMPORTS_END */
28122function not(pred, thisArg) {
28123 function notPred() {
28124 return !(notPred.pred.apply(notPred.thisArg, arguments));
28125 }
28126 notPred.pred = pred;
28127 notPred.thisArg = thisArg;
28128 return notPred;
28129}
28130//# sourceMappingURL=not.js.map
28131
28132
28133/***/ }),
28134/* 262 */
28135/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28136
28137"use strict";
28138__webpack_require__.r(__webpack_exports__);
28139/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28140/* harmony export */ "race": () => /* binding */ race,
28141/* harmony export */ "RaceOperator": () => /* binding */ RaceOperator,
28142/* harmony export */ "RaceSubscriber": () => /* binding */ RaceSubscriber
28143/* harmony export */ });
28144/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
28145/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
28146/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(196);
28147/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(235);
28148/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(226);
28149/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28150
28151
28152
28153
28154
28155function race() {
28156 var observables = [];
28157 for (var _i = 0; _i < arguments.length; _i++) {
28158 observables[_i] = arguments[_i];
28159 }
28160 if (observables.length === 1) {
28161 if ((0,_util_isArray__WEBPACK_IMPORTED_MODULE_1__.isArray)(observables[0])) {
28162 observables = observables[0];
28163 }
28164 else {
28165 return observables[0];
28166 }
28167 }
28168 return (0,_fromArray__WEBPACK_IMPORTED_MODULE_2__.fromArray)(observables, undefined).lift(new RaceOperator());
28169}
28170var RaceOperator = /*@__PURE__*/ (function () {
28171 function RaceOperator() {
28172 }
28173 RaceOperator.prototype.call = function (subscriber, source) {
28174 return source.subscribe(new RaceSubscriber(subscriber));
28175 };
28176 return RaceOperator;
28177}());
28178
28179var RaceSubscriber = /*@__PURE__*/ (function (_super) {
28180 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(RaceSubscriber, _super);
28181 function RaceSubscriber(destination) {
28182 var _this = _super.call(this, destination) || this;
28183 _this.hasFirst = false;
28184 _this.observables = [];
28185 _this.subscriptions = [];
28186 return _this;
28187 }
28188 RaceSubscriber.prototype._next = function (observable) {
28189 this.observables.push(observable);
28190 };
28191 RaceSubscriber.prototype._complete = function () {
28192 var observables = this.observables;
28193 var len = observables.length;
28194 if (len === 0) {
28195 this.destination.complete();
28196 }
28197 else {
28198 for (var i = 0; i < len && !this.hasFirst; i++) {
28199 var observable = observables[i];
28200 var subscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__.subscribeToResult)(this, observable, observable, i);
28201 if (this.subscriptions) {
28202 this.subscriptions.push(subscription);
28203 }
28204 this.add(subscription);
28205 }
28206 this.observables = null;
28207 }
28208 };
28209 RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28210 if (!this.hasFirst) {
28211 this.hasFirst = true;
28212 for (var i = 0; i < this.subscriptions.length; i++) {
28213 if (i !== outerIndex) {
28214 var subscription = this.subscriptions[i];
28215 subscription.unsubscribe();
28216 this.remove(subscription);
28217 }
28218 }
28219 this.subscriptions = null;
28220 }
28221 this.destination.next(innerValue);
28222 };
28223 return RaceSubscriber;
28224}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__.OuterSubscriber));
28225
28226//# sourceMappingURL=race.js.map
28227
28228
28229/***/ }),
28230/* 263 */
28231/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28232
28233"use strict";
28234__webpack_require__.r(__webpack_exports__);
28235/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28236/* harmony export */ "range": () => /* binding */ range,
28237/* harmony export */ "dispatch": () => /* binding */ dispatch
28238/* harmony export */ });
28239/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
28240/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
28241
28242function range(start, count, scheduler) {
28243 if (start === void 0) {
28244 start = 0;
28245 }
28246 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
28247 if (count === undefined) {
28248 count = start;
28249 start = 0;
28250 }
28251 var index = 0;
28252 var current = start;
28253 if (scheduler) {
28254 return scheduler.schedule(dispatch, 0, {
28255 index: index, count: count, start: start, subscriber: subscriber
28256 });
28257 }
28258 else {
28259 do {
28260 if (index++ >= count) {
28261 subscriber.complete();
28262 break;
28263 }
28264 subscriber.next(current++);
28265 if (subscriber.closed) {
28266 break;
28267 }
28268 } while (true);
28269 }
28270 return undefined;
28271 });
28272}
28273function dispatch(state) {
28274 var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
28275 if (index >= count) {
28276 subscriber.complete();
28277 return;
28278 }
28279 subscriber.next(start);
28280 if (subscriber.closed) {
28281 return;
28282 }
28283 state.index = index + 1;
28284 state.start = start + 1;
28285 this.schedule(state);
28286}
28287//# sourceMappingURL=range.js.map
28288
28289
28290/***/ }),
28291/* 264 */
28292/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28293
28294"use strict";
28295__webpack_require__.r(__webpack_exports__);
28296/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28297/* harmony export */ "timer": () => /* binding */ timer
28298/* harmony export */ });
28299/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166);
28300/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(212);
28301/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(254);
28302/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
28303/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
28304
28305
28306
28307
28308function timer(dueTime, periodOrScheduler, scheduler) {
28309 if (dueTime === void 0) {
28310 dueTime = 0;
28311 }
28312 var period = -1;
28313 if ((0,_util_isNumeric__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(periodOrScheduler)) {
28314 period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
28315 }
28316 else if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(periodOrScheduler)) {
28317 scheduler = periodOrScheduler;
28318 }
28319 if (!(0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(scheduler)) {
28320 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__.async;
28321 }
28322 return new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(function (subscriber) {
28323 var due = (0,_util_isNumeric__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(dueTime)
28324 ? dueTime
28325 : (+dueTime - scheduler.now());
28326 return scheduler.schedule(dispatch, due, {
28327 index: 0, period: period, subscriber: subscriber
28328 });
28329 });
28330}
28331function dispatch(state) {
28332 var index = state.index, period = state.period, subscriber = state.subscriber;
28333 subscriber.next(index);
28334 if (subscriber.closed) {
28335 return;
28336 }
28337 else if (period === -1) {
28338 return subscriber.complete();
28339 }
28340 state.index = index + 1;
28341 this.schedule(state, period);
28342}
28343//# sourceMappingURL=timer.js.map
28344
28345
28346/***/ }),
28347/* 265 */
28348/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28349
28350"use strict";
28351__webpack_require__.r(__webpack_exports__);
28352/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28353/* harmony export */ "using": () => /* binding */ using
28354/* harmony export */ });
28355/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
28356/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
28357/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(199);
28358/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
28359
28360
28361
28362function using(resourceFactory, observableFactory) {
28363 return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(function (subscriber) {
28364 var resource;
28365 try {
28366 resource = resourceFactory();
28367 }
28368 catch (err) {
28369 subscriber.error(err);
28370 return undefined;
28371 }
28372 var result;
28373 try {
28374 result = observableFactory(resource);
28375 }
28376 catch (err) {
28377 subscriber.error(err);
28378 return undefined;
28379 }
28380 var source = result ? (0,_from__WEBPACK_IMPORTED_MODULE_1__.from)(result) : _empty__WEBPACK_IMPORTED_MODULE_2__.EMPTY;
28381 var subscription = source.subscribe(subscriber);
28382 return function () {
28383 subscription.unsubscribe();
28384 if (resource) {
28385 resource.unsubscribe();
28386 }
28387 };
28388 });
28389}
28390//# sourceMappingURL=using.js.map
28391
28392
28393/***/ }),
28394/* 266 */
28395/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28396
28397"use strict";
28398__webpack_require__.r(__webpack_exports__);
28399/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28400/* harmony export */ "zip": () => /* binding */ zip,
28401/* harmony export */ "ZipOperator": () => /* binding */ ZipOperator,
28402/* harmony export */ "ZipSubscriber": () => /* binding */ ZipSubscriber
28403/* harmony export */ });
28404/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
28405/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196);
28406/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
28407/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(168);
28408/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(235);
28409/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(226);
28410/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(233);
28411/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
28412
28413
28414
28415
28416
28417
28418
28419function zip() {
28420 var observables = [];
28421 for (var _i = 0; _i < arguments.length; _i++) {
28422 observables[_i] = arguments[_i];
28423 }
28424 var resultSelector = observables[observables.length - 1];
28425 if (typeof resultSelector === 'function') {
28426 observables.pop();
28427 }
28428 return (0,_fromArray__WEBPACK_IMPORTED_MODULE_1__.fromArray)(observables, undefined).lift(new ZipOperator(resultSelector));
28429}
28430var ZipOperator = /*@__PURE__*/ (function () {
28431 function ZipOperator(resultSelector) {
28432 this.resultSelector = resultSelector;
28433 }
28434 ZipOperator.prototype.call = function (subscriber, source) {
28435 return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
28436 };
28437 return ZipOperator;
28438}());
28439
28440var ZipSubscriber = /*@__PURE__*/ (function (_super) {
28441 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ZipSubscriber, _super);
28442 function ZipSubscriber(destination, resultSelector, values) {
28443 if (values === void 0) {
28444 values = Object.create(null);
28445 }
28446 var _this = _super.call(this, destination) || this;
28447 _this.iterators = [];
28448 _this.active = 0;
28449 _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
28450 _this.values = values;
28451 return _this;
28452 }
28453 ZipSubscriber.prototype._next = function (value) {
28454 var iterators = this.iterators;
28455 if ((0,_util_isArray__WEBPACK_IMPORTED_MODULE_2__.isArray)(value)) {
28456 iterators.push(new StaticArrayIterator(value));
28457 }
28458 else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__.iterator] === 'function') {
28459 iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__.iterator]()));
28460 }
28461 else {
28462 iterators.push(new ZipBufferIterator(this.destination, this, value));
28463 }
28464 };
28465 ZipSubscriber.prototype._complete = function () {
28466 var iterators = this.iterators;
28467 var len = iterators.length;
28468 this.unsubscribe();
28469 if (len === 0) {
28470 this.destination.complete();
28471 return;
28472 }
28473 this.active = len;
28474 for (var i = 0; i < len; i++) {
28475 var iterator = iterators[i];
28476 if (iterator.stillUnsubscribed) {
28477 var destination = this.destination;
28478 destination.add(iterator.subscribe(iterator, i));
28479 }
28480 else {
28481 this.active--;
28482 }
28483 }
28484 };
28485 ZipSubscriber.prototype.notifyInactive = function () {
28486 this.active--;
28487 if (this.active === 0) {
28488 this.destination.complete();
28489 }
28490 };
28491 ZipSubscriber.prototype.checkIterators = function () {
28492 var iterators = this.iterators;
28493 var len = iterators.length;
28494 var destination = this.destination;
28495 for (var i = 0; i < len; i++) {
28496 var iterator = iterators[i];
28497 if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
28498 return;
28499 }
28500 }
28501 var shouldComplete = false;
28502 var args = [];
28503 for (var i = 0; i < len; i++) {
28504 var iterator = iterators[i];
28505 var result = iterator.next();
28506 if (iterator.hasCompleted()) {
28507 shouldComplete = true;
28508 }
28509 if (result.done) {
28510 destination.complete();
28511 return;
28512 }
28513 args.push(result.value);
28514 }
28515 if (this.resultSelector) {
28516 this._tryresultSelector(args);
28517 }
28518 else {
28519 destination.next(args);
28520 }
28521 if (shouldComplete) {
28522 destination.complete();
28523 }
28524 };
28525 ZipSubscriber.prototype._tryresultSelector = function (args) {
28526 var result;
28527 try {
28528 result = this.resultSelector.apply(this, args);
28529 }
28530 catch (err) {
28531 this.destination.error(err);
28532 return;
28533 }
28534 this.destination.next(result);
28535 };
28536 return ZipSubscriber;
28537}(_Subscriber__WEBPACK_IMPORTED_MODULE_4__.Subscriber));
28538
28539var StaticIterator = /*@__PURE__*/ (function () {
28540 function StaticIterator(iterator) {
28541 this.iterator = iterator;
28542 this.nextResult = iterator.next();
28543 }
28544 StaticIterator.prototype.hasValue = function () {
28545 return true;
28546 };
28547 StaticIterator.prototype.next = function () {
28548 var result = this.nextResult;
28549 this.nextResult = this.iterator.next();
28550 return result;
28551 };
28552 StaticIterator.prototype.hasCompleted = function () {
28553 var nextResult = this.nextResult;
28554 return nextResult && nextResult.done;
28555 };
28556 return StaticIterator;
28557}());
28558var StaticArrayIterator = /*@__PURE__*/ (function () {
28559 function StaticArrayIterator(array) {
28560 this.array = array;
28561 this.index = 0;
28562 this.length = 0;
28563 this.length = array.length;
28564 }
28565 StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__.iterator] = function () {
28566 return this;
28567 };
28568 StaticArrayIterator.prototype.next = function (value) {
28569 var i = this.index++;
28570 var array = this.array;
28571 return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
28572 };
28573 StaticArrayIterator.prototype.hasValue = function () {
28574 return this.array.length > this.index;
28575 };
28576 StaticArrayIterator.prototype.hasCompleted = function () {
28577 return this.array.length === this.index;
28578 };
28579 return StaticArrayIterator;
28580}());
28581var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
28582 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ZipBufferIterator, _super);
28583 function ZipBufferIterator(destination, parent, observable) {
28584 var _this = _super.call(this, destination) || this;
28585 _this.parent = parent;
28586 _this.observable = observable;
28587 _this.stillUnsubscribed = true;
28588 _this.buffer = [];
28589 _this.isComplete = false;
28590 return _this;
28591 }
28592 ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__.iterator] = function () {
28593 return this;
28594 };
28595 ZipBufferIterator.prototype.next = function () {
28596 var buffer = this.buffer;
28597 if (buffer.length === 0 && this.isComplete) {
28598 return { value: null, done: true };
28599 }
28600 else {
28601 return { value: buffer.shift(), done: false };
28602 }
28603 };
28604 ZipBufferIterator.prototype.hasValue = function () {
28605 return this.buffer.length > 0;
28606 };
28607 ZipBufferIterator.prototype.hasCompleted = function () {
28608 return this.buffer.length === 0 && this.isComplete;
28609 };
28610 ZipBufferIterator.prototype.notifyComplete = function () {
28611 if (this.buffer.length > 0) {
28612 this.isComplete = true;
28613 this.parent.notifyInactive();
28614 }
28615 else {
28616 this.destination.complete();
28617 }
28618 };
28619 ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28620 this.buffer.push(innerValue);
28621 this.parent.checkIterators();
28622 };
28623 ZipBufferIterator.prototype.subscribe = function (value, index) {
28624 return (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__.subscribeToResult)(this, this.observable, this, index);
28625 };
28626 return ZipBufferIterator;
28627}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_6__.OuterSubscriber));
28628//# sourceMappingURL=zip.js.map
28629
28630
28631/***/ }),
28632/* 267 */,
28633/* 268 */
28634/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28635
28636"use strict";
28637__webpack_require__.r(__webpack_exports__);
28638/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28639/* harmony export */ "audit": () => /* reexport safe */ _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__.audit,
28640/* harmony export */ "auditTime": () => /* reexport safe */ _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__.auditTime,
28641/* harmony export */ "buffer": () => /* reexport safe */ _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__.buffer,
28642/* harmony export */ "bufferCount": () => /* reexport safe */ _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__.bufferCount,
28643/* harmony export */ "bufferTime": () => /* reexport safe */ _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__.bufferTime,
28644/* harmony export */ "bufferToggle": () => /* reexport safe */ _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__.bufferToggle,
28645/* harmony export */ "bufferWhen": () => /* reexport safe */ _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__.bufferWhen,
28646/* harmony export */ "catchError": () => /* reexport safe */ _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__.catchError,
28647/* harmony export */ "combineAll": () => /* reexport safe */ _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__.combineAll,
28648/* harmony export */ "combineLatest": () => /* reexport safe */ _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__.combineLatest,
28649/* harmony export */ "concat": () => /* reexport safe */ _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__.concat,
28650/* harmony export */ "concatAll": () => /* reexport safe */ _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__.concatAll,
28651/* harmony export */ "concatMap": () => /* reexport safe */ _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__.concatMap,
28652/* harmony export */ "concatMapTo": () => /* reexport safe */ _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__.concatMapTo,
28653/* harmony export */ "count": () => /* reexport safe */ _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__.count,
28654/* harmony export */ "debounce": () => /* reexport safe */ _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__.debounce,
28655/* harmony export */ "debounceTime": () => /* reexport safe */ _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__.debounceTime,
28656/* harmony export */ "defaultIfEmpty": () => /* reexport safe */ _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__.defaultIfEmpty,
28657/* harmony export */ "delay": () => /* reexport safe */ _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__.delay,
28658/* harmony export */ "delayWhen": () => /* reexport safe */ _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__.delayWhen,
28659/* harmony export */ "dematerialize": () => /* reexport safe */ _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__.dematerialize,
28660/* harmony export */ "distinct": () => /* reexport safe */ _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__.distinct,
28661/* harmony export */ "distinctUntilChanged": () => /* reexport safe */ _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__.distinctUntilChanged,
28662/* harmony export */ "distinctUntilKeyChanged": () => /* reexport safe */ _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__.distinctUntilKeyChanged,
28663/* harmony export */ "elementAt": () => /* reexport safe */ _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__.elementAt,
28664/* harmony export */ "endWith": () => /* reexport safe */ _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__.endWith,
28665/* harmony export */ "every": () => /* reexport safe */ _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__.every,
28666/* harmony export */ "exhaust": () => /* reexport safe */ _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__.exhaust,
28667/* harmony export */ "exhaustMap": () => /* reexport safe */ _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__.exhaustMap,
28668/* harmony export */ "expand": () => /* reexport safe */ _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__.expand,
28669/* harmony export */ "filter": () => /* reexport safe */ _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__.filter,
28670/* harmony export */ "finalize": () => /* reexport safe */ _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__.finalize,
28671/* harmony export */ "find": () => /* reexport safe */ _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__.find,
28672/* harmony export */ "findIndex": () => /* reexport safe */ _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__.findIndex,
28673/* harmony export */ "first": () => /* reexport safe */ _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__.first,
28674/* harmony export */ "groupBy": () => /* reexport safe */ _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__.groupBy,
28675/* harmony export */ "ignoreElements": () => /* reexport safe */ _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__.ignoreElements,
28676/* harmony export */ "isEmpty": () => /* reexport safe */ _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__.isEmpty,
28677/* harmony export */ "last": () => /* reexport safe */ _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__.last,
28678/* harmony export */ "map": () => /* reexport safe */ _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__.map,
28679/* harmony export */ "mapTo": () => /* reexport safe */ _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__.mapTo,
28680/* harmony export */ "materialize": () => /* reexport safe */ _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__.materialize,
28681/* harmony export */ "max": () => /* reexport safe */ _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__.max,
28682/* harmony export */ "merge": () => /* reexport safe */ _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__.merge,
28683/* harmony export */ "mergeAll": () => /* reexport safe */ _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__.mergeAll,
28684/* harmony export */ "mergeMap": () => /* reexport safe */ _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__.mergeMap,
28685/* harmony export */ "flatMap": () => /* reexport safe */ _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__.mergeMap,
28686/* harmony export */ "mergeMapTo": () => /* reexport safe */ _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__.mergeMapTo,
28687/* harmony export */ "mergeScan": () => /* reexport safe */ _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__.mergeScan,
28688/* harmony export */ "min": () => /* reexport safe */ _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__.min,
28689/* harmony export */ "multicast": () => /* reexport safe */ _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__.multicast,
28690/* harmony export */ "observeOn": () => /* reexport safe */ _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__.observeOn,
28691/* harmony export */ "onErrorResumeNext": () => /* reexport safe */ _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__.onErrorResumeNext,
28692/* harmony export */ "pairwise": () => /* reexport safe */ _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__.pairwise,
28693/* harmony export */ "partition": () => /* reexport safe */ _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__.partition,
28694/* harmony export */ "pluck": () => /* reexport safe */ _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__.pluck,
28695/* harmony export */ "publish": () => /* reexport safe */ _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__.publish,
28696/* harmony export */ "publishBehavior": () => /* reexport safe */ _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__.publishBehavior,
28697/* harmony export */ "publishLast": () => /* reexport safe */ _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__.publishLast,
28698/* harmony export */ "publishReplay": () => /* reexport safe */ _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__.publishReplay,
28699/* harmony export */ "race": () => /* reexport safe */ _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__.race,
28700/* harmony export */ "reduce": () => /* reexport safe */ _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__.reduce,
28701/* harmony export */ "repeat": () => /* reexport safe */ _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__.repeat,
28702/* harmony export */ "repeatWhen": () => /* reexport safe */ _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__.repeatWhen,
28703/* harmony export */ "retry": () => /* reexport safe */ _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__.retry,
28704/* harmony export */ "retryWhen": () => /* reexport safe */ _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__.retryWhen,
28705/* harmony export */ "refCount": () => /* reexport safe */ _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__.refCount,
28706/* harmony export */ "sample": () => /* reexport safe */ _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__.sample,
28707/* harmony export */ "sampleTime": () => /* reexport safe */ _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__.sampleTime,
28708/* harmony export */ "scan": () => /* reexport safe */ _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__.scan,
28709/* harmony export */ "sequenceEqual": () => /* reexport safe */ _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__.sequenceEqual,
28710/* harmony export */ "share": () => /* reexport safe */ _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__.share,
28711/* harmony export */ "shareReplay": () => /* reexport safe */ _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__.shareReplay,
28712/* harmony export */ "single": () => /* reexport safe */ _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__.single,
28713/* harmony export */ "skip": () => /* reexport safe */ _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__.skip,
28714/* harmony export */ "skipLast": () => /* reexport safe */ _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__.skipLast,
28715/* harmony export */ "skipUntil": () => /* reexport safe */ _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__.skipUntil,
28716/* harmony export */ "skipWhile": () => /* reexport safe */ _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__.skipWhile,
28717/* harmony export */ "startWith": () => /* reexport safe */ _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__.startWith,
28718/* harmony export */ "subscribeOn": () => /* reexport safe */ _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__.subscribeOn,
28719/* harmony export */ "switchAll": () => /* reexport safe */ _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__.switchAll,
28720/* harmony export */ "switchMap": () => /* reexport safe */ _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__.switchMap,
28721/* harmony export */ "switchMapTo": () => /* reexport safe */ _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__.switchMapTo,
28722/* harmony export */ "take": () => /* reexport safe */ _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__.take,
28723/* harmony export */ "takeLast": () => /* reexport safe */ _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__.takeLast,
28724/* harmony export */ "takeUntil": () => /* reexport safe */ _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__.takeUntil,
28725/* harmony export */ "takeWhile": () => /* reexport safe */ _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__.takeWhile,
28726/* harmony export */ "tap": () => /* reexport safe */ _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__.tap,
28727/* harmony export */ "throttle": () => /* reexport safe */ _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__.throttle,
28728/* harmony export */ "throttleTime": () => /* reexport safe */ _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__.throttleTime,
28729/* harmony export */ "throwIfEmpty": () => /* reexport safe */ _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__.throwIfEmpty,
28730/* harmony export */ "timeInterval": () => /* reexport safe */ _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__.timeInterval,
28731/* harmony export */ "timeout": () => /* reexport safe */ _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__.timeout,
28732/* harmony export */ "timeoutWith": () => /* reexport safe */ _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__.timeoutWith,
28733/* harmony export */ "timestamp": () => /* reexport safe */ _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__.timestamp,
28734/* harmony export */ "toArray": () => /* reexport safe */ _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__.toArray,
28735/* harmony export */ "window": () => /* reexport safe */ _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__.window,
28736/* harmony export */ "windowCount": () => /* reexport safe */ _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__.windowCount,
28737/* harmony export */ "windowTime": () => /* reexport safe */ _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__.windowTime,
28738/* harmony export */ "windowToggle": () => /* reexport safe */ _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__.windowToggle,
28739/* harmony export */ "windowWhen": () => /* reexport safe */ _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__.windowWhen,
28740/* harmony export */ "withLatestFrom": () => /* reexport safe */ _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__.withLatestFrom,
28741/* harmony export */ "zip": () => /* reexport safe */ _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__.zip,
28742/* harmony export */ "zipAll": () => /* reexport safe */ _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__.zipAll
28743/* harmony export */ });
28744/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(269);
28745/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(270);
28746/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(271);
28747/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(272);
28748/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(273);
28749/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(274);
28750/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(275);
28751/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(276);
28752/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(277);
28753/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(278);
28754/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(279);
28755/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(237);
28756/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(280);
28757/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(281);
28758/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(282);
28759/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(283);
28760/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(284);
28761/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(285);
28762/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(286);
28763/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(288);
28764/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(289);
28765/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(290);
28766/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(291);
28767/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(292);
28768/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(293);
28769/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(296);
28770/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(297);
28771/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(298);
28772/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(299);
28773/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(300);
28774/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(260);
28775/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(301);
28776/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(302);
28777/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(303);
28778/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(304);
28779/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(188);
28780/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(305);
28781/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(306);
28782/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(307);
28783/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(223);
28784/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(309);
28785/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(310);
28786/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(311);
28787/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(314);
28788/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(238);
28789/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(239);
28790/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(315);
28791/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(316);
28792/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(317);
28793/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(318);
28794/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(191);
28795/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(319);
28796/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(320);
28797/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(321);
28798/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(322);
28799/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(323);
28800/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(324);
28801/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(325);
28802/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(326);
28803/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(327);
28804/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(312);
28805/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(328);
28806/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(329);
28807/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(330);
28808/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(331);
28809/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(184);
28810/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(332);
28811/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(333);
28812/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(313);
28813/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(334);
28814/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(335);
28815/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(336);
28816/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(337);
28817/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(338);
28818/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(339);
28819/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(340);
28820/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(341);
28821/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(342);
28822/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(343);
28823/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(345);
28824/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(346);
28825/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(347);
28826/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(294);
28827/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(308);
28828/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(348);
28829/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(349);
28830/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(350);
28831/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(351);
28832/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(352);
28833/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(295);
28834/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(353);
28835/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(354);
28836/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(355);
28837/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(356);
28838/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(357);
28839/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(358);
28840/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(359);
28841/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(360);
28842/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(361);
28843/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(362);
28844/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(363);
28845/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(364);
28846/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(365);
28847/** PURE_IMPORTS_START PURE_IMPORTS_END */
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952//# sourceMappingURL=index.js.map
28953
28954
28955/***/ }),
28956/* 269 */
28957/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28958
28959"use strict";
28960__webpack_require__.r(__webpack_exports__);
28961/* harmony export */ __webpack_require__.d(__webpack_exports__, {
28962/* harmony export */ "audit": () => /* binding */ audit
28963/* harmony export */ });
28964/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
28965/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
28966/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
28967/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28968
28969
28970
28971function audit(durationSelector) {
28972 return function auditOperatorFunction(source) {
28973 return source.lift(new AuditOperator(durationSelector));
28974 };
28975}
28976var AuditOperator = /*@__PURE__*/ (function () {
28977 function AuditOperator(durationSelector) {
28978 this.durationSelector = durationSelector;
28979 }
28980 AuditOperator.prototype.call = function (subscriber, source) {
28981 return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
28982 };
28983 return AuditOperator;
28984}());
28985var AuditSubscriber = /*@__PURE__*/ (function (_super) {
28986 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(AuditSubscriber, _super);
28987 function AuditSubscriber(destination, durationSelector) {
28988 var _this = _super.call(this, destination) || this;
28989 _this.durationSelector = durationSelector;
28990 _this.hasValue = false;
28991 return _this;
28992 }
28993 AuditSubscriber.prototype._next = function (value) {
28994 this.value = value;
28995 this.hasValue = true;
28996 if (!this.throttled) {
28997 var duration = void 0;
28998 try {
28999 var durationSelector = this.durationSelector;
29000 duration = durationSelector(value);
29001 }
29002 catch (err) {
29003 return this.destination.error(err);
29004 }
29005 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(this, duration);
29006 if (!innerSubscription || innerSubscription.closed) {
29007 this.clearThrottle();
29008 }
29009 else {
29010 this.add(this.throttled = innerSubscription);
29011 }
29012 }
29013 };
29014 AuditSubscriber.prototype.clearThrottle = function () {
29015 var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
29016 if (throttled) {
29017 this.remove(throttled);
29018 this.throttled = null;
29019 throttled.unsubscribe();
29020 }
29021 if (hasValue) {
29022 this.value = null;
29023 this.hasValue = false;
29024 this.destination.next(value);
29025 }
29026 };
29027 AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
29028 this.clearThrottle();
29029 };
29030 AuditSubscriber.prototype.notifyComplete = function () {
29031 this.clearThrottle();
29032 };
29033 return AuditSubscriber;
29034}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
29035//# sourceMappingURL=audit.js.map
29036
29037
29038/***/ }),
29039/* 270 */
29040/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29041
29042"use strict";
29043__webpack_require__.r(__webpack_exports__);
29044/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29045/* harmony export */ "auditTime": () => /* binding */ auditTime
29046/* harmony export */ });
29047/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(212);
29048/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(269);
29049/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(264);
29050/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
29051
29052
29053
29054function auditTime(duration, scheduler) {
29055 if (scheduler === void 0) {
29056 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.async;
29057 }
29058 return (0,_audit__WEBPACK_IMPORTED_MODULE_1__.audit)(function () { return (0,_observable_timer__WEBPACK_IMPORTED_MODULE_2__.timer)(duration, scheduler); });
29059}
29060//# sourceMappingURL=auditTime.js.map
29061
29062
29063/***/ }),
29064/* 271 */
29065/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29066
29067"use strict";
29068__webpack_require__.r(__webpack_exports__);
29069/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29070/* harmony export */ "buffer": () => /* binding */ buffer
29071/* harmony export */ });
29072/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29073/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
29074/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
29075/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29076
29077
29078
29079function buffer(closingNotifier) {
29080 return function bufferOperatorFunction(source) {
29081 return source.lift(new BufferOperator(closingNotifier));
29082 };
29083}
29084var BufferOperator = /*@__PURE__*/ (function () {
29085 function BufferOperator(closingNotifier) {
29086 this.closingNotifier = closingNotifier;
29087 }
29088 BufferOperator.prototype.call = function (subscriber, source) {
29089 return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
29090 };
29091 return BufferOperator;
29092}());
29093var BufferSubscriber = /*@__PURE__*/ (function (_super) {
29094 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(BufferSubscriber, _super);
29095 function BufferSubscriber(destination, closingNotifier) {
29096 var _this = _super.call(this, destination) || this;
29097 _this.buffer = [];
29098 _this.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(_this, closingNotifier));
29099 return _this;
29100 }
29101 BufferSubscriber.prototype._next = function (value) {
29102 this.buffer.push(value);
29103 };
29104 BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29105 var buffer = this.buffer;
29106 this.buffer = [];
29107 this.destination.next(buffer);
29108 };
29109 return BufferSubscriber;
29110}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
29111//# sourceMappingURL=buffer.js.map
29112
29113
29114/***/ }),
29115/* 272 */
29116/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29117
29118"use strict";
29119__webpack_require__.r(__webpack_exports__);
29120/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29121/* harmony export */ "bufferCount": () => /* binding */ bufferCount
29122/* harmony export */ });
29123/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29124/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
29125/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29126
29127
29128function bufferCount(bufferSize, startBufferEvery) {
29129 if (startBufferEvery === void 0) {
29130 startBufferEvery = null;
29131 }
29132 return function bufferCountOperatorFunction(source) {
29133 return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
29134 };
29135}
29136var BufferCountOperator = /*@__PURE__*/ (function () {
29137 function BufferCountOperator(bufferSize, startBufferEvery) {
29138 this.bufferSize = bufferSize;
29139 this.startBufferEvery = startBufferEvery;
29140 if (!startBufferEvery || bufferSize === startBufferEvery) {
29141 this.subscriberClass = BufferCountSubscriber;
29142 }
29143 else {
29144 this.subscriberClass = BufferSkipCountSubscriber;
29145 }
29146 }
29147 BufferCountOperator.prototype.call = function (subscriber, source) {
29148 return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
29149 };
29150 return BufferCountOperator;
29151}());
29152var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
29153 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(BufferCountSubscriber, _super);
29154 function BufferCountSubscriber(destination, bufferSize) {
29155 var _this = _super.call(this, destination) || this;
29156 _this.bufferSize = bufferSize;
29157 _this.buffer = [];
29158 return _this;
29159 }
29160 BufferCountSubscriber.prototype._next = function (value) {
29161 var buffer = this.buffer;
29162 buffer.push(value);
29163 if (buffer.length == this.bufferSize) {
29164 this.destination.next(buffer);
29165 this.buffer = [];
29166 }
29167 };
29168 BufferCountSubscriber.prototype._complete = function () {
29169 var buffer = this.buffer;
29170 if (buffer.length > 0) {
29171 this.destination.next(buffer);
29172 }
29173 _super.prototype._complete.call(this);
29174 };
29175 return BufferCountSubscriber;
29176}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
29177var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
29178 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(BufferSkipCountSubscriber, _super);
29179 function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
29180 var _this = _super.call(this, destination) || this;
29181 _this.bufferSize = bufferSize;
29182 _this.startBufferEvery = startBufferEvery;
29183 _this.buffers = [];
29184 _this.count = 0;
29185 return _this;
29186 }
29187 BufferSkipCountSubscriber.prototype._next = function (value) {
29188 var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
29189 this.count++;
29190 if (count % startBufferEvery === 0) {
29191 buffers.push([]);
29192 }
29193 for (var i = buffers.length; i--;) {
29194 var buffer = buffers[i];
29195 buffer.push(value);
29196 if (buffer.length === bufferSize) {
29197 buffers.splice(i, 1);
29198 this.destination.next(buffer);
29199 }
29200 }
29201 };
29202 BufferSkipCountSubscriber.prototype._complete = function () {
29203 var _a = this, buffers = _a.buffers, destination = _a.destination;
29204 while (buffers.length > 0) {
29205 var buffer = buffers.shift();
29206 if (buffer.length > 0) {
29207 destination.next(buffer);
29208 }
29209 }
29210 _super.prototype._complete.call(this);
29211 };
29212 return BufferSkipCountSubscriber;
29213}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
29214//# sourceMappingURL=bufferCount.js.map
29215
29216
29217/***/ }),
29218/* 273 */
29219/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29220
29221"use strict";
29222__webpack_require__.r(__webpack_exports__);
29223/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29224/* harmony export */ "bufferTime": () => /* binding */ bufferTime
29225/* harmony export */ });
29226/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29227/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
29228/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
29229/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
29230/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
29231
29232
29233
29234
29235function bufferTime(bufferTimeSpan) {
29236 var length = arguments.length;
29237 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__.async;
29238 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__.isScheduler)(arguments[arguments.length - 1])) {
29239 scheduler = arguments[arguments.length - 1];
29240 length--;
29241 }
29242 var bufferCreationInterval = null;
29243 if (length >= 2) {
29244 bufferCreationInterval = arguments[1];
29245 }
29246 var maxBufferSize = Number.POSITIVE_INFINITY;
29247 if (length >= 3) {
29248 maxBufferSize = arguments[2];
29249 }
29250 return function bufferTimeOperatorFunction(source) {
29251 return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
29252 };
29253}
29254var BufferTimeOperator = /*@__PURE__*/ (function () {
29255 function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
29256 this.bufferTimeSpan = bufferTimeSpan;
29257 this.bufferCreationInterval = bufferCreationInterval;
29258 this.maxBufferSize = maxBufferSize;
29259 this.scheduler = scheduler;
29260 }
29261 BufferTimeOperator.prototype.call = function (subscriber, source) {
29262 return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
29263 };
29264 return BufferTimeOperator;
29265}());
29266var Context = /*@__PURE__*/ (function () {
29267 function Context() {
29268 this.buffer = [];
29269 }
29270 return Context;
29271}());
29272var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
29273 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(BufferTimeSubscriber, _super);
29274 function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
29275 var _this = _super.call(this, destination) || this;
29276 _this.bufferTimeSpan = bufferTimeSpan;
29277 _this.bufferCreationInterval = bufferCreationInterval;
29278 _this.maxBufferSize = maxBufferSize;
29279 _this.scheduler = scheduler;
29280 _this.contexts = [];
29281 var context = _this.openContext();
29282 _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
29283 if (_this.timespanOnly) {
29284 var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
29285 _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
29286 }
29287 else {
29288 var closeState = { subscriber: _this, context: context };
29289 var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
29290 _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
29291 _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
29292 }
29293 return _this;
29294 }
29295 BufferTimeSubscriber.prototype._next = function (value) {
29296 var contexts = this.contexts;
29297 var len = contexts.length;
29298 var filledBufferContext;
29299 for (var i = 0; i < len; i++) {
29300 var context_1 = contexts[i];
29301 var buffer = context_1.buffer;
29302 buffer.push(value);
29303 if (buffer.length == this.maxBufferSize) {
29304 filledBufferContext = context_1;
29305 }
29306 }
29307 if (filledBufferContext) {
29308 this.onBufferFull(filledBufferContext);
29309 }
29310 };
29311 BufferTimeSubscriber.prototype._error = function (err) {
29312 this.contexts.length = 0;
29313 _super.prototype._error.call(this, err);
29314 };
29315 BufferTimeSubscriber.prototype._complete = function () {
29316 var _a = this, contexts = _a.contexts, destination = _a.destination;
29317 while (contexts.length > 0) {
29318 var context_2 = contexts.shift();
29319 destination.next(context_2.buffer);
29320 }
29321 _super.prototype._complete.call(this);
29322 };
29323 BufferTimeSubscriber.prototype._unsubscribe = function () {
29324 this.contexts = null;
29325 };
29326 BufferTimeSubscriber.prototype.onBufferFull = function (context) {
29327 this.closeContext(context);
29328 var closeAction = context.closeAction;
29329 closeAction.unsubscribe();
29330 this.remove(closeAction);
29331 if (!this.closed && this.timespanOnly) {
29332 context = this.openContext();
29333 var bufferTimeSpan = this.bufferTimeSpan;
29334 var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
29335 this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
29336 }
29337 };
29338 BufferTimeSubscriber.prototype.openContext = function () {
29339 var context = new Context();
29340 this.contexts.push(context);
29341 return context;
29342 };
29343 BufferTimeSubscriber.prototype.closeContext = function (context) {
29344 this.destination.next(context.buffer);
29345 var contexts = this.contexts;
29346 var spliceIndex = contexts ? contexts.indexOf(context) : -1;
29347 if (spliceIndex >= 0) {
29348 contexts.splice(contexts.indexOf(context), 1);
29349 }
29350 };
29351 return BufferTimeSubscriber;
29352}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__.Subscriber));
29353function dispatchBufferTimeSpanOnly(state) {
29354 var subscriber = state.subscriber;
29355 var prevContext = state.context;
29356 if (prevContext) {
29357 subscriber.closeContext(prevContext);
29358 }
29359 if (!subscriber.closed) {
29360 state.context = subscriber.openContext();
29361 state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
29362 }
29363}
29364function dispatchBufferCreation(state) {
29365 var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
29366 var context = subscriber.openContext();
29367 var action = this;
29368 if (!subscriber.closed) {
29369 subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
29370 action.schedule(state, bufferCreationInterval);
29371 }
29372}
29373function dispatchBufferClose(arg) {
29374 var subscriber = arg.subscriber, context = arg.context;
29375 subscriber.closeContext(context);
29376}
29377//# sourceMappingURL=bufferTime.js.map
29378
29379
29380/***/ }),
29381/* 274 */
29382/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29383
29384"use strict";
29385__webpack_require__.r(__webpack_exports__);
29386/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29387/* harmony export */ "bufferToggle": () => /* binding */ bufferToggle
29388/* harmony export */ });
29389/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29390/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(174);
29391/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
29392/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
29393/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
29394
29395
29396
29397
29398function bufferToggle(openings, closingSelector) {
29399 return function bufferToggleOperatorFunction(source) {
29400 return source.lift(new BufferToggleOperator(openings, closingSelector));
29401 };
29402}
29403var BufferToggleOperator = /*@__PURE__*/ (function () {
29404 function BufferToggleOperator(openings, closingSelector) {
29405 this.openings = openings;
29406 this.closingSelector = closingSelector;
29407 }
29408 BufferToggleOperator.prototype.call = function (subscriber, source) {
29409 return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
29410 };
29411 return BufferToggleOperator;
29412}());
29413var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
29414 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(BufferToggleSubscriber, _super);
29415 function BufferToggleSubscriber(destination, openings, closingSelector) {
29416 var _this = _super.call(this, destination) || this;
29417 _this.openings = openings;
29418 _this.closingSelector = closingSelector;
29419 _this.contexts = [];
29420 _this.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(_this, openings));
29421 return _this;
29422 }
29423 BufferToggleSubscriber.prototype._next = function (value) {
29424 var contexts = this.contexts;
29425 var len = contexts.length;
29426 for (var i = 0; i < len; i++) {
29427 contexts[i].buffer.push(value);
29428 }
29429 };
29430 BufferToggleSubscriber.prototype._error = function (err) {
29431 var contexts = this.contexts;
29432 while (contexts.length > 0) {
29433 var context_1 = contexts.shift();
29434 context_1.subscription.unsubscribe();
29435 context_1.buffer = null;
29436 context_1.subscription = null;
29437 }
29438 this.contexts = null;
29439 _super.prototype._error.call(this, err);
29440 };
29441 BufferToggleSubscriber.prototype._complete = function () {
29442 var contexts = this.contexts;
29443 while (contexts.length > 0) {
29444 var context_2 = contexts.shift();
29445 this.destination.next(context_2.buffer);
29446 context_2.subscription.unsubscribe();
29447 context_2.buffer = null;
29448 context_2.subscription = null;
29449 }
29450 this.contexts = null;
29451 _super.prototype._complete.call(this);
29452 };
29453 BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29454 outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
29455 };
29456 BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
29457 this.closeBuffer(innerSub.context);
29458 };
29459 BufferToggleSubscriber.prototype.openBuffer = function (value) {
29460 try {
29461 var closingSelector = this.closingSelector;
29462 var closingNotifier = closingSelector.call(this, value);
29463 if (closingNotifier) {
29464 this.trySubscribe(closingNotifier);
29465 }
29466 }
29467 catch (err) {
29468 this._error(err);
29469 }
29470 };
29471 BufferToggleSubscriber.prototype.closeBuffer = function (context) {
29472 var contexts = this.contexts;
29473 if (contexts && context) {
29474 var buffer = context.buffer, subscription = context.subscription;
29475 this.destination.next(buffer);
29476 contexts.splice(contexts.indexOf(context), 1);
29477 this.remove(subscription);
29478 subscription.unsubscribe();
29479 }
29480 };
29481 BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
29482 var contexts = this.contexts;
29483 var buffer = [];
29484 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__.Subscription();
29485 var context = { buffer: buffer, subscription: subscription };
29486 contexts.push(context);
29487 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(this, closingNotifier, context);
29488 if (!innerSubscription || innerSubscription.closed) {
29489 this.closeBuffer(context);
29490 }
29491 else {
29492 innerSubscription.context = context;
29493 this.add(innerSubscription);
29494 subscription.add(innerSubscription);
29495 }
29496 };
29497 return BufferToggleSubscriber;
29498}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
29499//# sourceMappingURL=bufferToggle.js.map
29500
29501
29502/***/ }),
29503/* 275 */
29504/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29505
29506"use strict";
29507__webpack_require__.r(__webpack_exports__);
29508/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29509/* harmony export */ "bufferWhen": () => /* binding */ bufferWhen
29510/* harmony export */ });
29511/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29512/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
29513/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
29514/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
29515/** PURE_IMPORTS_START tslib,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29516
29517
29518
29519
29520function bufferWhen(closingSelector) {
29521 return function (source) {
29522 return source.lift(new BufferWhenOperator(closingSelector));
29523 };
29524}
29525var BufferWhenOperator = /*@__PURE__*/ (function () {
29526 function BufferWhenOperator(closingSelector) {
29527 this.closingSelector = closingSelector;
29528 }
29529 BufferWhenOperator.prototype.call = function (subscriber, source) {
29530 return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
29531 };
29532 return BufferWhenOperator;
29533}());
29534var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
29535 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(BufferWhenSubscriber, _super);
29536 function BufferWhenSubscriber(destination, closingSelector) {
29537 var _this = _super.call(this, destination) || this;
29538 _this.closingSelector = closingSelector;
29539 _this.subscribing = false;
29540 _this.openBuffer();
29541 return _this;
29542 }
29543 BufferWhenSubscriber.prototype._next = function (value) {
29544 this.buffer.push(value);
29545 };
29546 BufferWhenSubscriber.prototype._complete = function () {
29547 var buffer = this.buffer;
29548 if (buffer) {
29549 this.destination.next(buffer);
29550 }
29551 _super.prototype._complete.call(this);
29552 };
29553 BufferWhenSubscriber.prototype._unsubscribe = function () {
29554 this.buffer = null;
29555 this.subscribing = false;
29556 };
29557 BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29558 this.openBuffer();
29559 };
29560 BufferWhenSubscriber.prototype.notifyComplete = function () {
29561 if (this.subscribing) {
29562 this.complete();
29563 }
29564 else {
29565 this.openBuffer();
29566 }
29567 };
29568 BufferWhenSubscriber.prototype.openBuffer = function () {
29569 var closingSubscription = this.closingSubscription;
29570 if (closingSubscription) {
29571 this.remove(closingSubscription);
29572 closingSubscription.unsubscribe();
29573 }
29574 var buffer = this.buffer;
29575 if (this.buffer) {
29576 this.destination.next(buffer);
29577 }
29578 this.buffer = [];
29579 var closingNotifier;
29580 try {
29581 var closingSelector = this.closingSelector;
29582 closingNotifier = closingSelector();
29583 }
29584 catch (err) {
29585 return this.error(err);
29586 }
29587 closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription();
29588 this.closingSubscription = closingSubscription;
29589 this.add(closingSubscription);
29590 this.subscribing = true;
29591 closingSubscription.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__.subscribeToResult)(this, closingNotifier));
29592 this.subscribing = false;
29593 };
29594 return BufferWhenSubscriber;
29595}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
29596//# sourceMappingURL=bufferWhen.js.map
29597
29598
29599/***/ }),
29600/* 276 */
29601/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29602
29603"use strict";
29604__webpack_require__.r(__webpack_exports__);
29605/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29606/* harmony export */ "catchError": () => /* binding */ catchError
29607/* harmony export */ });
29608/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29609/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
29610/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
29611/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
29612/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29613
29614
29615
29616
29617function catchError(selector) {
29618 return function catchErrorOperatorFunction(source) {
29619 var operator = new CatchOperator(selector);
29620 var caught = source.lift(operator);
29621 return (operator.caught = caught);
29622 };
29623}
29624var CatchOperator = /*@__PURE__*/ (function () {
29625 function CatchOperator(selector) {
29626 this.selector = selector;
29627 }
29628 CatchOperator.prototype.call = function (subscriber, source) {
29629 return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
29630 };
29631 return CatchOperator;
29632}());
29633var CatchSubscriber = /*@__PURE__*/ (function (_super) {
29634 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(CatchSubscriber, _super);
29635 function CatchSubscriber(destination, selector, caught) {
29636 var _this = _super.call(this, destination) || this;
29637 _this.selector = selector;
29638 _this.caught = caught;
29639 return _this;
29640 }
29641 CatchSubscriber.prototype.error = function (err) {
29642 if (!this.isStopped) {
29643 var result = void 0;
29644 try {
29645 result = this.selector(err, this.caught);
29646 }
29647 catch (err2) {
29648 _super.prototype.error.call(this, err2);
29649 return;
29650 }
29651 this._unsubscribeAndRecycle();
29652 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__.InnerSubscriber(this, undefined, undefined);
29653 this.add(innerSubscriber);
29654 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__.subscribeToResult)(this, result, undefined, undefined, innerSubscriber);
29655 if (innerSubscription !== innerSubscriber) {
29656 this.add(innerSubscription);
29657 }
29658 }
29659 };
29660 return CatchSubscriber;
29661}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
29662//# sourceMappingURL=catchError.js.map
29663
29664
29665/***/ }),
29666/* 277 */
29667/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29668
29669"use strict";
29670__webpack_require__.r(__webpack_exports__);
29671/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29672/* harmony export */ "combineAll": () => /* binding */ combineAll
29673/* harmony export */ });
29674/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(225);
29675/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
29676
29677function combineAll(project) {
29678 return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__.CombineLatestOperator(project)); };
29679}
29680//# sourceMappingURL=combineAll.js.map
29681
29682
29683/***/ }),
29684/* 278 */
29685/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29686
29687"use strict";
29688__webpack_require__.r(__webpack_exports__);
29689/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29690/* harmony export */ "combineLatest": () => /* binding */ combineLatest
29691/* harmony export */ });
29692/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177);
29693/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(225);
29694/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
29695/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
29696
29697
29698
29699var none = {};
29700function combineLatest() {
29701 var observables = [];
29702 for (var _i = 0; _i < arguments.length; _i++) {
29703 observables[_i] = arguments[_i];
29704 }
29705 var project = null;
29706 if (typeof observables[observables.length - 1] === 'function') {
29707 project = observables.pop();
29708 }
29709 if (observables.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_0__.isArray)(observables[0])) {
29710 observables = observables[0].slice();
29711 }
29712 return function (source) { return source.lift.call((0,_observable_from__WEBPACK_IMPORTED_MODULE_1__.from)([source].concat(observables)), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_2__.CombineLatestOperator(project)); };
29713}
29714//# sourceMappingURL=combineLatest.js.map
29715
29716
29717/***/ }),
29718/* 279 */
29719/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29720
29721"use strict";
29722__webpack_require__.r(__webpack_exports__);
29723/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29724/* harmony export */ "concat": () => /* binding */ concat
29725/* harmony export */ });
29726/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(236);
29727/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
29728
29729function concat() {
29730 var observables = [];
29731 for (var _i = 0; _i < arguments.length; _i++) {
29732 observables[_i] = arguments[_i];
29733 }
29734 return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__.concat.apply(void 0, [source].concat(observables))); };
29735}
29736//# sourceMappingURL=concat.js.map
29737
29738
29739/***/ }),
29740/* 280 */
29741/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29742
29743"use strict";
29744__webpack_require__.r(__webpack_exports__);
29745/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29746/* harmony export */ "concatMap": () => /* binding */ concatMap
29747/* harmony export */ });
29748/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
29749/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
29750
29751function concatMap(project, resultSelector) {
29752 return (0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.mergeMap)(project, resultSelector, 1);
29753}
29754//# sourceMappingURL=concatMap.js.map
29755
29756
29757/***/ }),
29758/* 281 */
29759/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29760
29761"use strict";
29762__webpack_require__.r(__webpack_exports__);
29763/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29764/* harmony export */ "concatMapTo": () => /* binding */ concatMapTo
29765/* harmony export */ });
29766/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(280);
29767/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
29768
29769function concatMapTo(innerObservable, resultSelector) {
29770 return (0,_concatMap__WEBPACK_IMPORTED_MODULE_0__.concatMap)(function () { return innerObservable; }, resultSelector);
29771}
29772//# sourceMappingURL=concatMapTo.js.map
29773
29774
29775/***/ }),
29776/* 282 */
29777/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29778
29779"use strict";
29780__webpack_require__.r(__webpack_exports__);
29781/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29782/* harmony export */ "count": () => /* binding */ count
29783/* harmony export */ });
29784/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29785/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
29786/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29787
29788
29789function count(predicate) {
29790 return function (source) { return source.lift(new CountOperator(predicate, source)); };
29791}
29792var CountOperator = /*@__PURE__*/ (function () {
29793 function CountOperator(predicate, source) {
29794 this.predicate = predicate;
29795 this.source = source;
29796 }
29797 CountOperator.prototype.call = function (subscriber, source) {
29798 return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
29799 };
29800 return CountOperator;
29801}());
29802var CountSubscriber = /*@__PURE__*/ (function (_super) {
29803 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(CountSubscriber, _super);
29804 function CountSubscriber(destination, predicate, source) {
29805 var _this = _super.call(this, destination) || this;
29806 _this.predicate = predicate;
29807 _this.source = source;
29808 _this.count = 0;
29809 _this.index = 0;
29810 return _this;
29811 }
29812 CountSubscriber.prototype._next = function (value) {
29813 if (this.predicate) {
29814 this._tryPredicate(value);
29815 }
29816 else {
29817 this.count++;
29818 }
29819 };
29820 CountSubscriber.prototype._tryPredicate = function (value) {
29821 var result;
29822 try {
29823 result = this.predicate(value, this.index++, this.source);
29824 }
29825 catch (err) {
29826 this.destination.error(err);
29827 return;
29828 }
29829 if (result) {
29830 this.count++;
29831 }
29832 };
29833 CountSubscriber.prototype._complete = function () {
29834 this.destination.next(this.count);
29835 this.destination.complete();
29836 };
29837 return CountSubscriber;
29838}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
29839//# sourceMappingURL=count.js.map
29840
29841
29842/***/ }),
29843/* 283 */
29844/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29845
29846"use strict";
29847__webpack_require__.r(__webpack_exports__);
29848/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29849/* harmony export */ "debounce": () => /* binding */ debounce
29850/* harmony export */ });
29851/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29852/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
29853/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
29854/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29855
29856
29857
29858function debounce(durationSelector) {
29859 return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
29860}
29861var DebounceOperator = /*@__PURE__*/ (function () {
29862 function DebounceOperator(durationSelector) {
29863 this.durationSelector = durationSelector;
29864 }
29865 DebounceOperator.prototype.call = function (subscriber, source) {
29866 return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
29867 };
29868 return DebounceOperator;
29869}());
29870var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
29871 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(DebounceSubscriber, _super);
29872 function DebounceSubscriber(destination, durationSelector) {
29873 var _this = _super.call(this, destination) || this;
29874 _this.durationSelector = durationSelector;
29875 _this.hasValue = false;
29876 _this.durationSubscription = null;
29877 return _this;
29878 }
29879 DebounceSubscriber.prototype._next = function (value) {
29880 try {
29881 var result = this.durationSelector.call(this, value);
29882 if (result) {
29883 this._tryNext(value, result);
29884 }
29885 }
29886 catch (err) {
29887 this.destination.error(err);
29888 }
29889 };
29890 DebounceSubscriber.prototype._complete = function () {
29891 this.emitValue();
29892 this.destination.complete();
29893 };
29894 DebounceSubscriber.prototype._tryNext = function (value, duration) {
29895 var subscription = this.durationSubscription;
29896 this.value = value;
29897 this.hasValue = true;
29898 if (subscription) {
29899 subscription.unsubscribe();
29900 this.remove(subscription);
29901 }
29902 subscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(this, duration);
29903 if (subscription && !subscription.closed) {
29904 this.add(this.durationSubscription = subscription);
29905 }
29906 };
29907 DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29908 this.emitValue();
29909 };
29910 DebounceSubscriber.prototype.notifyComplete = function () {
29911 this.emitValue();
29912 };
29913 DebounceSubscriber.prototype.emitValue = function () {
29914 if (this.hasValue) {
29915 var value = this.value;
29916 var subscription = this.durationSubscription;
29917 if (subscription) {
29918 this.durationSubscription = null;
29919 subscription.unsubscribe();
29920 this.remove(subscription);
29921 }
29922 this.value = null;
29923 this.hasValue = false;
29924 _super.prototype._next.call(this, value);
29925 }
29926 };
29927 return DebounceSubscriber;
29928}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
29929//# sourceMappingURL=debounce.js.map
29930
29931
29932/***/ }),
29933/* 284 */
29934/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29935
29936"use strict";
29937__webpack_require__.r(__webpack_exports__);
29938/* harmony export */ __webpack_require__.d(__webpack_exports__, {
29939/* harmony export */ "debounceTime": () => /* binding */ debounceTime
29940/* harmony export */ });
29941/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
29942/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
29943/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
29944/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
29945
29946
29947
29948function debounceTime(dueTime, scheduler) {
29949 if (scheduler === void 0) {
29950 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__.async;
29951 }
29952 return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
29953}
29954var DebounceTimeOperator = /*@__PURE__*/ (function () {
29955 function DebounceTimeOperator(dueTime, scheduler) {
29956 this.dueTime = dueTime;
29957 this.scheduler = scheduler;
29958 }
29959 DebounceTimeOperator.prototype.call = function (subscriber, source) {
29960 return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
29961 };
29962 return DebounceTimeOperator;
29963}());
29964var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
29965 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(DebounceTimeSubscriber, _super);
29966 function DebounceTimeSubscriber(destination, dueTime, scheduler) {
29967 var _this = _super.call(this, destination) || this;
29968 _this.dueTime = dueTime;
29969 _this.scheduler = scheduler;
29970 _this.debouncedSubscription = null;
29971 _this.lastValue = null;
29972 _this.hasValue = false;
29973 return _this;
29974 }
29975 DebounceTimeSubscriber.prototype._next = function (value) {
29976 this.clearDebounce();
29977 this.lastValue = value;
29978 this.hasValue = true;
29979 this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
29980 };
29981 DebounceTimeSubscriber.prototype._complete = function () {
29982 this.debouncedNext();
29983 this.destination.complete();
29984 };
29985 DebounceTimeSubscriber.prototype.debouncedNext = function () {
29986 this.clearDebounce();
29987 if (this.hasValue) {
29988 var lastValue = this.lastValue;
29989 this.lastValue = null;
29990 this.hasValue = false;
29991 this.destination.next(lastValue);
29992 }
29993 };
29994 DebounceTimeSubscriber.prototype.clearDebounce = function () {
29995 var debouncedSubscription = this.debouncedSubscription;
29996 if (debouncedSubscription !== null) {
29997 this.remove(debouncedSubscription);
29998 debouncedSubscription.unsubscribe();
29999 this.debouncedSubscription = null;
30000 }
30001 };
30002 return DebounceTimeSubscriber;
30003}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
30004function dispatchNext(subscriber) {
30005 subscriber.debouncedNext();
30006}
30007//# sourceMappingURL=debounceTime.js.map
30008
30009
30010/***/ }),
30011/* 285 */
30012/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30013
30014"use strict";
30015__webpack_require__.r(__webpack_exports__);
30016/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30017/* harmony export */ "defaultIfEmpty": () => /* binding */ defaultIfEmpty
30018/* harmony export */ });
30019/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30020/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
30021/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30022
30023
30024function defaultIfEmpty(defaultValue) {
30025 if (defaultValue === void 0) {
30026 defaultValue = null;
30027 }
30028 return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
30029}
30030var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
30031 function DefaultIfEmptyOperator(defaultValue) {
30032 this.defaultValue = defaultValue;
30033 }
30034 DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
30035 return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
30036 };
30037 return DefaultIfEmptyOperator;
30038}());
30039var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
30040 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(DefaultIfEmptySubscriber, _super);
30041 function DefaultIfEmptySubscriber(destination, defaultValue) {
30042 var _this = _super.call(this, destination) || this;
30043 _this.defaultValue = defaultValue;
30044 _this.isEmpty = true;
30045 return _this;
30046 }
30047 DefaultIfEmptySubscriber.prototype._next = function (value) {
30048 this.isEmpty = false;
30049 this.destination.next(value);
30050 };
30051 DefaultIfEmptySubscriber.prototype._complete = function () {
30052 if (this.isEmpty) {
30053 this.destination.next(this.defaultValue);
30054 }
30055 this.destination.complete();
30056 };
30057 return DefaultIfEmptySubscriber;
30058}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
30059//# sourceMappingURL=defaultIfEmpty.js.map
30060
30061
30062/***/ }),
30063/* 286 */
30064/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30065
30066"use strict";
30067__webpack_require__.r(__webpack_exports__);
30068/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30069/* harmony export */ "delay": () => /* binding */ delay
30070/* harmony export */ });
30071/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30072/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
30073/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(287);
30074/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(168);
30075/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(192);
30076/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
30077
30078
30079
30080
30081
30082function delay(delay, scheduler) {
30083 if (scheduler === void 0) {
30084 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__.async;
30085 }
30086 var absoluteDelay = (0,_util_isDate__WEBPACK_IMPORTED_MODULE_2__.isDate)(delay);
30087 var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
30088 return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
30089}
30090var DelayOperator = /*@__PURE__*/ (function () {
30091 function DelayOperator(delay, scheduler) {
30092 this.delay = delay;
30093 this.scheduler = scheduler;
30094 }
30095 DelayOperator.prototype.call = function (subscriber, source) {
30096 return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
30097 };
30098 return DelayOperator;
30099}());
30100var DelaySubscriber = /*@__PURE__*/ (function (_super) {
30101 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(DelaySubscriber, _super);
30102 function DelaySubscriber(destination, delay, scheduler) {
30103 var _this = _super.call(this, destination) || this;
30104 _this.delay = delay;
30105 _this.scheduler = scheduler;
30106 _this.queue = [];
30107 _this.active = false;
30108 _this.errored = false;
30109 return _this;
30110 }
30111 DelaySubscriber.dispatch = function (state) {
30112 var source = state.source;
30113 var queue = source.queue;
30114 var scheduler = state.scheduler;
30115 var destination = state.destination;
30116 while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
30117 queue.shift().notification.observe(destination);
30118 }
30119 if (queue.length > 0) {
30120 var delay_1 = Math.max(0, queue[0].time - scheduler.now());
30121 this.schedule(state, delay_1);
30122 }
30123 else {
30124 this.unsubscribe();
30125 source.active = false;
30126 }
30127 };
30128 DelaySubscriber.prototype._schedule = function (scheduler) {
30129 this.active = true;
30130 var destination = this.destination;
30131 destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
30132 source: this, destination: this.destination, scheduler: scheduler
30133 }));
30134 };
30135 DelaySubscriber.prototype.scheduleNotification = function (notification) {
30136 if (this.errored === true) {
30137 return;
30138 }
30139 var scheduler = this.scheduler;
30140 var message = new DelayMessage(scheduler.now() + this.delay, notification);
30141 this.queue.push(message);
30142 if (this.active === false) {
30143 this._schedule(scheduler);
30144 }
30145 };
30146 DelaySubscriber.prototype._next = function (value) {
30147 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__.Notification.createNext(value));
30148 };
30149 DelaySubscriber.prototype._error = function (err) {
30150 this.errored = true;
30151 this.queue = [];
30152 this.destination.error(err);
30153 this.unsubscribe();
30154 };
30155 DelaySubscriber.prototype._complete = function () {
30156 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__.Notification.createComplete());
30157 this.unsubscribe();
30158 };
30159 return DelaySubscriber;
30160}(_Subscriber__WEBPACK_IMPORTED_MODULE_4__.Subscriber));
30161var DelayMessage = /*@__PURE__*/ (function () {
30162 function DelayMessage(time, notification) {
30163 this.time = time;
30164 this.notification = notification;
30165 }
30166 return DelayMessage;
30167}());
30168//# sourceMappingURL=delay.js.map
30169
30170
30171/***/ }),
30172/* 287 */
30173/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30174
30175"use strict";
30176__webpack_require__.r(__webpack_exports__);
30177/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30178/* harmony export */ "isDate": () => /* binding */ isDate
30179/* harmony export */ });
30180/** PURE_IMPORTS_START PURE_IMPORTS_END */
30181function isDate(value) {
30182 return value instanceof Date && !isNaN(+value);
30183}
30184//# sourceMappingURL=isDate.js.map
30185
30186
30187/***/ }),
30188/* 288 */
30189/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30190
30191"use strict";
30192__webpack_require__.r(__webpack_exports__);
30193/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30194/* harmony export */ "delayWhen": () => /* binding */ delayWhen
30195/* harmony export */ });
30196/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30197/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(168);
30198/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166);
30199/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
30200/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
30201/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30202
30203
30204
30205
30206
30207function delayWhen(delayDurationSelector, subscriptionDelay) {
30208 if (subscriptionDelay) {
30209 return function (source) {
30210 return new SubscriptionDelayObservable(source, subscriptionDelay)
30211 .lift(new DelayWhenOperator(delayDurationSelector));
30212 };
30213 }
30214 return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
30215}
30216var DelayWhenOperator = /*@__PURE__*/ (function () {
30217 function DelayWhenOperator(delayDurationSelector) {
30218 this.delayDurationSelector = delayDurationSelector;
30219 }
30220 DelayWhenOperator.prototype.call = function (subscriber, source) {
30221 return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
30222 };
30223 return DelayWhenOperator;
30224}());
30225var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
30226 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(DelayWhenSubscriber, _super);
30227 function DelayWhenSubscriber(destination, delayDurationSelector) {
30228 var _this = _super.call(this, destination) || this;
30229 _this.delayDurationSelector = delayDurationSelector;
30230 _this.completed = false;
30231 _this.delayNotifierSubscriptions = [];
30232 _this.index = 0;
30233 return _this;
30234 }
30235 DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30236 this.destination.next(outerValue);
30237 this.removeSubscription(innerSub);
30238 this.tryComplete();
30239 };
30240 DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
30241 this._error(error);
30242 };
30243 DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
30244 var value = this.removeSubscription(innerSub);
30245 if (value) {
30246 this.destination.next(value);
30247 }
30248 this.tryComplete();
30249 };
30250 DelayWhenSubscriber.prototype._next = function (value) {
30251 var index = this.index++;
30252 try {
30253 var delayNotifier = this.delayDurationSelector(value, index);
30254 if (delayNotifier) {
30255 this.tryDelay(delayNotifier, value);
30256 }
30257 }
30258 catch (err) {
30259 this.destination.error(err);
30260 }
30261 };
30262 DelayWhenSubscriber.prototype._complete = function () {
30263 this.completed = true;
30264 this.tryComplete();
30265 this.unsubscribe();
30266 };
30267 DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
30268 subscription.unsubscribe();
30269 var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
30270 if (subscriptionIdx !== -1) {
30271 this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
30272 }
30273 return subscription.outerValue;
30274 };
30275 DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
30276 var notifierSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(this, delayNotifier, value);
30277 if (notifierSubscription && !notifierSubscription.closed) {
30278 var destination = this.destination;
30279 destination.add(notifierSubscription);
30280 this.delayNotifierSubscriptions.push(notifierSubscription);
30281 }
30282 };
30283 DelayWhenSubscriber.prototype.tryComplete = function () {
30284 if (this.completed && this.delayNotifierSubscriptions.length === 0) {
30285 this.destination.complete();
30286 }
30287 };
30288 return DelayWhenSubscriber;
30289}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
30290var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
30291 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SubscriptionDelayObservable, _super);
30292 function SubscriptionDelayObservable(source, subscriptionDelay) {
30293 var _this = _super.call(this) || this;
30294 _this.source = source;
30295 _this.subscriptionDelay = subscriptionDelay;
30296 return _this;
30297 }
30298 SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
30299 this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
30300 };
30301 return SubscriptionDelayObservable;
30302}(_Observable__WEBPACK_IMPORTED_MODULE_3__.Observable));
30303var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
30304 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SubscriptionDelaySubscriber, _super);
30305 function SubscriptionDelaySubscriber(parent, source) {
30306 var _this = _super.call(this) || this;
30307 _this.parent = parent;
30308 _this.source = source;
30309 _this.sourceSubscribed = false;
30310 return _this;
30311 }
30312 SubscriptionDelaySubscriber.prototype._next = function (unused) {
30313 this.subscribeToSource();
30314 };
30315 SubscriptionDelaySubscriber.prototype._error = function (err) {
30316 this.unsubscribe();
30317 this.parent.error(err);
30318 };
30319 SubscriptionDelaySubscriber.prototype._complete = function () {
30320 this.unsubscribe();
30321 this.subscribeToSource();
30322 };
30323 SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
30324 if (!this.sourceSubscribed) {
30325 this.sourceSubscribed = true;
30326 this.unsubscribe();
30327 this.source.subscribe(this.parent);
30328 }
30329 };
30330 return SubscriptionDelaySubscriber;
30331}(_Subscriber__WEBPACK_IMPORTED_MODULE_4__.Subscriber));
30332//# sourceMappingURL=delayWhen.js.map
30333
30334
30335/***/ }),
30336/* 289 */
30337/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30338
30339"use strict";
30340__webpack_require__.r(__webpack_exports__);
30341/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30342/* harmony export */ "dematerialize": () => /* binding */ dematerialize
30343/* harmony export */ });
30344/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30345/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
30346/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30347
30348
30349function dematerialize() {
30350 return function dematerializeOperatorFunction(source) {
30351 return source.lift(new DeMaterializeOperator());
30352 };
30353}
30354var DeMaterializeOperator = /*@__PURE__*/ (function () {
30355 function DeMaterializeOperator() {
30356 }
30357 DeMaterializeOperator.prototype.call = function (subscriber, source) {
30358 return source.subscribe(new DeMaterializeSubscriber(subscriber));
30359 };
30360 return DeMaterializeOperator;
30361}());
30362var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
30363 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(DeMaterializeSubscriber, _super);
30364 function DeMaterializeSubscriber(destination) {
30365 return _super.call(this, destination) || this;
30366 }
30367 DeMaterializeSubscriber.prototype._next = function (value) {
30368 value.observe(this.destination);
30369 };
30370 return DeMaterializeSubscriber;
30371}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
30372//# sourceMappingURL=dematerialize.js.map
30373
30374
30375/***/ }),
30376/* 290 */
30377/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30378
30379"use strict";
30380__webpack_require__.r(__webpack_exports__);
30381/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30382/* harmony export */ "distinct": () => /* binding */ distinct,
30383/* harmony export */ "DistinctSubscriber": () => /* binding */ DistinctSubscriber
30384/* harmony export */ });
30385/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30386/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
30387/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
30388/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30389
30390
30391
30392function distinct(keySelector, flushes) {
30393 return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
30394}
30395var DistinctOperator = /*@__PURE__*/ (function () {
30396 function DistinctOperator(keySelector, flushes) {
30397 this.keySelector = keySelector;
30398 this.flushes = flushes;
30399 }
30400 DistinctOperator.prototype.call = function (subscriber, source) {
30401 return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
30402 };
30403 return DistinctOperator;
30404}());
30405var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
30406 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(DistinctSubscriber, _super);
30407 function DistinctSubscriber(destination, keySelector, flushes) {
30408 var _this = _super.call(this, destination) || this;
30409 _this.keySelector = keySelector;
30410 _this.values = new Set();
30411 if (flushes) {
30412 _this.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(_this, flushes));
30413 }
30414 return _this;
30415 }
30416 DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30417 this.values.clear();
30418 };
30419 DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
30420 this._error(error);
30421 };
30422 DistinctSubscriber.prototype._next = function (value) {
30423 if (this.keySelector) {
30424 this._useKeySelector(value);
30425 }
30426 else {
30427 this._finalizeNext(value, value);
30428 }
30429 };
30430 DistinctSubscriber.prototype._useKeySelector = function (value) {
30431 var key;
30432 var destination = this.destination;
30433 try {
30434 key = this.keySelector(value);
30435 }
30436 catch (err) {
30437 destination.error(err);
30438 return;
30439 }
30440 this._finalizeNext(key, value);
30441 };
30442 DistinctSubscriber.prototype._finalizeNext = function (key, value) {
30443 var values = this.values;
30444 if (!values.has(key)) {
30445 values.add(key);
30446 this.destination.next(value);
30447 }
30448 };
30449 return DistinctSubscriber;
30450}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
30451
30452//# sourceMappingURL=distinct.js.map
30453
30454
30455/***/ }),
30456/* 291 */
30457/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30458
30459"use strict";
30460__webpack_require__.r(__webpack_exports__);
30461/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30462/* harmony export */ "distinctUntilChanged": () => /* binding */ distinctUntilChanged
30463/* harmony export */ });
30464/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30465/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
30466/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30467
30468
30469function distinctUntilChanged(compare, keySelector) {
30470 return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
30471}
30472var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
30473 function DistinctUntilChangedOperator(compare, keySelector) {
30474 this.compare = compare;
30475 this.keySelector = keySelector;
30476 }
30477 DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
30478 return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
30479 };
30480 return DistinctUntilChangedOperator;
30481}());
30482var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
30483 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(DistinctUntilChangedSubscriber, _super);
30484 function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
30485 var _this = _super.call(this, destination) || this;
30486 _this.keySelector = keySelector;
30487 _this.hasKey = false;
30488 if (typeof compare === 'function') {
30489 _this.compare = compare;
30490 }
30491 return _this;
30492 }
30493 DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
30494 return x === y;
30495 };
30496 DistinctUntilChangedSubscriber.prototype._next = function (value) {
30497 var key;
30498 try {
30499 var keySelector = this.keySelector;
30500 key = keySelector ? keySelector(value) : value;
30501 }
30502 catch (err) {
30503 return this.destination.error(err);
30504 }
30505 var result = false;
30506 if (this.hasKey) {
30507 try {
30508 var compare = this.compare;
30509 result = compare(this.key, key);
30510 }
30511 catch (err) {
30512 return this.destination.error(err);
30513 }
30514 }
30515 else {
30516 this.hasKey = true;
30517 }
30518 if (!result) {
30519 this.key = key;
30520 this.destination.next(value);
30521 }
30522 };
30523 return DistinctUntilChangedSubscriber;
30524}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
30525//# sourceMappingURL=distinctUntilChanged.js.map
30526
30527
30528/***/ }),
30529/* 292 */
30530/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30531
30532"use strict";
30533__webpack_require__.r(__webpack_exports__);
30534/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30535/* harmony export */ "distinctUntilKeyChanged": () => /* binding */ distinctUntilKeyChanged
30536/* harmony export */ });
30537/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(291);
30538/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
30539
30540function distinctUntilKeyChanged(key, compare) {
30541 return (0,_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__.distinctUntilChanged)(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
30542}
30543//# sourceMappingURL=distinctUntilKeyChanged.js.map
30544
30545
30546/***/ }),
30547/* 293 */
30548/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30549
30550"use strict";
30551__webpack_require__.r(__webpack_exports__);
30552/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30553/* harmony export */ "elementAt": () => /* binding */ elementAt
30554/* harmony export */ });
30555/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(219);
30556/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(260);
30557/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(295);
30558/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(285);
30559/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(294);
30560/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
30561
30562
30563
30564
30565
30566function elementAt(index, defaultValue) {
30567 if (index < 0) {
30568 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__.ArgumentOutOfRangeError();
30569 }
30570 var hasDefaultValue = arguments.length >= 2;
30571 return function (source) {
30572 return source.pipe((0,_filter__WEBPACK_IMPORTED_MODULE_1__.filter)(function (v, i) { return i === index; }), (0,_take__WEBPACK_IMPORTED_MODULE_2__.take)(1), hasDefaultValue
30573 ? (0,_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__.defaultIfEmpty)(defaultValue)
30574 : (0,_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__.throwIfEmpty)(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__.ArgumentOutOfRangeError(); }));
30575 };
30576}
30577//# sourceMappingURL=elementAt.js.map
30578
30579
30580/***/ }),
30581/* 294 */
30582/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30583
30584"use strict";
30585__webpack_require__.r(__webpack_exports__);
30586/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30587/* harmony export */ "take": () => /* binding */ take
30588/* harmony export */ });
30589/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30590/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
30591/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(219);
30592/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
30593/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
30594
30595
30596
30597
30598function take(count) {
30599 return function (source) {
30600 if (count === 0) {
30601 return (0,_observable_empty__WEBPACK_IMPORTED_MODULE_1__.empty)();
30602 }
30603 else {
30604 return source.lift(new TakeOperator(count));
30605 }
30606 };
30607}
30608var TakeOperator = /*@__PURE__*/ (function () {
30609 function TakeOperator(total) {
30610 this.total = total;
30611 if (this.total < 0) {
30612 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__.ArgumentOutOfRangeError;
30613 }
30614 }
30615 TakeOperator.prototype.call = function (subscriber, source) {
30616 return source.subscribe(new TakeSubscriber(subscriber, this.total));
30617 };
30618 return TakeOperator;
30619}());
30620var TakeSubscriber = /*@__PURE__*/ (function (_super) {
30621 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(TakeSubscriber, _super);
30622 function TakeSubscriber(destination, total) {
30623 var _this = _super.call(this, destination) || this;
30624 _this.total = total;
30625 _this.count = 0;
30626 return _this;
30627 }
30628 TakeSubscriber.prototype._next = function (value) {
30629 var total = this.total;
30630 var count = ++this.count;
30631 if (count <= total) {
30632 this.destination.next(value);
30633 if (count === total) {
30634 this.destination.complete();
30635 this.unsubscribe();
30636 }
30637 }
30638 };
30639 return TakeSubscriber;
30640}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__.Subscriber));
30641//# sourceMappingURL=take.js.map
30642
30643
30644/***/ }),
30645/* 295 */
30646/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30647
30648"use strict";
30649__webpack_require__.r(__webpack_exports__);
30650/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30651/* harmony export */ "throwIfEmpty": () => /* binding */ throwIfEmpty
30652/* harmony export */ });
30653/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30654/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
30655/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
30656/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
30657
30658
30659
30660function throwIfEmpty(errorFactory) {
30661 if (errorFactory === void 0) {
30662 errorFactory = defaultErrorFactory;
30663 }
30664 return function (source) {
30665 return source.lift(new ThrowIfEmptyOperator(errorFactory));
30666 };
30667}
30668var ThrowIfEmptyOperator = /*@__PURE__*/ (function () {
30669 function ThrowIfEmptyOperator(errorFactory) {
30670 this.errorFactory = errorFactory;
30671 }
30672 ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
30673 return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
30674 };
30675 return ThrowIfEmptyOperator;
30676}());
30677var ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
30678 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ThrowIfEmptySubscriber, _super);
30679 function ThrowIfEmptySubscriber(destination, errorFactory) {
30680 var _this = _super.call(this, destination) || this;
30681 _this.errorFactory = errorFactory;
30682 _this.hasValue = false;
30683 return _this;
30684 }
30685 ThrowIfEmptySubscriber.prototype._next = function (value) {
30686 this.hasValue = true;
30687 this.destination.next(value);
30688 };
30689 ThrowIfEmptySubscriber.prototype._complete = function () {
30690 if (!this.hasValue) {
30691 var err = void 0;
30692 try {
30693 err = this.errorFactory();
30694 }
30695 catch (e) {
30696 err = e;
30697 }
30698 this.destination.error(err);
30699 }
30700 else {
30701 return this.destination.complete();
30702 }
30703 };
30704 return ThrowIfEmptySubscriber;
30705}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
30706function defaultErrorFactory() {
30707 return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__.EmptyError();
30708}
30709//# sourceMappingURL=throwIfEmpty.js.map
30710
30711
30712/***/ }),
30713/* 296 */
30714/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30715
30716"use strict";
30717__webpack_require__.r(__webpack_exports__);
30718/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30719/* harmony export */ "endWith": () => /* binding */ endWith
30720/* harmony export */ });
30721/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(236);
30722/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(193);
30723/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */
30724
30725
30726function endWith() {
30727 var array = [];
30728 for (var _i = 0; _i < arguments.length; _i++) {
30729 array[_i] = arguments[_i];
30730 }
30731 return function (source) { return (0,_observable_concat__WEBPACK_IMPORTED_MODULE_0__.concat)(source, _observable_of__WEBPACK_IMPORTED_MODULE_1__.of.apply(void 0, array)); };
30732}
30733//# sourceMappingURL=endWith.js.map
30734
30735
30736/***/ }),
30737/* 297 */
30738/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30739
30740"use strict";
30741__webpack_require__.r(__webpack_exports__);
30742/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30743/* harmony export */ "every": () => /* binding */ every
30744/* harmony export */ });
30745/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30746/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
30747/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30748
30749
30750function every(predicate, thisArg) {
30751 return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
30752}
30753var EveryOperator = /*@__PURE__*/ (function () {
30754 function EveryOperator(predicate, thisArg, source) {
30755 this.predicate = predicate;
30756 this.thisArg = thisArg;
30757 this.source = source;
30758 }
30759 EveryOperator.prototype.call = function (observer, source) {
30760 return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
30761 };
30762 return EveryOperator;
30763}());
30764var EverySubscriber = /*@__PURE__*/ (function (_super) {
30765 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(EverySubscriber, _super);
30766 function EverySubscriber(destination, predicate, thisArg, source) {
30767 var _this = _super.call(this, destination) || this;
30768 _this.predicate = predicate;
30769 _this.thisArg = thisArg;
30770 _this.source = source;
30771 _this.index = 0;
30772 _this.thisArg = thisArg || _this;
30773 return _this;
30774 }
30775 EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
30776 this.destination.next(everyValueMatch);
30777 this.destination.complete();
30778 };
30779 EverySubscriber.prototype._next = function (value) {
30780 var result = false;
30781 try {
30782 result = this.predicate.call(this.thisArg, value, this.index++, this.source);
30783 }
30784 catch (err) {
30785 this.destination.error(err);
30786 return;
30787 }
30788 if (!result) {
30789 this.notifyComplete(false);
30790 }
30791 };
30792 EverySubscriber.prototype._complete = function () {
30793 this.notifyComplete(true);
30794 };
30795 return EverySubscriber;
30796}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
30797//# sourceMappingURL=every.js.map
30798
30799
30800/***/ }),
30801/* 298 */
30802/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30803
30804"use strict";
30805__webpack_require__.r(__webpack_exports__);
30806/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30807/* harmony export */ "exhaust": () => /* binding */ exhaust
30808/* harmony export */ });
30809/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30810/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
30811/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
30812/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30813
30814
30815
30816function exhaust() {
30817 return function (source) { return source.lift(new SwitchFirstOperator()); };
30818}
30819var SwitchFirstOperator = /*@__PURE__*/ (function () {
30820 function SwitchFirstOperator() {
30821 }
30822 SwitchFirstOperator.prototype.call = function (subscriber, source) {
30823 return source.subscribe(new SwitchFirstSubscriber(subscriber));
30824 };
30825 return SwitchFirstOperator;
30826}());
30827var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
30828 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SwitchFirstSubscriber, _super);
30829 function SwitchFirstSubscriber(destination) {
30830 var _this = _super.call(this, destination) || this;
30831 _this.hasCompleted = false;
30832 _this.hasSubscription = false;
30833 return _this;
30834 }
30835 SwitchFirstSubscriber.prototype._next = function (value) {
30836 if (!this.hasSubscription) {
30837 this.hasSubscription = true;
30838 this.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(this, value));
30839 }
30840 };
30841 SwitchFirstSubscriber.prototype._complete = function () {
30842 this.hasCompleted = true;
30843 if (!this.hasSubscription) {
30844 this.destination.complete();
30845 }
30846 };
30847 SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
30848 this.remove(innerSub);
30849 this.hasSubscription = false;
30850 if (this.hasCompleted) {
30851 this.destination.complete();
30852 }
30853 };
30854 return SwitchFirstSubscriber;
30855}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
30856//# sourceMappingURL=exhaust.js.map
30857
30858
30859/***/ }),
30860/* 299 */
30861/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30862
30863"use strict";
30864__webpack_require__.r(__webpack_exports__);
30865/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30866/* harmony export */ "exhaustMap": () => /* binding */ exhaustMap
30867/* harmony export */ });
30868/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30869/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(235);
30870/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
30871/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(226);
30872/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
30873/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
30874/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
30875
30876
30877
30878
30879
30880
30881function exhaustMap(project, resultSelector) {
30882 if (resultSelector) {
30883 return function (source) { return source.pipe(exhaustMap(function (a, i) { return (0,_observable_from__WEBPACK_IMPORTED_MODULE_1__.from)(project(a, i)).pipe((0,_map__WEBPACK_IMPORTED_MODULE_2__.map)(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
30884 }
30885 return function (source) {
30886 return source.lift(new ExhaustMapOperator(project));
30887 };
30888}
30889var ExhaustMapOperator = /*@__PURE__*/ (function () {
30890 function ExhaustMapOperator(project) {
30891 this.project = project;
30892 }
30893 ExhaustMapOperator.prototype.call = function (subscriber, source) {
30894 return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
30895 };
30896 return ExhaustMapOperator;
30897}());
30898var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
30899 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ExhaustMapSubscriber, _super);
30900 function ExhaustMapSubscriber(destination, project) {
30901 var _this = _super.call(this, destination) || this;
30902 _this.project = project;
30903 _this.hasSubscription = false;
30904 _this.hasCompleted = false;
30905 _this.index = 0;
30906 return _this;
30907 }
30908 ExhaustMapSubscriber.prototype._next = function (value) {
30909 if (!this.hasSubscription) {
30910 this.tryNext(value);
30911 }
30912 };
30913 ExhaustMapSubscriber.prototype.tryNext = function (value) {
30914 var result;
30915 var index = this.index++;
30916 try {
30917 result = this.project(value, index);
30918 }
30919 catch (err) {
30920 this.destination.error(err);
30921 return;
30922 }
30923 this.hasSubscription = true;
30924 this._innerSub(result, value, index);
30925 };
30926 ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {
30927 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__.InnerSubscriber(this, value, index);
30928 var destination = this.destination;
30929 destination.add(innerSubscriber);
30930 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__.subscribeToResult)(this, result, undefined, undefined, innerSubscriber);
30931 if (innerSubscription !== innerSubscriber) {
30932 destination.add(innerSubscription);
30933 }
30934 };
30935 ExhaustMapSubscriber.prototype._complete = function () {
30936 this.hasCompleted = true;
30937 if (!this.hasSubscription) {
30938 this.destination.complete();
30939 }
30940 this.unsubscribe();
30941 };
30942 ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30943 this.destination.next(innerValue);
30944 };
30945 ExhaustMapSubscriber.prototype.notifyError = function (err) {
30946 this.destination.error(err);
30947 };
30948 ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
30949 var destination = this.destination;
30950 destination.remove(innerSub);
30951 this.hasSubscription = false;
30952 if (this.hasCompleted) {
30953 this.destination.complete();
30954 }
30955 };
30956 return ExhaustMapSubscriber;
30957}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__.OuterSubscriber));
30958//# sourceMappingURL=exhaustMap.js.map
30959
30960
30961/***/ }),
30962/* 300 */
30963/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30964
30965"use strict";
30966__webpack_require__.r(__webpack_exports__);
30967/* harmony export */ __webpack_require__.d(__webpack_exports__, {
30968/* harmony export */ "expand": () => /* binding */ expand,
30969/* harmony export */ "ExpandOperator": () => /* binding */ ExpandOperator,
30970/* harmony export */ "ExpandSubscriber": () => /* binding */ ExpandSubscriber
30971/* harmony export */ });
30972/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
30973/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
30974/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
30975/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30976
30977
30978
30979function expand(project, concurrent, scheduler) {
30980 if (concurrent === void 0) {
30981 concurrent = Number.POSITIVE_INFINITY;
30982 }
30983 if (scheduler === void 0) {
30984 scheduler = undefined;
30985 }
30986 concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
30987 return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
30988}
30989var ExpandOperator = /*@__PURE__*/ (function () {
30990 function ExpandOperator(project, concurrent, scheduler) {
30991 this.project = project;
30992 this.concurrent = concurrent;
30993 this.scheduler = scheduler;
30994 }
30995 ExpandOperator.prototype.call = function (subscriber, source) {
30996 return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
30997 };
30998 return ExpandOperator;
30999}());
31000
31001var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
31002 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ExpandSubscriber, _super);
31003 function ExpandSubscriber(destination, project, concurrent, scheduler) {
31004 var _this = _super.call(this, destination) || this;
31005 _this.project = project;
31006 _this.concurrent = concurrent;
31007 _this.scheduler = scheduler;
31008 _this.index = 0;
31009 _this.active = 0;
31010 _this.hasCompleted = false;
31011 if (concurrent < Number.POSITIVE_INFINITY) {
31012 _this.buffer = [];
31013 }
31014 return _this;
31015 }
31016 ExpandSubscriber.dispatch = function (arg) {
31017 var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
31018 subscriber.subscribeToProjection(result, value, index);
31019 };
31020 ExpandSubscriber.prototype._next = function (value) {
31021 var destination = this.destination;
31022 if (destination.closed) {
31023 this._complete();
31024 return;
31025 }
31026 var index = this.index++;
31027 if (this.active < this.concurrent) {
31028 destination.next(value);
31029 try {
31030 var project = this.project;
31031 var result = project(value, index);
31032 if (!this.scheduler) {
31033 this.subscribeToProjection(result, value, index);
31034 }
31035 else {
31036 var state = { subscriber: this, result: result, value: value, index: index };
31037 var destination_1 = this.destination;
31038 destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
31039 }
31040 }
31041 catch (e) {
31042 destination.error(e);
31043 }
31044 }
31045 else {
31046 this.buffer.push(value);
31047 }
31048 };
31049 ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
31050 this.active++;
31051 var destination = this.destination;
31052 destination.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(this, result, value, index));
31053 };
31054 ExpandSubscriber.prototype._complete = function () {
31055 this.hasCompleted = true;
31056 if (this.hasCompleted && this.active === 0) {
31057 this.destination.complete();
31058 }
31059 this.unsubscribe();
31060 };
31061 ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31062 this._next(innerValue);
31063 };
31064 ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
31065 var buffer = this.buffer;
31066 var destination = this.destination;
31067 destination.remove(innerSub);
31068 this.active--;
31069 if (buffer && buffer.length > 0) {
31070 this._next(buffer.shift());
31071 }
31072 if (this.hasCompleted && this.active === 0) {
31073 this.destination.complete();
31074 }
31075 };
31076 return ExpandSubscriber;
31077}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
31078
31079//# sourceMappingURL=expand.js.map
31080
31081
31082/***/ }),
31083/* 301 */
31084/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31085
31086"use strict";
31087__webpack_require__.r(__webpack_exports__);
31088/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31089/* harmony export */ "finalize": () => /* binding */ finalize
31090/* harmony export */ });
31091/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31092/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
31093/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(174);
31094/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
31095
31096
31097
31098function finalize(callback) {
31099 return function (source) { return source.lift(new FinallyOperator(callback)); };
31100}
31101var FinallyOperator = /*@__PURE__*/ (function () {
31102 function FinallyOperator(callback) {
31103 this.callback = callback;
31104 }
31105 FinallyOperator.prototype.call = function (subscriber, source) {
31106 return source.subscribe(new FinallySubscriber(subscriber, this.callback));
31107 };
31108 return FinallyOperator;
31109}());
31110var FinallySubscriber = /*@__PURE__*/ (function (_super) {
31111 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(FinallySubscriber, _super);
31112 function FinallySubscriber(destination, callback) {
31113 var _this = _super.call(this, destination) || this;
31114 _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_1__.Subscription(callback));
31115 return _this;
31116 }
31117 return FinallySubscriber;
31118}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
31119//# sourceMappingURL=finalize.js.map
31120
31121
31122/***/ }),
31123/* 302 */
31124/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31125
31126"use strict";
31127__webpack_require__.r(__webpack_exports__);
31128/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31129/* harmony export */ "find": () => /* binding */ find,
31130/* harmony export */ "FindValueOperator": () => /* binding */ FindValueOperator,
31131/* harmony export */ "FindValueSubscriber": () => /* binding */ FindValueSubscriber
31132/* harmony export */ });
31133/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31134/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
31135/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31136
31137
31138function find(predicate, thisArg) {
31139 if (typeof predicate !== 'function') {
31140 throw new TypeError('predicate is not a function');
31141 }
31142 return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
31143}
31144var FindValueOperator = /*@__PURE__*/ (function () {
31145 function FindValueOperator(predicate, source, yieldIndex, thisArg) {
31146 this.predicate = predicate;
31147 this.source = source;
31148 this.yieldIndex = yieldIndex;
31149 this.thisArg = thisArg;
31150 }
31151 FindValueOperator.prototype.call = function (observer, source) {
31152 return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
31153 };
31154 return FindValueOperator;
31155}());
31156
31157var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
31158 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(FindValueSubscriber, _super);
31159 function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
31160 var _this = _super.call(this, destination) || this;
31161 _this.predicate = predicate;
31162 _this.source = source;
31163 _this.yieldIndex = yieldIndex;
31164 _this.thisArg = thisArg;
31165 _this.index = 0;
31166 return _this;
31167 }
31168 FindValueSubscriber.prototype.notifyComplete = function (value) {
31169 var destination = this.destination;
31170 destination.next(value);
31171 destination.complete();
31172 this.unsubscribe();
31173 };
31174 FindValueSubscriber.prototype._next = function (value) {
31175 var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
31176 var index = this.index++;
31177 try {
31178 var result = predicate.call(thisArg || this, value, index, this.source);
31179 if (result) {
31180 this.notifyComplete(this.yieldIndex ? index : value);
31181 }
31182 }
31183 catch (err) {
31184 this.destination.error(err);
31185 }
31186 };
31187 FindValueSubscriber.prototype._complete = function () {
31188 this.notifyComplete(this.yieldIndex ? -1 : undefined);
31189 };
31190 return FindValueSubscriber;
31191}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
31192
31193//# sourceMappingURL=find.js.map
31194
31195
31196/***/ }),
31197/* 303 */
31198/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31199
31200"use strict";
31201__webpack_require__.r(__webpack_exports__);
31202/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31203/* harmony export */ "findIndex": () => /* binding */ findIndex
31204/* harmony export */ });
31205/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(302);
31206/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
31207
31208function findIndex(predicate, thisArg) {
31209 return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__.FindValueOperator(predicate, source, true, thisArg)); };
31210}
31211//# sourceMappingURL=findIndex.js.map
31212
31213
31214/***/ }),
31215/* 304 */
31216/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31217
31218"use strict";
31219__webpack_require__.r(__webpack_exports__);
31220/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31221/* harmony export */ "first": () => /* binding */ first
31222/* harmony export */ });
31223/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(220);
31224/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(260);
31225/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(294);
31226/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(285);
31227/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(295);
31228/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(182);
31229/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
31230
31231
31232
31233
31234
31235
31236function first(predicate, defaultValue) {
31237 var hasDefaultValue = arguments.length >= 2;
31238 return function (source) { return source.pipe(predicate ? (0,_filter__WEBPACK_IMPORTED_MODULE_0__.filter)(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, (0,_take__WEBPACK_IMPORTED_MODULE_2__.take)(1), hasDefaultValue ? (0,_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__.defaultIfEmpty)(defaultValue) : (0,_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__.throwIfEmpty)(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__.EmptyError(); })); };
31239}
31240//# sourceMappingURL=first.js.map
31241
31242
31243/***/ }),
31244/* 305 */
31245/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31246
31247"use strict";
31248__webpack_require__.r(__webpack_exports__);
31249/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31250/* harmony export */ "ignoreElements": () => /* binding */ ignoreElements
31251/* harmony export */ });
31252/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31253/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
31254/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31255
31256
31257function ignoreElements() {
31258 return function ignoreElementsOperatorFunction(source) {
31259 return source.lift(new IgnoreElementsOperator());
31260 };
31261}
31262var IgnoreElementsOperator = /*@__PURE__*/ (function () {
31263 function IgnoreElementsOperator() {
31264 }
31265 IgnoreElementsOperator.prototype.call = function (subscriber, source) {
31266 return source.subscribe(new IgnoreElementsSubscriber(subscriber));
31267 };
31268 return IgnoreElementsOperator;
31269}());
31270var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
31271 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(IgnoreElementsSubscriber, _super);
31272 function IgnoreElementsSubscriber() {
31273 return _super !== null && _super.apply(this, arguments) || this;
31274 }
31275 IgnoreElementsSubscriber.prototype._next = function (unused) {
31276 };
31277 return IgnoreElementsSubscriber;
31278}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
31279//# sourceMappingURL=ignoreElements.js.map
31280
31281
31282/***/ }),
31283/* 306 */
31284/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31285
31286"use strict";
31287__webpack_require__.r(__webpack_exports__);
31288/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31289/* harmony export */ "isEmpty": () => /* binding */ isEmpty
31290/* harmony export */ });
31291/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31292/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
31293/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31294
31295
31296function isEmpty() {
31297 return function (source) { return source.lift(new IsEmptyOperator()); };
31298}
31299var IsEmptyOperator = /*@__PURE__*/ (function () {
31300 function IsEmptyOperator() {
31301 }
31302 IsEmptyOperator.prototype.call = function (observer, source) {
31303 return source.subscribe(new IsEmptySubscriber(observer));
31304 };
31305 return IsEmptyOperator;
31306}());
31307var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
31308 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(IsEmptySubscriber, _super);
31309 function IsEmptySubscriber(destination) {
31310 return _super.call(this, destination) || this;
31311 }
31312 IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
31313 var destination = this.destination;
31314 destination.next(isEmpty);
31315 destination.complete();
31316 };
31317 IsEmptySubscriber.prototype._next = function (value) {
31318 this.notifyComplete(false);
31319 };
31320 IsEmptySubscriber.prototype._complete = function () {
31321 this.notifyComplete(true);
31322 };
31323 return IsEmptySubscriber;
31324}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
31325//# sourceMappingURL=isEmpty.js.map
31326
31327
31328/***/ }),
31329/* 307 */
31330/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31331
31332"use strict";
31333__webpack_require__.r(__webpack_exports__);
31334/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31335/* harmony export */ "last": () => /* binding */ last
31336/* harmony export */ });
31337/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(220);
31338/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(260);
31339/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(308);
31340/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(295);
31341/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(285);
31342/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(182);
31343/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
31344
31345
31346
31347
31348
31349
31350function last(predicate, defaultValue) {
31351 var hasDefaultValue = arguments.length >= 2;
31352 return function (source) { return source.pipe(predicate ? (0,_filter__WEBPACK_IMPORTED_MODULE_0__.filter)(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, (0,_takeLast__WEBPACK_IMPORTED_MODULE_2__.takeLast)(1), hasDefaultValue ? (0,_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__.defaultIfEmpty)(defaultValue) : (0,_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__.throwIfEmpty)(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__.EmptyError(); })); };
31353}
31354//# sourceMappingURL=last.js.map
31355
31356
31357/***/ }),
31358/* 308 */
31359/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31360
31361"use strict";
31362__webpack_require__.r(__webpack_exports__);
31363/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31364/* harmony export */ "takeLast": () => /* binding */ takeLast
31365/* harmony export */ });
31366/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31367/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
31368/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(219);
31369/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
31370/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
31371
31372
31373
31374
31375function takeLast(count) {
31376 return function takeLastOperatorFunction(source) {
31377 if (count === 0) {
31378 return (0,_observable_empty__WEBPACK_IMPORTED_MODULE_1__.empty)();
31379 }
31380 else {
31381 return source.lift(new TakeLastOperator(count));
31382 }
31383 };
31384}
31385var TakeLastOperator = /*@__PURE__*/ (function () {
31386 function TakeLastOperator(total) {
31387 this.total = total;
31388 if (this.total < 0) {
31389 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__.ArgumentOutOfRangeError;
31390 }
31391 }
31392 TakeLastOperator.prototype.call = function (subscriber, source) {
31393 return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
31394 };
31395 return TakeLastOperator;
31396}());
31397var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
31398 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(TakeLastSubscriber, _super);
31399 function TakeLastSubscriber(destination, total) {
31400 var _this = _super.call(this, destination) || this;
31401 _this.total = total;
31402 _this.ring = new Array();
31403 _this.count = 0;
31404 return _this;
31405 }
31406 TakeLastSubscriber.prototype._next = function (value) {
31407 var ring = this.ring;
31408 var total = this.total;
31409 var count = this.count++;
31410 if (ring.length < total) {
31411 ring.push(value);
31412 }
31413 else {
31414 var index = count % total;
31415 ring[index] = value;
31416 }
31417 };
31418 TakeLastSubscriber.prototype._complete = function () {
31419 var destination = this.destination;
31420 var count = this.count;
31421 if (count > 0) {
31422 var total = this.count >= this.total ? this.total : this.count;
31423 var ring = this.ring;
31424 for (var i = 0; i < total; i++) {
31425 var idx = (count++) % total;
31426 destination.next(ring[idx]);
31427 }
31428 }
31429 destination.complete();
31430 };
31431 return TakeLastSubscriber;
31432}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__.Subscriber));
31433//# sourceMappingURL=takeLast.js.map
31434
31435
31436/***/ }),
31437/* 309 */
31438/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31439
31440"use strict";
31441__webpack_require__.r(__webpack_exports__);
31442/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31443/* harmony export */ "mapTo": () => /* binding */ mapTo
31444/* harmony export */ });
31445/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31446/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
31447/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31448
31449
31450function mapTo(value) {
31451 return function (source) { return source.lift(new MapToOperator(value)); };
31452}
31453var MapToOperator = /*@__PURE__*/ (function () {
31454 function MapToOperator(value) {
31455 this.value = value;
31456 }
31457 MapToOperator.prototype.call = function (subscriber, source) {
31458 return source.subscribe(new MapToSubscriber(subscriber, this.value));
31459 };
31460 return MapToOperator;
31461}());
31462var MapToSubscriber = /*@__PURE__*/ (function (_super) {
31463 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(MapToSubscriber, _super);
31464 function MapToSubscriber(destination, value) {
31465 var _this = _super.call(this, destination) || this;
31466 _this.value = value;
31467 return _this;
31468 }
31469 MapToSubscriber.prototype._next = function (x) {
31470 this.destination.next(this.value);
31471 };
31472 return MapToSubscriber;
31473}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
31474//# sourceMappingURL=mapTo.js.map
31475
31476
31477/***/ }),
31478/* 310 */
31479/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31480
31481"use strict";
31482__webpack_require__.r(__webpack_exports__);
31483/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31484/* harmony export */ "materialize": () => /* binding */ materialize
31485/* harmony export */ });
31486/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31487/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
31488/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(192);
31489/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
31490
31491
31492
31493function materialize() {
31494 return function materializeOperatorFunction(source) {
31495 return source.lift(new MaterializeOperator());
31496 };
31497}
31498var MaterializeOperator = /*@__PURE__*/ (function () {
31499 function MaterializeOperator() {
31500 }
31501 MaterializeOperator.prototype.call = function (subscriber, source) {
31502 return source.subscribe(new MaterializeSubscriber(subscriber));
31503 };
31504 return MaterializeOperator;
31505}());
31506var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
31507 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(MaterializeSubscriber, _super);
31508 function MaterializeSubscriber(destination) {
31509 return _super.call(this, destination) || this;
31510 }
31511 MaterializeSubscriber.prototype._next = function (value) {
31512 this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__.Notification.createNext(value));
31513 };
31514 MaterializeSubscriber.prototype._error = function (err) {
31515 var destination = this.destination;
31516 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__.Notification.createError(err));
31517 destination.complete();
31518 };
31519 MaterializeSubscriber.prototype._complete = function () {
31520 var destination = this.destination;
31521 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__.Notification.createComplete());
31522 destination.complete();
31523 };
31524 return MaterializeSubscriber;
31525}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
31526//# sourceMappingURL=materialize.js.map
31527
31528
31529/***/ }),
31530/* 311 */
31531/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31532
31533"use strict";
31534__webpack_require__.r(__webpack_exports__);
31535/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31536/* harmony export */ "max": () => /* binding */ max
31537/* harmony export */ });
31538/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(312);
31539/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
31540
31541function max(comparer) {
31542 var max = (typeof comparer === 'function')
31543 ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
31544 : function (x, y) { return x > y ? x : y; };
31545 return (0,_reduce__WEBPACK_IMPORTED_MODULE_0__.reduce)(max);
31546}
31547//# sourceMappingURL=max.js.map
31548
31549
31550/***/ }),
31551/* 312 */
31552/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31553
31554"use strict";
31555__webpack_require__.r(__webpack_exports__);
31556/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31557/* harmony export */ "reduce": () => /* binding */ reduce
31558/* harmony export */ });
31559/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(313);
31560/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(308);
31561/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(285);
31562/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(181);
31563/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
31564
31565
31566
31567
31568function reduce(accumulator, seed) {
31569 if (arguments.length >= 2) {
31570 return function reduceOperatorFunctionWithSeed(source) {
31571 return (0,_util_pipe__WEBPACK_IMPORTED_MODULE_0__.pipe)((0,_scan__WEBPACK_IMPORTED_MODULE_1__.scan)(accumulator, seed), (0,_takeLast__WEBPACK_IMPORTED_MODULE_2__.takeLast)(1), (0,_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__.defaultIfEmpty)(seed))(source);
31572 };
31573 }
31574 return function reduceOperatorFunction(source) {
31575 return (0,_util_pipe__WEBPACK_IMPORTED_MODULE_0__.pipe)((0,_scan__WEBPACK_IMPORTED_MODULE_1__.scan)(function (acc, value, index) { return accumulator(acc, value, index + 1); }), (0,_takeLast__WEBPACK_IMPORTED_MODULE_2__.takeLast)(1))(source);
31576 };
31577}
31578//# sourceMappingURL=reduce.js.map
31579
31580
31581/***/ }),
31582/* 313 */
31583/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31584
31585"use strict";
31586__webpack_require__.r(__webpack_exports__);
31587/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31588/* harmony export */ "scan": () => /* binding */ scan
31589/* harmony export */ });
31590/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31591/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
31592/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
31593
31594
31595function scan(accumulator, seed) {
31596 var hasSeed = false;
31597 if (arguments.length >= 2) {
31598 hasSeed = true;
31599 }
31600 return function scanOperatorFunction(source) {
31601 return source.lift(new ScanOperator(accumulator, seed, hasSeed));
31602 };
31603}
31604var ScanOperator = /*@__PURE__*/ (function () {
31605 function ScanOperator(accumulator, seed, hasSeed) {
31606 if (hasSeed === void 0) {
31607 hasSeed = false;
31608 }
31609 this.accumulator = accumulator;
31610 this.seed = seed;
31611 this.hasSeed = hasSeed;
31612 }
31613 ScanOperator.prototype.call = function (subscriber, source) {
31614 return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
31615 };
31616 return ScanOperator;
31617}());
31618var ScanSubscriber = /*@__PURE__*/ (function (_super) {
31619 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ScanSubscriber, _super);
31620 function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
31621 var _this = _super.call(this, destination) || this;
31622 _this.accumulator = accumulator;
31623 _this._seed = _seed;
31624 _this.hasSeed = hasSeed;
31625 _this.index = 0;
31626 return _this;
31627 }
31628 Object.defineProperty(ScanSubscriber.prototype, "seed", {
31629 get: function () {
31630 return this._seed;
31631 },
31632 set: function (value) {
31633 this.hasSeed = true;
31634 this._seed = value;
31635 },
31636 enumerable: true,
31637 configurable: true
31638 });
31639 ScanSubscriber.prototype._next = function (value) {
31640 if (!this.hasSeed) {
31641 this.seed = value;
31642 this.destination.next(value);
31643 }
31644 else {
31645 return this._tryNext(value);
31646 }
31647 };
31648 ScanSubscriber.prototype._tryNext = function (value) {
31649 var index = this.index++;
31650 var result;
31651 try {
31652 result = this.accumulator(this.seed, value, index);
31653 }
31654 catch (err) {
31655 this.destination.error(err);
31656 }
31657 this.seed = result;
31658 this.destination.next(result);
31659 };
31660 return ScanSubscriber;
31661}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
31662//# sourceMappingURL=scan.js.map
31663
31664
31665/***/ }),
31666/* 314 */
31667/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31668
31669"use strict";
31670__webpack_require__.r(__webpack_exports__);
31671/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31672/* harmony export */ "merge": () => /* binding */ merge
31673/* harmony export */ });
31674/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(255);
31675/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
31676
31677function merge() {
31678 var observables = [];
31679 for (var _i = 0; _i < arguments.length; _i++) {
31680 observables[_i] = arguments[_i];
31681 }
31682 return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__.merge.apply(void 0, [source].concat(observables))); };
31683}
31684//# sourceMappingURL=merge.js.map
31685
31686
31687/***/ }),
31688/* 315 */
31689/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31690
31691"use strict";
31692__webpack_require__.r(__webpack_exports__);
31693/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31694/* harmony export */ "mergeMapTo": () => /* binding */ mergeMapTo
31695/* harmony export */ });
31696/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(239);
31697/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
31698
31699function mergeMapTo(innerObservable, resultSelector, concurrent) {
31700 if (concurrent === void 0) {
31701 concurrent = Number.POSITIVE_INFINITY;
31702 }
31703 if (typeof resultSelector === 'function') {
31704 return (0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.mergeMap)(function () { return innerObservable; }, resultSelector, concurrent);
31705 }
31706 if (typeof resultSelector === 'number') {
31707 concurrent = resultSelector;
31708 }
31709 return (0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.mergeMap)(function () { return innerObservable; }, concurrent);
31710}
31711//# sourceMappingURL=mergeMapTo.js.map
31712
31713
31714/***/ }),
31715/* 316 */
31716/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31717
31718"use strict";
31719__webpack_require__.r(__webpack_exports__);
31720/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31721/* harmony export */ "mergeScan": () => /* binding */ mergeScan,
31722/* harmony export */ "MergeScanOperator": () => /* binding */ MergeScanOperator,
31723/* harmony export */ "MergeScanSubscriber": () => /* binding */ MergeScanSubscriber
31724/* harmony export */ });
31725/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31726/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
31727/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
31728/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
31729/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */
31730
31731
31732
31733
31734function mergeScan(accumulator, seed, concurrent) {
31735 if (concurrent === void 0) {
31736 concurrent = Number.POSITIVE_INFINITY;
31737 }
31738 return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
31739}
31740var MergeScanOperator = /*@__PURE__*/ (function () {
31741 function MergeScanOperator(accumulator, seed, concurrent) {
31742 this.accumulator = accumulator;
31743 this.seed = seed;
31744 this.concurrent = concurrent;
31745 }
31746 MergeScanOperator.prototype.call = function (subscriber, source) {
31747 return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
31748 };
31749 return MergeScanOperator;
31750}());
31751
31752var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
31753 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(MergeScanSubscriber, _super);
31754 function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
31755 var _this = _super.call(this, destination) || this;
31756 _this.accumulator = accumulator;
31757 _this.acc = acc;
31758 _this.concurrent = concurrent;
31759 _this.hasValue = false;
31760 _this.hasCompleted = false;
31761 _this.buffer = [];
31762 _this.active = 0;
31763 _this.index = 0;
31764 return _this;
31765 }
31766 MergeScanSubscriber.prototype._next = function (value) {
31767 if (this.active < this.concurrent) {
31768 var index = this.index++;
31769 var destination = this.destination;
31770 var ish = void 0;
31771 try {
31772 var accumulator = this.accumulator;
31773 ish = accumulator(this.acc, value, index);
31774 }
31775 catch (e) {
31776 return destination.error(e);
31777 }
31778 this.active++;
31779 this._innerSub(ish, value, index);
31780 }
31781 else {
31782 this.buffer.push(value);
31783 }
31784 };
31785 MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
31786 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__.InnerSubscriber(this, value, index);
31787 var destination = this.destination;
31788 destination.add(innerSubscriber);
31789 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__.subscribeToResult)(this, ish, undefined, undefined, innerSubscriber);
31790 if (innerSubscription !== innerSubscriber) {
31791 destination.add(innerSubscription);
31792 }
31793 };
31794 MergeScanSubscriber.prototype._complete = function () {
31795 this.hasCompleted = true;
31796 if (this.active === 0 && this.buffer.length === 0) {
31797 if (this.hasValue === false) {
31798 this.destination.next(this.acc);
31799 }
31800 this.destination.complete();
31801 }
31802 this.unsubscribe();
31803 };
31804 MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31805 var destination = this.destination;
31806 this.acc = innerValue;
31807 this.hasValue = true;
31808 destination.next(innerValue);
31809 };
31810 MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
31811 var buffer = this.buffer;
31812 var destination = this.destination;
31813 destination.remove(innerSub);
31814 this.active--;
31815 if (buffer.length > 0) {
31816 this._next(buffer.shift());
31817 }
31818 else if (this.active === 0 && this.hasCompleted) {
31819 if (this.hasValue === false) {
31820 this.destination.next(this.acc);
31821 }
31822 this.destination.complete();
31823 }
31824 };
31825 return MergeScanSubscriber;
31826}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
31827
31828//# sourceMappingURL=mergeScan.js.map
31829
31830
31831/***/ }),
31832/* 317 */
31833/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31834
31835"use strict";
31836__webpack_require__.r(__webpack_exports__);
31837/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31838/* harmony export */ "min": () => /* binding */ min
31839/* harmony export */ });
31840/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(312);
31841/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
31842
31843function min(comparer) {
31844 var min = (typeof comparer === 'function')
31845 ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
31846 : function (x, y) { return x < y ? x : y; };
31847 return (0,_reduce__WEBPACK_IMPORTED_MODULE_0__.reduce)(min);
31848}
31849//# sourceMappingURL=min.js.map
31850
31851
31852/***/ }),
31853/* 318 */
31854/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31855
31856"use strict";
31857__webpack_require__.r(__webpack_exports__);
31858/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31859/* harmony export */ "multicast": () => /* binding */ multicast,
31860/* harmony export */ "MulticastOperator": () => /* binding */ MulticastOperator
31861/* harmony export */ });
31862/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
31863/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
31864
31865function multicast(subjectOrSubjectFactory, selector) {
31866 return function multicastOperatorFunction(source) {
31867 var subjectFactory;
31868 if (typeof subjectOrSubjectFactory === 'function') {
31869 subjectFactory = subjectOrSubjectFactory;
31870 }
31871 else {
31872 subjectFactory = function subjectFactory() {
31873 return subjectOrSubjectFactory;
31874 };
31875 }
31876 if (typeof selector === 'function') {
31877 return source.lift(new MulticastOperator(subjectFactory, selector));
31878 }
31879 var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__.connectableObservableDescriptor);
31880 connectable.source = source;
31881 connectable.subjectFactory = subjectFactory;
31882 return connectable;
31883 };
31884}
31885var MulticastOperator = /*@__PURE__*/ (function () {
31886 function MulticastOperator(subjectFactory, selector) {
31887 this.subjectFactory = subjectFactory;
31888 this.selector = selector;
31889 }
31890 MulticastOperator.prototype.call = function (subscriber, source) {
31891 var selector = this.selector;
31892 var subject = this.subjectFactory();
31893 var subscription = selector(subject).subscribe(subscriber);
31894 subscription.add(source.subscribe(subject));
31895 return subscription;
31896 };
31897 return MulticastOperator;
31898}());
31899
31900//# sourceMappingURL=multicast.js.map
31901
31902
31903/***/ }),
31904/* 319 */
31905/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
31906
31907"use strict";
31908__webpack_require__.r(__webpack_exports__);
31909/* harmony export */ __webpack_require__.d(__webpack_exports__, {
31910/* harmony export */ "onErrorResumeNext": () => /* binding */ onErrorResumeNext,
31911/* harmony export */ "onErrorResumeNextStatic": () => /* binding */ onErrorResumeNextStatic
31912/* harmony export */ });
31913/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
31914/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(240);
31915/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
31916/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(235);
31917/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
31918/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(226);
31919/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31920
31921
31922
31923
31924
31925
31926function onErrorResumeNext() {
31927 var nextSources = [];
31928 for (var _i = 0; _i < arguments.length; _i++) {
31929 nextSources[_i] = arguments[_i];
31930 }
31931 if (nextSources.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_1__.isArray)(nextSources[0])) {
31932 nextSources = nextSources[0];
31933 }
31934 return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
31935}
31936function onErrorResumeNextStatic() {
31937 var nextSources = [];
31938 for (var _i = 0; _i < arguments.length; _i++) {
31939 nextSources[_i] = arguments[_i];
31940 }
31941 var source = null;
31942 if (nextSources.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_1__.isArray)(nextSources[0])) {
31943 nextSources = nextSources[0];
31944 }
31945 source = nextSources.shift();
31946 return (0,_observable_from__WEBPACK_IMPORTED_MODULE_2__.from)(source, null).lift(new OnErrorResumeNextOperator(nextSources));
31947}
31948var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
31949 function OnErrorResumeNextOperator(nextSources) {
31950 this.nextSources = nextSources;
31951 }
31952 OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
31953 return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
31954 };
31955 return OnErrorResumeNextOperator;
31956}());
31957var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
31958 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(OnErrorResumeNextSubscriber, _super);
31959 function OnErrorResumeNextSubscriber(destination, nextSources) {
31960 var _this = _super.call(this, destination) || this;
31961 _this.destination = destination;
31962 _this.nextSources = nextSources;
31963 return _this;
31964 }
31965 OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
31966 this.subscribeToNextSource();
31967 };
31968 OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
31969 this.subscribeToNextSource();
31970 };
31971 OnErrorResumeNextSubscriber.prototype._error = function (err) {
31972 this.subscribeToNextSource();
31973 this.unsubscribe();
31974 };
31975 OnErrorResumeNextSubscriber.prototype._complete = function () {
31976 this.subscribeToNextSource();
31977 this.unsubscribe();
31978 };
31979 OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
31980 var next = this.nextSources.shift();
31981 if (!!next) {
31982 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__.InnerSubscriber(this, undefined, undefined);
31983 var destination = this.destination;
31984 destination.add(innerSubscriber);
31985 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__.subscribeToResult)(this, next, undefined, undefined, innerSubscriber);
31986 if (innerSubscription !== innerSubscriber) {
31987 destination.add(innerSubscription);
31988 }
31989 }
31990 else {
31991 this.destination.complete();
31992 }
31993 };
31994 return OnErrorResumeNextSubscriber;
31995}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__.OuterSubscriber));
31996//# sourceMappingURL=onErrorResumeNext.js.map
31997
31998
31999/***/ }),
32000/* 320 */
32001/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32002
32003"use strict";
32004__webpack_require__.r(__webpack_exports__);
32005/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32006/* harmony export */ "pairwise": () => /* binding */ pairwise
32007/* harmony export */ });
32008/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32009/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
32010/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32011
32012
32013function pairwise() {
32014 return function (source) { return source.lift(new PairwiseOperator()); };
32015}
32016var PairwiseOperator = /*@__PURE__*/ (function () {
32017 function PairwiseOperator() {
32018 }
32019 PairwiseOperator.prototype.call = function (subscriber, source) {
32020 return source.subscribe(new PairwiseSubscriber(subscriber));
32021 };
32022 return PairwiseOperator;
32023}());
32024var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
32025 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(PairwiseSubscriber, _super);
32026 function PairwiseSubscriber(destination) {
32027 var _this = _super.call(this, destination) || this;
32028 _this.hasPrev = false;
32029 return _this;
32030 }
32031 PairwiseSubscriber.prototype._next = function (value) {
32032 var pair;
32033 if (this.hasPrev) {
32034 pair = [this.prev, value];
32035 }
32036 else {
32037 this.hasPrev = true;
32038 }
32039 this.prev = value;
32040 if (pair) {
32041 this.destination.next(pair);
32042 }
32043 };
32044 return PairwiseSubscriber;
32045}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
32046//# sourceMappingURL=pairwise.js.map
32047
32048
32049/***/ }),
32050/* 321 */
32051/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32052
32053"use strict";
32054__webpack_require__.r(__webpack_exports__);
32055/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32056/* harmony export */ "partition": () => /* binding */ partition
32057/* harmony export */ });
32058/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(261);
32059/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(260);
32060/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
32061
32062
32063function partition(predicate, thisArg) {
32064 return function (source) {
32065 return [
32066 (0,_filter__WEBPACK_IMPORTED_MODULE_0__.filter)(predicate, thisArg)(source),
32067 (0,_filter__WEBPACK_IMPORTED_MODULE_0__.filter)((0,_util_not__WEBPACK_IMPORTED_MODULE_1__.not)(predicate, thisArg))(source)
32068 ];
32069 };
32070}
32071//# sourceMappingURL=partition.js.map
32072
32073
32074/***/ }),
32075/* 322 */
32076/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32077
32078"use strict";
32079__webpack_require__.r(__webpack_exports__);
32080/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32081/* harmony export */ "pluck": () => /* binding */ pluck
32082/* harmony export */ });
32083/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(223);
32084/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
32085
32086function pluck() {
32087 var properties = [];
32088 for (var _i = 0; _i < arguments.length; _i++) {
32089 properties[_i] = arguments[_i];
32090 }
32091 var length = properties.length;
32092 if (length === 0) {
32093 throw new Error('list of properties cannot be empty.');
32094 }
32095 return function (source) { return (0,_map__WEBPACK_IMPORTED_MODULE_0__.map)(plucker(properties, length))(source); };
32096}
32097function plucker(props, length) {
32098 var mapper = function (x) {
32099 var currentProp = x;
32100 for (var i = 0; i < length; i++) {
32101 var p = currentProp[props[i]];
32102 if (typeof p !== 'undefined') {
32103 currentProp = p;
32104 }
32105 else {
32106 return undefined;
32107 }
32108 }
32109 return currentProp;
32110 };
32111 return mapper;
32112}
32113//# sourceMappingURL=pluck.js.map
32114
32115
32116/***/ }),
32117/* 323 */
32118/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32119
32120"use strict";
32121__webpack_require__.r(__webpack_exports__);
32122/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32123/* harmony export */ "publish": () => /* binding */ publish
32124/* harmony export */ });
32125/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32126/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(318);
32127/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
32128
32129
32130function publish(selector) {
32131 return selector ?
32132 (0,_multicast__WEBPACK_IMPORTED_MODULE_0__.multicast)(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_1__.Subject(); }, selector) :
32133 (0,_multicast__WEBPACK_IMPORTED_MODULE_0__.multicast)(new _Subject__WEBPACK_IMPORTED_MODULE_1__.Subject());
32134}
32135//# sourceMappingURL=publish.js.map
32136
32137
32138/***/ }),
32139/* 324 */
32140/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32141
32142"use strict";
32143__webpack_require__.r(__webpack_exports__);
32144/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32145/* harmony export */ "publishBehavior": () => /* binding */ publishBehavior
32146/* harmony export */ });
32147/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(189);
32148/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(318);
32149/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
32150
32151
32152function publishBehavior(value) {
32153 return function (source) { return (0,_multicast__WEBPACK_IMPORTED_MODULE_0__.multicast)(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_1__.BehaviorSubject(value))(source); };
32154}
32155//# sourceMappingURL=publishBehavior.js.map
32156
32157
32158/***/ }),
32159/* 325 */
32160/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32161
32162"use strict";
32163__webpack_require__.r(__webpack_exports__);
32164/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32165/* harmony export */ "publishLast": () => /* binding */ publishLast
32166/* harmony export */ });
32167/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(207);
32168/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(318);
32169/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
32170
32171
32172function publishLast() {
32173 return function (source) { return (0,_multicast__WEBPACK_IMPORTED_MODULE_0__.multicast)(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__.AsyncSubject())(source); };
32174}
32175//# sourceMappingURL=publishLast.js.map
32176
32177
32178/***/ }),
32179/* 326 */
32180/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32181
32182"use strict";
32183__webpack_require__.r(__webpack_exports__);
32184/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32185/* harmony export */ "publishReplay": () => /* binding */ publishReplay
32186/* harmony export */ });
32187/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
32188/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(318);
32189/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
32190
32191
32192function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
32193 if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
32194 scheduler = selectorOrScheduler;
32195 }
32196 var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
32197 var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__.ReplaySubject(bufferSize, windowTime, scheduler);
32198 return function (source) { return (0,_multicast__WEBPACK_IMPORTED_MODULE_1__.multicast)(function () { return subject; }, selector)(source); };
32199}
32200//# sourceMappingURL=publishReplay.js.map
32201
32202
32203/***/ }),
32204/* 327 */
32205/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32206
32207"use strict";
32208__webpack_require__.r(__webpack_exports__);
32209/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32210/* harmony export */ "race": () => /* binding */ race
32211/* harmony export */ });
32212/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177);
32213/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(262);
32214/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
32215
32216
32217function race() {
32218 var observables = [];
32219 for (var _i = 0; _i < arguments.length; _i++) {
32220 observables[_i] = arguments[_i];
32221 }
32222 return function raceOperatorFunction(source) {
32223 if (observables.length === 1 && (0,_util_isArray__WEBPACK_IMPORTED_MODULE_0__.isArray)(observables[0])) {
32224 observables = observables[0];
32225 }
32226 return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__.race.apply(void 0, [source].concat(observables)));
32227 };
32228}
32229//# sourceMappingURL=race.js.map
32230
32231
32232/***/ }),
32233/* 328 */
32234/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32235
32236"use strict";
32237__webpack_require__.r(__webpack_exports__);
32238/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32239/* harmony export */ "repeat": () => /* binding */ repeat
32240/* harmony export */ });
32241/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32242/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
32243/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
32244/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
32245
32246
32247
32248function repeat(count) {
32249 if (count === void 0) {
32250 count = -1;
32251 }
32252 return function (source) {
32253 if (count === 0) {
32254 return (0,_observable_empty__WEBPACK_IMPORTED_MODULE_1__.empty)();
32255 }
32256 else if (count < 0) {
32257 return source.lift(new RepeatOperator(-1, source));
32258 }
32259 else {
32260 return source.lift(new RepeatOperator(count - 1, source));
32261 }
32262 };
32263}
32264var RepeatOperator = /*@__PURE__*/ (function () {
32265 function RepeatOperator(count, source) {
32266 this.count = count;
32267 this.source = source;
32268 }
32269 RepeatOperator.prototype.call = function (subscriber, source) {
32270 return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
32271 };
32272 return RepeatOperator;
32273}());
32274var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
32275 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(RepeatSubscriber, _super);
32276 function RepeatSubscriber(destination, count, source) {
32277 var _this = _super.call(this, destination) || this;
32278 _this.count = count;
32279 _this.source = source;
32280 return _this;
32281 }
32282 RepeatSubscriber.prototype.complete = function () {
32283 if (!this.isStopped) {
32284 var _a = this, source = _a.source, count = _a.count;
32285 if (count === 0) {
32286 return _super.prototype.complete.call(this);
32287 }
32288 else if (count > -1) {
32289 this.count = count - 1;
32290 }
32291 source.subscribe(this._unsubscribeAndRecycle());
32292 }
32293 };
32294 return RepeatSubscriber;
32295}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
32296//# sourceMappingURL=repeat.js.map
32297
32298
32299/***/ }),
32300/* 329 */
32301/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32302
32303"use strict";
32304__webpack_require__.r(__webpack_exports__);
32305/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32306/* harmony export */ "repeatWhen": () => /* binding */ repeatWhen
32307/* harmony export */ });
32308/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32309/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32310/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
32311/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
32312/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32313
32314
32315
32316
32317function repeatWhen(notifier) {
32318 return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
32319}
32320var RepeatWhenOperator = /*@__PURE__*/ (function () {
32321 function RepeatWhenOperator(notifier) {
32322 this.notifier = notifier;
32323 }
32324 RepeatWhenOperator.prototype.call = function (subscriber, source) {
32325 return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
32326 };
32327 return RepeatWhenOperator;
32328}());
32329var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
32330 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(RepeatWhenSubscriber, _super);
32331 function RepeatWhenSubscriber(destination, notifier, source) {
32332 var _this = _super.call(this, destination) || this;
32333 _this.notifier = notifier;
32334 _this.source = source;
32335 _this.sourceIsBeingSubscribedTo = true;
32336 return _this;
32337 }
32338 RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32339 this.sourceIsBeingSubscribedTo = true;
32340 this.source.subscribe(this);
32341 };
32342 RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
32343 if (this.sourceIsBeingSubscribedTo === false) {
32344 return _super.prototype.complete.call(this);
32345 }
32346 };
32347 RepeatWhenSubscriber.prototype.complete = function () {
32348 this.sourceIsBeingSubscribedTo = false;
32349 if (!this.isStopped) {
32350 if (!this.retries) {
32351 this.subscribeToRetries();
32352 }
32353 if (!this.retriesSubscription || this.retriesSubscription.closed) {
32354 return _super.prototype.complete.call(this);
32355 }
32356 this._unsubscribeAndRecycle();
32357 this.notifications.next();
32358 }
32359 };
32360 RepeatWhenSubscriber.prototype._unsubscribe = function () {
32361 var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
32362 if (notifications) {
32363 notifications.unsubscribe();
32364 this.notifications = null;
32365 }
32366 if (retriesSubscription) {
32367 retriesSubscription.unsubscribe();
32368 this.retriesSubscription = null;
32369 }
32370 this.retries = null;
32371 };
32372 RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
32373 var _unsubscribe = this._unsubscribe;
32374 this._unsubscribe = null;
32375 _super.prototype._unsubscribeAndRecycle.call(this);
32376 this._unsubscribe = _unsubscribe;
32377 return this;
32378 };
32379 RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
32380 this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__.Subject();
32381 var retries;
32382 try {
32383 var notifier = this.notifier;
32384 retries = notifier(this.notifications);
32385 }
32386 catch (e) {
32387 return _super.prototype.complete.call(this);
32388 }
32389 this.retries = retries;
32390 this.retriesSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__.subscribeToResult)(this, retries);
32391 };
32392 return RepeatWhenSubscriber;
32393}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
32394//# sourceMappingURL=repeatWhen.js.map
32395
32396
32397/***/ }),
32398/* 330 */
32399/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32400
32401"use strict";
32402__webpack_require__.r(__webpack_exports__);
32403/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32404/* harmony export */ "retry": () => /* binding */ retry
32405/* harmony export */ });
32406/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32407/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
32408/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32409
32410
32411function retry(count) {
32412 if (count === void 0) {
32413 count = -1;
32414 }
32415 return function (source) { return source.lift(new RetryOperator(count, source)); };
32416}
32417var RetryOperator = /*@__PURE__*/ (function () {
32418 function RetryOperator(count, source) {
32419 this.count = count;
32420 this.source = source;
32421 }
32422 RetryOperator.prototype.call = function (subscriber, source) {
32423 return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
32424 };
32425 return RetryOperator;
32426}());
32427var RetrySubscriber = /*@__PURE__*/ (function (_super) {
32428 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(RetrySubscriber, _super);
32429 function RetrySubscriber(destination, count, source) {
32430 var _this = _super.call(this, destination) || this;
32431 _this.count = count;
32432 _this.source = source;
32433 return _this;
32434 }
32435 RetrySubscriber.prototype.error = function (err) {
32436 if (!this.isStopped) {
32437 var _a = this, source = _a.source, count = _a.count;
32438 if (count === 0) {
32439 return _super.prototype.error.call(this, err);
32440 }
32441 else if (count > -1) {
32442 this.count = count - 1;
32443 }
32444 source.subscribe(this._unsubscribeAndRecycle());
32445 }
32446 };
32447 return RetrySubscriber;
32448}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
32449//# sourceMappingURL=retry.js.map
32450
32451
32452/***/ }),
32453/* 331 */
32454/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32455
32456"use strict";
32457__webpack_require__.r(__webpack_exports__);
32458/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32459/* harmony export */ "retryWhen": () => /* binding */ retryWhen
32460/* harmony export */ });
32461/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32462/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
32463/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
32464/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
32465/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32466
32467
32468
32469
32470function retryWhen(notifier) {
32471 return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
32472}
32473var RetryWhenOperator = /*@__PURE__*/ (function () {
32474 function RetryWhenOperator(notifier, source) {
32475 this.notifier = notifier;
32476 this.source = source;
32477 }
32478 RetryWhenOperator.prototype.call = function (subscriber, source) {
32479 return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
32480 };
32481 return RetryWhenOperator;
32482}());
32483var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
32484 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(RetryWhenSubscriber, _super);
32485 function RetryWhenSubscriber(destination, notifier, source) {
32486 var _this = _super.call(this, destination) || this;
32487 _this.notifier = notifier;
32488 _this.source = source;
32489 return _this;
32490 }
32491 RetryWhenSubscriber.prototype.error = function (err) {
32492 if (!this.isStopped) {
32493 var errors = this.errors;
32494 var retries = this.retries;
32495 var retriesSubscription = this.retriesSubscription;
32496 if (!retries) {
32497 errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__.Subject();
32498 try {
32499 var notifier = this.notifier;
32500 retries = notifier(errors);
32501 }
32502 catch (e) {
32503 return _super.prototype.error.call(this, e);
32504 }
32505 retriesSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__.subscribeToResult)(this, retries);
32506 }
32507 else {
32508 this.errors = null;
32509 this.retriesSubscription = null;
32510 }
32511 this._unsubscribeAndRecycle();
32512 this.errors = errors;
32513 this.retries = retries;
32514 this.retriesSubscription = retriesSubscription;
32515 errors.next(err);
32516 }
32517 };
32518 RetryWhenSubscriber.prototype._unsubscribe = function () {
32519 var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
32520 if (errors) {
32521 errors.unsubscribe();
32522 this.errors = null;
32523 }
32524 if (retriesSubscription) {
32525 retriesSubscription.unsubscribe();
32526 this.retriesSubscription = null;
32527 }
32528 this.retries = null;
32529 };
32530 RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32531 var _unsubscribe = this._unsubscribe;
32532 this._unsubscribe = null;
32533 this._unsubscribeAndRecycle();
32534 this._unsubscribe = _unsubscribe;
32535 this.source.subscribe(this);
32536 };
32537 return RetryWhenSubscriber;
32538}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
32539//# sourceMappingURL=retryWhen.js.map
32540
32541
32542/***/ }),
32543/* 332 */
32544/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32545
32546"use strict";
32547__webpack_require__.r(__webpack_exports__);
32548/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32549/* harmony export */ "sample": () => /* binding */ sample
32550/* harmony export */ });
32551/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32552/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
32553/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
32554/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
32555
32556
32557
32558function sample(notifier) {
32559 return function (source) { return source.lift(new SampleOperator(notifier)); };
32560}
32561var SampleOperator = /*@__PURE__*/ (function () {
32562 function SampleOperator(notifier) {
32563 this.notifier = notifier;
32564 }
32565 SampleOperator.prototype.call = function (subscriber, source) {
32566 var sampleSubscriber = new SampleSubscriber(subscriber);
32567 var subscription = source.subscribe(sampleSubscriber);
32568 subscription.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(sampleSubscriber, this.notifier));
32569 return subscription;
32570 };
32571 return SampleOperator;
32572}());
32573var SampleSubscriber = /*@__PURE__*/ (function (_super) {
32574 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SampleSubscriber, _super);
32575 function SampleSubscriber() {
32576 var _this = _super !== null && _super.apply(this, arguments) || this;
32577 _this.hasValue = false;
32578 return _this;
32579 }
32580 SampleSubscriber.prototype._next = function (value) {
32581 this.value = value;
32582 this.hasValue = true;
32583 };
32584 SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
32585 this.emitValue();
32586 };
32587 SampleSubscriber.prototype.notifyComplete = function () {
32588 this.emitValue();
32589 };
32590 SampleSubscriber.prototype.emitValue = function () {
32591 if (this.hasValue) {
32592 this.hasValue = false;
32593 this.destination.next(this.value);
32594 }
32595 };
32596 return SampleSubscriber;
32597}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
32598//# sourceMappingURL=sample.js.map
32599
32600
32601/***/ }),
32602/* 333 */
32603/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32604
32605"use strict";
32606__webpack_require__.r(__webpack_exports__);
32607/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32608/* harmony export */ "sampleTime": () => /* binding */ sampleTime
32609/* harmony export */ });
32610/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32611/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
32612/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
32613/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
32614
32615
32616
32617function sampleTime(period, scheduler) {
32618 if (scheduler === void 0) {
32619 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__.async;
32620 }
32621 return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
32622}
32623var SampleTimeOperator = /*@__PURE__*/ (function () {
32624 function SampleTimeOperator(period, scheduler) {
32625 this.period = period;
32626 this.scheduler = scheduler;
32627 }
32628 SampleTimeOperator.prototype.call = function (subscriber, source) {
32629 return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
32630 };
32631 return SampleTimeOperator;
32632}());
32633var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
32634 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SampleTimeSubscriber, _super);
32635 function SampleTimeSubscriber(destination, period, scheduler) {
32636 var _this = _super.call(this, destination) || this;
32637 _this.period = period;
32638 _this.scheduler = scheduler;
32639 _this.hasValue = false;
32640 _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
32641 return _this;
32642 }
32643 SampleTimeSubscriber.prototype._next = function (value) {
32644 this.lastValue = value;
32645 this.hasValue = true;
32646 };
32647 SampleTimeSubscriber.prototype.notifyNext = function () {
32648 if (this.hasValue) {
32649 this.hasValue = false;
32650 this.destination.next(this.lastValue);
32651 }
32652 };
32653 return SampleTimeSubscriber;
32654}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
32655function dispatchNotification(state) {
32656 var subscriber = state.subscriber, period = state.period;
32657 subscriber.notifyNext();
32658 this.schedule(state, period);
32659}
32660//# sourceMappingURL=sampleTime.js.map
32661
32662
32663/***/ }),
32664/* 334 */
32665/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32666
32667"use strict";
32668__webpack_require__.r(__webpack_exports__);
32669/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32670/* harmony export */ "sequenceEqual": () => /* binding */ sequenceEqual,
32671/* harmony export */ "SequenceEqualOperator": () => /* binding */ SequenceEqualOperator,
32672/* harmony export */ "SequenceEqualSubscriber": () => /* binding */ SequenceEqualSubscriber
32673/* harmony export */ });
32674/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32675/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
32676/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32677
32678
32679function sequenceEqual(compareTo, comparator) {
32680 return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
32681}
32682var SequenceEqualOperator = /*@__PURE__*/ (function () {
32683 function SequenceEqualOperator(compareTo, comparator) {
32684 this.compareTo = compareTo;
32685 this.comparator = comparator;
32686 }
32687 SequenceEqualOperator.prototype.call = function (subscriber, source) {
32688 return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
32689 };
32690 return SequenceEqualOperator;
32691}());
32692
32693var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
32694 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SequenceEqualSubscriber, _super);
32695 function SequenceEqualSubscriber(destination, compareTo, comparator) {
32696 var _this = _super.call(this, destination) || this;
32697 _this.compareTo = compareTo;
32698 _this.comparator = comparator;
32699 _this._a = [];
32700 _this._b = [];
32701 _this._oneComplete = false;
32702 _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
32703 return _this;
32704 }
32705 SequenceEqualSubscriber.prototype._next = function (value) {
32706 if (this._oneComplete && this._b.length === 0) {
32707 this.emit(false);
32708 }
32709 else {
32710 this._a.push(value);
32711 this.checkValues();
32712 }
32713 };
32714 SequenceEqualSubscriber.prototype._complete = function () {
32715 if (this._oneComplete) {
32716 this.emit(this._a.length === 0 && this._b.length === 0);
32717 }
32718 else {
32719 this._oneComplete = true;
32720 }
32721 this.unsubscribe();
32722 };
32723 SequenceEqualSubscriber.prototype.checkValues = function () {
32724 var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
32725 while (_a.length > 0 && _b.length > 0) {
32726 var a = _a.shift();
32727 var b = _b.shift();
32728 var areEqual = false;
32729 try {
32730 areEqual = comparator ? comparator(a, b) : a === b;
32731 }
32732 catch (e) {
32733 this.destination.error(e);
32734 }
32735 if (!areEqual) {
32736 this.emit(false);
32737 }
32738 }
32739 };
32740 SequenceEqualSubscriber.prototype.emit = function (value) {
32741 var destination = this.destination;
32742 destination.next(value);
32743 destination.complete();
32744 };
32745 SequenceEqualSubscriber.prototype.nextB = function (value) {
32746 if (this._oneComplete && this._a.length === 0) {
32747 this.emit(false);
32748 }
32749 else {
32750 this._b.push(value);
32751 this.checkValues();
32752 }
32753 };
32754 SequenceEqualSubscriber.prototype.completeB = function () {
32755 if (this._oneComplete) {
32756 this.emit(this._a.length === 0 && this._b.length === 0);
32757 }
32758 else {
32759 this._oneComplete = true;
32760 }
32761 };
32762 return SequenceEqualSubscriber;
32763}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
32764
32765var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
32766 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SequenceEqualCompareToSubscriber, _super);
32767 function SequenceEqualCompareToSubscriber(destination, parent) {
32768 var _this = _super.call(this, destination) || this;
32769 _this.parent = parent;
32770 return _this;
32771 }
32772 SequenceEqualCompareToSubscriber.prototype._next = function (value) {
32773 this.parent.nextB(value);
32774 };
32775 SequenceEqualCompareToSubscriber.prototype._error = function (err) {
32776 this.parent.error(err);
32777 this.unsubscribe();
32778 };
32779 SequenceEqualCompareToSubscriber.prototype._complete = function () {
32780 this.parent.completeB();
32781 this.unsubscribe();
32782 };
32783 return SequenceEqualCompareToSubscriber;
32784}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
32785//# sourceMappingURL=sequenceEqual.js.map
32786
32787
32788/***/ }),
32789/* 335 */
32790/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32791
32792"use strict";
32793__webpack_require__.r(__webpack_exports__);
32794/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32795/* harmony export */ "share": () => /* binding */ share
32796/* harmony export */ });
32797/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(318);
32798/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
32799/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(185);
32800/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
32801
32802
32803
32804function shareSubjectFactory() {
32805 return new _Subject__WEBPACK_IMPORTED_MODULE_0__.Subject();
32806}
32807function share() {
32808 return function (source) { return (0,_refCount__WEBPACK_IMPORTED_MODULE_1__.refCount)()((0,_multicast__WEBPACK_IMPORTED_MODULE_2__.multicast)(shareSubjectFactory)(source)); };
32809}
32810//# sourceMappingURL=share.js.map
32811
32812
32813/***/ }),
32814/* 336 */
32815/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32816
32817"use strict";
32818__webpack_require__.r(__webpack_exports__);
32819/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32820/* harmony export */ "shareReplay": () => /* binding */ shareReplay
32821/* harmony export */ });
32822/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
32823/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
32824
32825function shareReplay(configOrBufferSize, windowTime, scheduler) {
32826 var config;
32827 if (configOrBufferSize && typeof configOrBufferSize === 'object') {
32828 config = configOrBufferSize;
32829 }
32830 else {
32831 config = {
32832 bufferSize: configOrBufferSize,
32833 windowTime: windowTime,
32834 refCount: false,
32835 scheduler: scheduler
32836 };
32837 }
32838 return function (source) { return source.lift(shareReplayOperator(config)); };
32839}
32840function shareReplayOperator(_a) {
32841 var _b = _a.bufferSize, bufferSize = _b === void 0 ? Number.POSITIVE_INFINITY : _b, _c = _a.windowTime, windowTime = _c === void 0 ? Number.POSITIVE_INFINITY : _c, useRefCount = _a.refCount, scheduler = _a.scheduler;
32842 var subject;
32843 var refCount = 0;
32844 var subscription;
32845 var hasError = false;
32846 var isComplete = false;
32847 return function shareReplayOperation(source) {
32848 refCount++;
32849 if (!subject || hasError) {
32850 hasError = false;
32851 subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__.ReplaySubject(bufferSize, windowTime, scheduler);
32852 subscription = source.subscribe({
32853 next: function (value) { subject.next(value); },
32854 error: function (err) {
32855 hasError = true;
32856 subject.error(err);
32857 },
32858 complete: function () {
32859 isComplete = true;
32860 subscription = undefined;
32861 subject.complete();
32862 },
32863 });
32864 }
32865 var innerSub = subject.subscribe(this);
32866 this.add(function () {
32867 refCount--;
32868 innerSub.unsubscribe();
32869 if (subscription && !isComplete && useRefCount && refCount === 0) {
32870 subscription.unsubscribe();
32871 subscription = undefined;
32872 subject = undefined;
32873 }
32874 });
32875 };
32876}
32877//# sourceMappingURL=shareReplay.js.map
32878
32879
32880/***/ }),
32881/* 337 */
32882/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32883
32884"use strict";
32885__webpack_require__.r(__webpack_exports__);
32886/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32887/* harmony export */ "single": () => /* binding */ single
32888/* harmony export */ });
32889/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32890/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
32891/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(220);
32892/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
32893
32894
32895
32896function single(predicate) {
32897 return function (source) { return source.lift(new SingleOperator(predicate, source)); };
32898}
32899var SingleOperator = /*@__PURE__*/ (function () {
32900 function SingleOperator(predicate, source) {
32901 this.predicate = predicate;
32902 this.source = source;
32903 }
32904 SingleOperator.prototype.call = function (subscriber, source) {
32905 return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
32906 };
32907 return SingleOperator;
32908}());
32909var SingleSubscriber = /*@__PURE__*/ (function (_super) {
32910 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SingleSubscriber, _super);
32911 function SingleSubscriber(destination, predicate, source) {
32912 var _this = _super.call(this, destination) || this;
32913 _this.predicate = predicate;
32914 _this.source = source;
32915 _this.seenValue = false;
32916 _this.index = 0;
32917 return _this;
32918 }
32919 SingleSubscriber.prototype.applySingleValue = function (value) {
32920 if (this.seenValue) {
32921 this.destination.error('Sequence contains more than one element');
32922 }
32923 else {
32924 this.seenValue = true;
32925 this.singleValue = value;
32926 }
32927 };
32928 SingleSubscriber.prototype._next = function (value) {
32929 var index = this.index++;
32930 if (this.predicate) {
32931 this.tryNext(value, index);
32932 }
32933 else {
32934 this.applySingleValue(value);
32935 }
32936 };
32937 SingleSubscriber.prototype.tryNext = function (value, index) {
32938 try {
32939 if (this.predicate(value, index, this.source)) {
32940 this.applySingleValue(value);
32941 }
32942 }
32943 catch (err) {
32944 this.destination.error(err);
32945 }
32946 };
32947 SingleSubscriber.prototype._complete = function () {
32948 var destination = this.destination;
32949 if (this.index > 0) {
32950 destination.next(this.seenValue ? this.singleValue : undefined);
32951 destination.complete();
32952 }
32953 else {
32954 destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__.EmptyError);
32955 }
32956 };
32957 return SingleSubscriber;
32958}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
32959//# sourceMappingURL=single.js.map
32960
32961
32962/***/ }),
32963/* 338 */
32964/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32965
32966"use strict";
32967__webpack_require__.r(__webpack_exports__);
32968/* harmony export */ __webpack_require__.d(__webpack_exports__, {
32969/* harmony export */ "skip": () => /* binding */ skip
32970/* harmony export */ });
32971/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
32972/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
32973/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
32974
32975
32976function skip(count) {
32977 return function (source) { return source.lift(new SkipOperator(count)); };
32978}
32979var SkipOperator = /*@__PURE__*/ (function () {
32980 function SkipOperator(total) {
32981 this.total = total;
32982 }
32983 SkipOperator.prototype.call = function (subscriber, source) {
32984 return source.subscribe(new SkipSubscriber(subscriber, this.total));
32985 };
32986 return SkipOperator;
32987}());
32988var SkipSubscriber = /*@__PURE__*/ (function (_super) {
32989 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SkipSubscriber, _super);
32990 function SkipSubscriber(destination, total) {
32991 var _this = _super.call(this, destination) || this;
32992 _this.total = total;
32993 _this.count = 0;
32994 return _this;
32995 }
32996 SkipSubscriber.prototype._next = function (x) {
32997 if (++this.count > this.total) {
32998 this.destination.next(x);
32999 }
33000 };
33001 return SkipSubscriber;
33002}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
33003//# sourceMappingURL=skip.js.map
33004
33005
33006/***/ }),
33007/* 339 */
33008/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33009
33010"use strict";
33011__webpack_require__.r(__webpack_exports__);
33012/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33013/* harmony export */ "skipLast": () => /* binding */ skipLast
33014/* harmony export */ });
33015/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33016/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
33017/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(219);
33018/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
33019
33020
33021
33022function skipLast(count) {
33023 return function (source) { return source.lift(new SkipLastOperator(count)); };
33024}
33025var SkipLastOperator = /*@__PURE__*/ (function () {
33026 function SkipLastOperator(_skipCount) {
33027 this._skipCount = _skipCount;
33028 if (this._skipCount < 0) {
33029 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__.ArgumentOutOfRangeError;
33030 }
33031 }
33032 SkipLastOperator.prototype.call = function (subscriber, source) {
33033 if (this._skipCount === 0) {
33034 return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber(subscriber));
33035 }
33036 else {
33037 return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
33038 }
33039 };
33040 return SkipLastOperator;
33041}());
33042var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
33043 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SkipLastSubscriber, _super);
33044 function SkipLastSubscriber(destination, _skipCount) {
33045 var _this = _super.call(this, destination) || this;
33046 _this._skipCount = _skipCount;
33047 _this._count = 0;
33048 _this._ring = new Array(_skipCount);
33049 return _this;
33050 }
33051 SkipLastSubscriber.prototype._next = function (value) {
33052 var skipCount = this._skipCount;
33053 var count = this._count++;
33054 if (count < skipCount) {
33055 this._ring[count] = value;
33056 }
33057 else {
33058 var currentIndex = count % skipCount;
33059 var ring = this._ring;
33060 var oldValue = ring[currentIndex];
33061 ring[currentIndex] = value;
33062 this.destination.next(oldValue);
33063 }
33064 };
33065 return SkipLastSubscriber;
33066}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
33067//# sourceMappingURL=skipLast.js.map
33068
33069
33070/***/ }),
33071/* 340 */
33072/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33073
33074"use strict";
33075__webpack_require__.r(__webpack_exports__);
33076/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33077/* harmony export */ "skipUntil": () => /* binding */ skipUntil
33078/* harmony export */ });
33079/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33080/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
33081/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(227);
33082/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
33083/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33084
33085
33086
33087
33088function skipUntil(notifier) {
33089 return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
33090}
33091var SkipUntilOperator = /*@__PURE__*/ (function () {
33092 function SkipUntilOperator(notifier) {
33093 this.notifier = notifier;
33094 }
33095 SkipUntilOperator.prototype.call = function (destination, source) {
33096 return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
33097 };
33098 return SkipUntilOperator;
33099}());
33100var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
33101 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SkipUntilSubscriber, _super);
33102 function SkipUntilSubscriber(destination, notifier) {
33103 var _this = _super.call(this, destination) || this;
33104 _this.hasValue = false;
33105 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__.InnerSubscriber(_this, undefined, undefined);
33106 _this.add(innerSubscriber);
33107 _this.innerSubscription = innerSubscriber;
33108 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__.subscribeToResult)(_this, notifier, undefined, undefined, innerSubscriber);
33109 if (innerSubscription !== innerSubscriber) {
33110 _this.add(innerSubscription);
33111 _this.innerSubscription = innerSubscription;
33112 }
33113 return _this;
33114 }
33115 SkipUntilSubscriber.prototype._next = function (value) {
33116 if (this.hasValue) {
33117 _super.prototype._next.call(this, value);
33118 }
33119 };
33120 SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33121 this.hasValue = true;
33122 if (this.innerSubscription) {
33123 this.innerSubscription.unsubscribe();
33124 }
33125 };
33126 SkipUntilSubscriber.prototype.notifyComplete = function () {
33127 };
33128 return SkipUntilSubscriber;
33129}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
33130//# sourceMappingURL=skipUntil.js.map
33131
33132
33133/***/ }),
33134/* 341 */
33135/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33136
33137"use strict";
33138__webpack_require__.r(__webpack_exports__);
33139/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33140/* harmony export */ "skipWhile": () => /* binding */ skipWhile
33141/* harmony export */ });
33142/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33143/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
33144/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
33145
33146
33147function skipWhile(predicate) {
33148 return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
33149}
33150var SkipWhileOperator = /*@__PURE__*/ (function () {
33151 function SkipWhileOperator(predicate) {
33152 this.predicate = predicate;
33153 }
33154 SkipWhileOperator.prototype.call = function (subscriber, source) {
33155 return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
33156 };
33157 return SkipWhileOperator;
33158}());
33159var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
33160 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SkipWhileSubscriber, _super);
33161 function SkipWhileSubscriber(destination, predicate) {
33162 var _this = _super.call(this, destination) || this;
33163 _this.predicate = predicate;
33164 _this.skipping = true;
33165 _this.index = 0;
33166 return _this;
33167 }
33168 SkipWhileSubscriber.prototype._next = function (value) {
33169 var destination = this.destination;
33170 if (this.skipping) {
33171 this.tryCallPredicate(value);
33172 }
33173 if (!this.skipping) {
33174 destination.next(value);
33175 }
33176 };
33177 SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
33178 try {
33179 var result = this.predicate(value, this.index++);
33180 this.skipping = Boolean(result);
33181 }
33182 catch (err) {
33183 this.destination.error(err);
33184 }
33185 };
33186 return SkipWhileSubscriber;
33187}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
33188//# sourceMappingURL=skipWhile.js.map
33189
33190
33191/***/ }),
33192/* 342 */
33193/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33194
33195"use strict";
33196__webpack_require__.r(__webpack_exports__);
33197/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33198/* harmony export */ "startWith": () => /* binding */ startWith
33199/* harmony export */ });
33200/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(236);
33201/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
33202/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
33203
33204
33205function startWith() {
33206 var array = [];
33207 for (var _i = 0; _i < arguments.length; _i++) {
33208 array[_i] = arguments[_i];
33209 }
33210 var scheduler = array[array.length - 1];
33211 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__.isScheduler)(scheduler)) {
33212 array.pop();
33213 return function (source) { return (0,_observable_concat__WEBPACK_IMPORTED_MODULE_1__.concat)(array, source, scheduler); };
33214 }
33215 else {
33216 return function (source) { return (0,_observable_concat__WEBPACK_IMPORTED_MODULE_1__.concat)(array, source); };
33217 }
33218}
33219//# sourceMappingURL=startWith.js.map
33220
33221
33222/***/ }),
33223/* 343 */
33224/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33225
33226"use strict";
33227__webpack_require__.r(__webpack_exports__);
33228/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33229/* harmony export */ "subscribeOn": () => /* binding */ subscribeOn
33230/* harmony export */ });
33231/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(344);
33232/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
33233
33234function subscribeOn(scheduler, delay) {
33235 if (delay === void 0) {
33236 delay = 0;
33237 }
33238 return function subscribeOnOperatorFunction(source) {
33239 return source.lift(new SubscribeOnOperator(scheduler, delay));
33240 };
33241}
33242var SubscribeOnOperator = /*@__PURE__*/ (function () {
33243 function SubscribeOnOperator(scheduler, delay) {
33244 this.scheduler = scheduler;
33245 this.delay = delay;
33246 }
33247 SubscribeOnOperator.prototype.call = function (subscriber, source) {
33248 return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__.SubscribeOnObservable(source, this.delay, this.scheduler).subscribe(subscriber);
33249 };
33250 return SubscribeOnOperator;
33251}());
33252//# sourceMappingURL=subscribeOn.js.map
33253
33254
33255/***/ }),
33256/* 344 */
33257/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33258
33259"use strict";
33260__webpack_require__.r(__webpack_exports__);
33261/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33262/* harmony export */ "SubscribeOnObservable": () => /* binding */ SubscribeOnObservable
33263/* harmony export */ });
33264/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33265/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166);
33266/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
33267/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(254);
33268/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
33269
33270
33271
33272
33273var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
33274 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SubscribeOnObservable, _super);
33275 function SubscribeOnObservable(source, delayTime, scheduler) {
33276 if (delayTime === void 0) {
33277 delayTime = 0;
33278 }
33279 if (scheduler === void 0) {
33280 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__.asap;
33281 }
33282 var _this = _super.call(this) || this;
33283 _this.source = source;
33284 _this.delayTime = delayTime;
33285 _this.scheduler = scheduler;
33286 if (!(0,_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__.isNumeric)(delayTime) || delayTime < 0) {
33287 _this.delayTime = 0;
33288 }
33289 if (!scheduler || typeof scheduler.schedule !== 'function') {
33290 _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__.asap;
33291 }
33292 return _this;
33293 }
33294 SubscribeOnObservable.create = function (source, delay, scheduler) {
33295 if (delay === void 0) {
33296 delay = 0;
33297 }
33298 if (scheduler === void 0) {
33299 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__.asap;
33300 }
33301 return new SubscribeOnObservable(source, delay, scheduler);
33302 };
33303 SubscribeOnObservable.dispatch = function (arg) {
33304 var source = arg.source, subscriber = arg.subscriber;
33305 return this.add(source.subscribe(subscriber));
33306 };
33307 SubscribeOnObservable.prototype._subscribe = function (subscriber) {
33308 var delay = this.delayTime;
33309 var source = this.source;
33310 var scheduler = this.scheduler;
33311 return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
33312 source: source, subscriber: subscriber
33313 });
33314 };
33315 return SubscribeOnObservable;
33316}(_Observable__WEBPACK_IMPORTED_MODULE_3__.Observable));
33317
33318//# sourceMappingURL=SubscribeOnObservable.js.map
33319
33320
33321/***/ }),
33322/* 345 */
33323/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33324
33325"use strict";
33326__webpack_require__.r(__webpack_exports__);
33327/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33328/* harmony export */ "switchAll": () => /* binding */ switchAll
33329/* harmony export */ });
33330/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(346);
33331/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(182);
33332/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
33333
33334
33335function switchAll() {
33336 return (0,_switchMap__WEBPACK_IMPORTED_MODULE_0__.switchMap)(_util_identity__WEBPACK_IMPORTED_MODULE_1__.identity);
33337}
33338//# sourceMappingURL=switchAll.js.map
33339
33340
33341/***/ }),
33342/* 346 */
33343/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33344
33345"use strict";
33346__webpack_require__.r(__webpack_exports__);
33347/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33348/* harmony export */ "switchMap": () => /* binding */ switchMap
33349/* harmony export */ });
33350/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33351/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(235);
33352/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(227);
33353/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(226);
33354/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
33355/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240);
33356/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
33357
33358
33359
33360
33361
33362
33363function switchMap(project, resultSelector) {
33364 if (typeof resultSelector === 'function') {
33365 return function (source) { return source.pipe(switchMap(function (a, i) { return (0,_observable_from__WEBPACK_IMPORTED_MODULE_1__.from)(project(a, i)).pipe((0,_map__WEBPACK_IMPORTED_MODULE_2__.map)(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
33366 }
33367 return function (source) { return source.lift(new SwitchMapOperator(project)); };
33368}
33369var SwitchMapOperator = /*@__PURE__*/ (function () {
33370 function SwitchMapOperator(project) {
33371 this.project = project;
33372 }
33373 SwitchMapOperator.prototype.call = function (subscriber, source) {
33374 return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
33375 };
33376 return SwitchMapOperator;
33377}());
33378var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
33379 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(SwitchMapSubscriber, _super);
33380 function SwitchMapSubscriber(destination, project) {
33381 var _this = _super.call(this, destination) || this;
33382 _this.project = project;
33383 _this.index = 0;
33384 return _this;
33385 }
33386 SwitchMapSubscriber.prototype._next = function (value) {
33387 var result;
33388 var index = this.index++;
33389 try {
33390 result = this.project(value, index);
33391 }
33392 catch (error) {
33393 this.destination.error(error);
33394 return;
33395 }
33396 this._innerSub(result, value, index);
33397 };
33398 SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
33399 var innerSubscription = this.innerSubscription;
33400 if (innerSubscription) {
33401 innerSubscription.unsubscribe();
33402 }
33403 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__.InnerSubscriber(this, value, index);
33404 var destination = this.destination;
33405 destination.add(innerSubscriber);
33406 this.innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__.subscribeToResult)(this, result, undefined, undefined, innerSubscriber);
33407 if (this.innerSubscription !== innerSubscriber) {
33408 destination.add(this.innerSubscription);
33409 }
33410 };
33411 SwitchMapSubscriber.prototype._complete = function () {
33412 var innerSubscription = this.innerSubscription;
33413 if (!innerSubscription || innerSubscription.closed) {
33414 _super.prototype._complete.call(this);
33415 }
33416 this.unsubscribe();
33417 };
33418 SwitchMapSubscriber.prototype._unsubscribe = function () {
33419 this.innerSubscription = null;
33420 };
33421 SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
33422 var destination = this.destination;
33423 destination.remove(innerSub);
33424 this.innerSubscription = null;
33425 if (this.isStopped) {
33426 _super.prototype._complete.call(this);
33427 }
33428 };
33429 SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33430 this.destination.next(innerValue);
33431 };
33432 return SwitchMapSubscriber;
33433}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_5__.OuterSubscriber));
33434//# sourceMappingURL=switchMap.js.map
33435
33436
33437/***/ }),
33438/* 347 */
33439/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33440
33441"use strict";
33442__webpack_require__.r(__webpack_exports__);
33443/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33444/* harmony export */ "switchMapTo": () => /* binding */ switchMapTo
33445/* harmony export */ });
33446/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(346);
33447/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
33448
33449function switchMapTo(innerObservable, resultSelector) {
33450 return resultSelector ? (0,_switchMap__WEBPACK_IMPORTED_MODULE_0__.switchMap)(function () { return innerObservable; }, resultSelector) : (0,_switchMap__WEBPACK_IMPORTED_MODULE_0__.switchMap)(function () { return innerObservable; });
33451}
33452//# sourceMappingURL=switchMapTo.js.map
33453
33454
33455/***/ }),
33456/* 348 */
33457/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33458
33459"use strict";
33460__webpack_require__.r(__webpack_exports__);
33461/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33462/* harmony export */ "takeUntil": () => /* binding */ takeUntil
33463/* harmony export */ });
33464/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33465/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
33466/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
33467/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33468
33469
33470
33471function takeUntil(notifier) {
33472 return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
33473}
33474var TakeUntilOperator = /*@__PURE__*/ (function () {
33475 function TakeUntilOperator(notifier) {
33476 this.notifier = notifier;
33477 }
33478 TakeUntilOperator.prototype.call = function (subscriber, source) {
33479 var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
33480 var notifierSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(takeUntilSubscriber, this.notifier);
33481 if (notifierSubscription && !takeUntilSubscriber.seenValue) {
33482 takeUntilSubscriber.add(notifierSubscription);
33483 return source.subscribe(takeUntilSubscriber);
33484 }
33485 return takeUntilSubscriber;
33486 };
33487 return TakeUntilOperator;
33488}());
33489var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
33490 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(TakeUntilSubscriber, _super);
33491 function TakeUntilSubscriber(destination) {
33492 var _this = _super.call(this, destination) || this;
33493 _this.seenValue = false;
33494 return _this;
33495 }
33496 TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33497 this.seenValue = true;
33498 this.complete();
33499 };
33500 TakeUntilSubscriber.prototype.notifyComplete = function () {
33501 };
33502 return TakeUntilSubscriber;
33503}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
33504//# sourceMappingURL=takeUntil.js.map
33505
33506
33507/***/ }),
33508/* 349 */
33509/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33510
33511"use strict";
33512__webpack_require__.r(__webpack_exports__);
33513/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33514/* harmony export */ "takeWhile": () => /* binding */ takeWhile
33515/* harmony export */ });
33516/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33517/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(168);
33518/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
33519
33520
33521function takeWhile(predicate, inclusive) {
33522 if (inclusive === void 0) {
33523 inclusive = false;
33524 }
33525 return function (source) {
33526 return source.lift(new TakeWhileOperator(predicate, inclusive));
33527 };
33528}
33529var TakeWhileOperator = /*@__PURE__*/ (function () {
33530 function TakeWhileOperator(predicate, inclusive) {
33531 this.predicate = predicate;
33532 this.inclusive = inclusive;
33533 }
33534 TakeWhileOperator.prototype.call = function (subscriber, source) {
33535 return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
33536 };
33537 return TakeWhileOperator;
33538}());
33539var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
33540 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(TakeWhileSubscriber, _super);
33541 function TakeWhileSubscriber(destination, predicate, inclusive) {
33542 var _this = _super.call(this, destination) || this;
33543 _this.predicate = predicate;
33544 _this.inclusive = inclusive;
33545 _this.index = 0;
33546 return _this;
33547 }
33548 TakeWhileSubscriber.prototype._next = function (value) {
33549 var destination = this.destination;
33550 var result;
33551 try {
33552 result = this.predicate(value, this.index++);
33553 }
33554 catch (err) {
33555 destination.error(err);
33556 return;
33557 }
33558 this.nextOrComplete(value, result);
33559 };
33560 TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
33561 var destination = this.destination;
33562 if (Boolean(predicateResult)) {
33563 destination.next(value);
33564 }
33565 else {
33566 if (this.inclusive) {
33567 destination.next(value);
33568 }
33569 destination.complete();
33570 }
33571 };
33572 return TakeWhileSubscriber;
33573}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__.Subscriber));
33574//# sourceMappingURL=takeWhile.js.map
33575
33576
33577/***/ }),
33578/* 350 */
33579/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33580
33581"use strict";
33582__webpack_require__.r(__webpack_exports__);
33583/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33584/* harmony export */ "tap": () => /* binding */ tap
33585/* harmony export */ });
33586/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33587/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
33588/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(217);
33589/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
33590/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
33591
33592
33593
33594
33595function tap(nextOrObserver, error, complete) {
33596 return function tapOperatorFunction(source) {
33597 return source.lift(new DoOperator(nextOrObserver, error, complete));
33598 };
33599}
33600var DoOperator = /*@__PURE__*/ (function () {
33601 function DoOperator(nextOrObserver, error, complete) {
33602 this.nextOrObserver = nextOrObserver;
33603 this.error = error;
33604 this.complete = complete;
33605 }
33606 DoOperator.prototype.call = function (subscriber, source) {
33607 return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
33608 };
33609 return DoOperator;
33610}());
33611var TapSubscriber = /*@__PURE__*/ (function (_super) {
33612 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(TapSubscriber, _super);
33613 function TapSubscriber(destination, observerOrNext, error, complete) {
33614 var _this = _super.call(this, destination) || this;
33615 _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
33616 _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
33617 _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
33618 _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
33619 _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
33620 if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_2__.isFunction)(observerOrNext)) {
33621 _this._context = _this;
33622 _this._tapNext = observerOrNext;
33623 }
33624 else if (observerOrNext) {
33625 _this._context = observerOrNext;
33626 _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
33627 _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
33628 _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__.noop;
33629 }
33630 return _this;
33631 }
33632 TapSubscriber.prototype._next = function (value) {
33633 try {
33634 this._tapNext.call(this._context, value);
33635 }
33636 catch (err) {
33637 this.destination.error(err);
33638 return;
33639 }
33640 this.destination.next(value);
33641 };
33642 TapSubscriber.prototype._error = function (err) {
33643 try {
33644 this._tapError.call(this._context, err);
33645 }
33646 catch (err) {
33647 this.destination.error(err);
33648 return;
33649 }
33650 this.destination.error(err);
33651 };
33652 TapSubscriber.prototype._complete = function () {
33653 try {
33654 this._tapComplete.call(this._context);
33655 }
33656 catch (err) {
33657 this.destination.error(err);
33658 return;
33659 }
33660 return this.destination.complete();
33661 };
33662 return TapSubscriber;
33663}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__.Subscriber));
33664//# sourceMappingURL=tap.js.map
33665
33666
33667/***/ }),
33668/* 351 */
33669/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33670
33671"use strict";
33672__webpack_require__.r(__webpack_exports__);
33673/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33674/* harmony export */ "defaultThrottleConfig": () => /* binding */ defaultThrottleConfig,
33675/* harmony export */ "throttle": () => /* binding */ throttle
33676/* harmony export */ });
33677/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33678/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
33679/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
33680/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33681
33682
33683
33684var defaultThrottleConfig = {
33685 leading: true,
33686 trailing: false
33687};
33688function throttle(durationSelector, config) {
33689 if (config === void 0) {
33690 config = defaultThrottleConfig;
33691 }
33692 return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
33693}
33694var ThrottleOperator = /*@__PURE__*/ (function () {
33695 function ThrottleOperator(durationSelector, leading, trailing) {
33696 this.durationSelector = durationSelector;
33697 this.leading = leading;
33698 this.trailing = trailing;
33699 }
33700 ThrottleOperator.prototype.call = function (subscriber, source) {
33701 return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
33702 };
33703 return ThrottleOperator;
33704}());
33705var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
33706 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ThrottleSubscriber, _super);
33707 function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
33708 var _this = _super.call(this, destination) || this;
33709 _this.destination = destination;
33710 _this.durationSelector = durationSelector;
33711 _this._leading = _leading;
33712 _this._trailing = _trailing;
33713 _this._hasValue = false;
33714 return _this;
33715 }
33716 ThrottleSubscriber.prototype._next = function (value) {
33717 this._hasValue = true;
33718 this._sendValue = value;
33719 if (!this._throttled) {
33720 if (this._leading) {
33721 this.send();
33722 }
33723 else {
33724 this.throttle(value);
33725 }
33726 }
33727 };
33728 ThrottleSubscriber.prototype.send = function () {
33729 var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
33730 if (_hasValue) {
33731 this.destination.next(_sendValue);
33732 this.throttle(_sendValue);
33733 }
33734 this._hasValue = false;
33735 this._sendValue = null;
33736 };
33737 ThrottleSubscriber.prototype.throttle = function (value) {
33738 var duration = this.tryDurationSelector(value);
33739 if (!!duration) {
33740 this.add(this._throttled = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(this, duration));
33741 }
33742 };
33743 ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
33744 try {
33745 return this.durationSelector(value);
33746 }
33747 catch (err) {
33748 this.destination.error(err);
33749 return null;
33750 }
33751 };
33752 ThrottleSubscriber.prototype.throttlingDone = function () {
33753 var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
33754 if (_throttled) {
33755 _throttled.unsubscribe();
33756 }
33757 this._throttled = null;
33758 if (_trailing) {
33759 this.send();
33760 }
33761 };
33762 ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
33763 this.throttlingDone();
33764 };
33765 ThrottleSubscriber.prototype.notifyComplete = function () {
33766 this.throttlingDone();
33767 };
33768 return ThrottleSubscriber;
33769}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
33770//# sourceMappingURL=throttle.js.map
33771
33772
33773/***/ }),
33774/* 352 */
33775/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33776
33777"use strict";
33778__webpack_require__.r(__webpack_exports__);
33779/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33780/* harmony export */ "throttleTime": () => /* binding */ throttleTime
33781/* harmony export */ });
33782/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33783/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(168);
33784/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
33785/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(351);
33786/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
33787
33788
33789
33790
33791function throttleTime(duration, scheduler, config) {
33792 if (scheduler === void 0) {
33793 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__.async;
33794 }
33795 if (config === void 0) {
33796 config = _throttle__WEBPACK_IMPORTED_MODULE_2__.defaultThrottleConfig;
33797 }
33798 return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
33799}
33800var ThrottleTimeOperator = /*@__PURE__*/ (function () {
33801 function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
33802 this.duration = duration;
33803 this.scheduler = scheduler;
33804 this.leading = leading;
33805 this.trailing = trailing;
33806 }
33807 ThrottleTimeOperator.prototype.call = function (subscriber, source) {
33808 return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
33809 };
33810 return ThrottleTimeOperator;
33811}());
33812var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
33813 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(ThrottleTimeSubscriber, _super);
33814 function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
33815 var _this = _super.call(this, destination) || this;
33816 _this.duration = duration;
33817 _this.scheduler = scheduler;
33818 _this.leading = leading;
33819 _this.trailing = trailing;
33820 _this._hasTrailingValue = false;
33821 _this._trailingValue = null;
33822 return _this;
33823 }
33824 ThrottleTimeSubscriber.prototype._next = function (value) {
33825 if (this.throttled) {
33826 if (this.trailing) {
33827 this._trailingValue = value;
33828 this._hasTrailingValue = true;
33829 }
33830 }
33831 else {
33832 this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
33833 if (this.leading) {
33834 this.destination.next(value);
33835 }
33836 else if (this.trailing) {
33837 this._trailingValue = value;
33838 this._hasTrailingValue = true;
33839 }
33840 }
33841 };
33842 ThrottleTimeSubscriber.prototype._complete = function () {
33843 if (this._hasTrailingValue) {
33844 this.destination.next(this._trailingValue);
33845 this.destination.complete();
33846 }
33847 else {
33848 this.destination.complete();
33849 }
33850 };
33851 ThrottleTimeSubscriber.prototype.clearThrottle = function () {
33852 var throttled = this.throttled;
33853 if (throttled) {
33854 if (this.trailing && this._hasTrailingValue) {
33855 this.destination.next(this._trailingValue);
33856 this._trailingValue = null;
33857 this._hasTrailingValue = false;
33858 }
33859 throttled.unsubscribe();
33860 this.remove(throttled);
33861 this.throttled = null;
33862 }
33863 };
33864 return ThrottleTimeSubscriber;
33865}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__.Subscriber));
33866function dispatchNext(arg) {
33867 var subscriber = arg.subscriber;
33868 subscriber.clearThrottle();
33869}
33870//# sourceMappingURL=throttleTime.js.map
33871
33872
33873/***/ }),
33874/* 353 */
33875/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33876
33877"use strict";
33878__webpack_require__.r(__webpack_exports__);
33879/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33880/* harmony export */ "timeInterval": () => /* binding */ timeInterval,
33881/* harmony export */ "TimeInterval": () => /* binding */ TimeInterval
33882/* harmony export */ });
33883/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(212);
33884/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(313);
33885/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(247);
33886/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(223);
33887/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
33888
33889
33890
33891
33892function timeInterval(scheduler) {
33893 if (scheduler === void 0) {
33894 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.async;
33895 }
33896 return function (source) {
33897 return (0,_observable_defer__WEBPACK_IMPORTED_MODULE_1__.defer)(function () {
33898 return source.pipe((0,_scan__WEBPACK_IMPORTED_MODULE_2__.scan)(function (_a, value) {
33899 var current = _a.current;
33900 return ({ value: value, current: scheduler.now(), last: current });
33901 }, { current: scheduler.now(), value: undefined, last: undefined }), (0,_map__WEBPACK_IMPORTED_MODULE_3__.map)(function (_a) {
33902 var current = _a.current, last = _a.last, value = _a.value;
33903 return new TimeInterval(value, current - last);
33904 }));
33905 });
33906 };
33907}
33908var TimeInterval = /*@__PURE__*/ (function () {
33909 function TimeInterval(value, interval) {
33910 this.value = value;
33911 this.interval = interval;
33912 }
33913 return TimeInterval;
33914}());
33915
33916//# sourceMappingURL=timeInterval.js.map
33917
33918
33919/***/ }),
33920/* 354 */
33921/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33922
33923"use strict";
33924__webpack_require__.r(__webpack_exports__);
33925/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33926/* harmony export */ "timeout": () => /* binding */ timeout
33927/* harmony export */ });
33928/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(212);
33929/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(221);
33930/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(355);
33931/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(198);
33932/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
33933
33934
33935
33936
33937function timeout(due, scheduler) {
33938 if (scheduler === void 0) {
33939 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.async;
33940 }
33941 return (0,_timeoutWith__WEBPACK_IMPORTED_MODULE_1__.timeoutWith)(due, (0,_observable_throwError__WEBPACK_IMPORTED_MODULE_2__.throwError)(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_3__.TimeoutError()), scheduler);
33942}
33943//# sourceMappingURL=timeout.js.map
33944
33945
33946/***/ }),
33947/* 355 */
33948/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33949
33950"use strict";
33951__webpack_require__.r(__webpack_exports__);
33952/* harmony export */ __webpack_require__.d(__webpack_exports__, {
33953/* harmony export */ "timeoutWith": () => /* binding */ timeoutWith
33954/* harmony export */ });
33955/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
33956/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
33957/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(287);
33958/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(235);
33959/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(226);
33960/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
33961
33962
33963
33964
33965
33966function timeoutWith(due, withObservable, scheduler) {
33967 if (scheduler === void 0) {
33968 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__.async;
33969 }
33970 return function (source) {
33971 var absoluteTimeout = (0,_util_isDate__WEBPACK_IMPORTED_MODULE_2__.isDate)(due);
33972 var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
33973 return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
33974 };
33975}
33976var TimeoutWithOperator = /*@__PURE__*/ (function () {
33977 function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
33978 this.waitFor = waitFor;
33979 this.absoluteTimeout = absoluteTimeout;
33980 this.withObservable = withObservable;
33981 this.scheduler = scheduler;
33982 }
33983 TimeoutWithOperator.prototype.call = function (subscriber, source) {
33984 return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
33985 };
33986 return TimeoutWithOperator;
33987}());
33988var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
33989 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(TimeoutWithSubscriber, _super);
33990 function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
33991 var _this = _super.call(this, destination) || this;
33992 _this.absoluteTimeout = absoluteTimeout;
33993 _this.waitFor = waitFor;
33994 _this.withObservable = withObservable;
33995 _this.scheduler = scheduler;
33996 _this.action = null;
33997 _this.scheduleTimeout();
33998 return _this;
33999 }
34000 TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
34001 var withObservable = subscriber.withObservable;
34002 subscriber._unsubscribeAndRecycle();
34003 subscriber.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__.subscribeToResult)(subscriber, withObservable));
34004 };
34005 TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
34006 var action = this.action;
34007 if (action) {
34008 this.action = action.schedule(this, this.waitFor);
34009 }
34010 else {
34011 this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
34012 }
34013 };
34014 TimeoutWithSubscriber.prototype._next = function (value) {
34015 if (!this.absoluteTimeout) {
34016 this.scheduleTimeout();
34017 }
34018 _super.prototype._next.call(this, value);
34019 };
34020 TimeoutWithSubscriber.prototype._unsubscribe = function () {
34021 this.action = null;
34022 this.scheduler = null;
34023 this.withObservable = null;
34024 };
34025 return TimeoutWithSubscriber;
34026}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__.OuterSubscriber));
34027//# sourceMappingURL=timeoutWith.js.map
34028
34029
34030/***/ }),
34031/* 356 */
34032/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34033
34034"use strict";
34035__webpack_require__.r(__webpack_exports__);
34036/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34037/* harmony export */ "timestamp": () => /* binding */ timestamp,
34038/* harmony export */ "Timestamp": () => /* binding */ Timestamp
34039/* harmony export */ });
34040/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(212);
34041/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(223);
34042/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
34043
34044
34045function timestamp(scheduler) {
34046 if (scheduler === void 0) {
34047 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.async;
34048 }
34049 return (0,_map__WEBPACK_IMPORTED_MODULE_1__.map)(function (value) { return new Timestamp(value, scheduler.now()); });
34050}
34051var Timestamp = /*@__PURE__*/ (function () {
34052 function Timestamp(value, timestamp) {
34053 this.value = value;
34054 this.timestamp = timestamp;
34055 }
34056 return Timestamp;
34057}());
34058
34059//# sourceMappingURL=timestamp.js.map
34060
34061
34062/***/ }),
34063/* 357 */
34064/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34065
34066"use strict";
34067__webpack_require__.r(__webpack_exports__);
34068/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34069/* harmony export */ "toArray": () => /* binding */ toArray
34070/* harmony export */ });
34071/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(312);
34072/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
34073
34074function toArrayReducer(arr, item, index) {
34075 if (index === 0) {
34076 return [item];
34077 }
34078 arr.push(item);
34079 return arr;
34080}
34081function toArray() {
34082 return (0,_reduce__WEBPACK_IMPORTED_MODULE_0__.reduce)(toArrayReducer, []);
34083}
34084//# sourceMappingURL=toArray.js.map
34085
34086
34087/***/ }),
34088/* 358 */
34089/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34090
34091"use strict";
34092__webpack_require__.r(__webpack_exports__);
34093/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34094/* harmony export */ "window": () => /* binding */ window
34095/* harmony export */ });
34096/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
34097/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
34098/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
34099/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
34100/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34101
34102
34103
34104
34105function window(windowBoundaries) {
34106 return function windowOperatorFunction(source) {
34107 return source.lift(new WindowOperator(windowBoundaries));
34108 };
34109}
34110var WindowOperator = /*@__PURE__*/ (function () {
34111 function WindowOperator(windowBoundaries) {
34112 this.windowBoundaries = windowBoundaries;
34113 }
34114 WindowOperator.prototype.call = function (subscriber, source) {
34115 var windowSubscriber = new WindowSubscriber(subscriber);
34116 var sourceSubscription = source.subscribe(windowSubscriber);
34117 if (!sourceSubscription.closed) {
34118 windowSubscriber.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(windowSubscriber, this.windowBoundaries));
34119 }
34120 return sourceSubscription;
34121 };
34122 return WindowOperator;
34123}());
34124var WindowSubscriber = /*@__PURE__*/ (function (_super) {
34125 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(WindowSubscriber, _super);
34126 function WindowSubscriber(destination) {
34127 var _this = _super.call(this, destination) || this;
34128 _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_2__.Subject();
34129 destination.next(_this.window);
34130 return _this;
34131 }
34132 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34133 this.openWindow();
34134 };
34135 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
34136 this._error(error);
34137 };
34138 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
34139 this._complete();
34140 };
34141 WindowSubscriber.prototype._next = function (value) {
34142 this.window.next(value);
34143 };
34144 WindowSubscriber.prototype._error = function (err) {
34145 this.window.error(err);
34146 this.destination.error(err);
34147 };
34148 WindowSubscriber.prototype._complete = function () {
34149 this.window.complete();
34150 this.destination.complete();
34151 };
34152 WindowSubscriber.prototype._unsubscribe = function () {
34153 this.window = null;
34154 };
34155 WindowSubscriber.prototype.openWindow = function () {
34156 var prevWindow = this.window;
34157 if (prevWindow) {
34158 prevWindow.complete();
34159 }
34160 var destination = this.destination;
34161 var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_2__.Subject();
34162 destination.next(newWindow);
34163 };
34164 return WindowSubscriber;
34165}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
34166//# sourceMappingURL=window.js.map
34167
34168
34169/***/ }),
34170/* 359 */
34171/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34172
34173"use strict";
34174__webpack_require__.r(__webpack_exports__);
34175/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34176/* harmony export */ "windowCount": () => /* binding */ windowCount
34177/* harmony export */ });
34178/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
34179/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(168);
34180/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34181/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
34182
34183
34184
34185function windowCount(windowSize, startWindowEvery) {
34186 if (startWindowEvery === void 0) {
34187 startWindowEvery = 0;
34188 }
34189 return function windowCountOperatorFunction(source) {
34190 return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
34191 };
34192}
34193var WindowCountOperator = /*@__PURE__*/ (function () {
34194 function WindowCountOperator(windowSize, startWindowEvery) {
34195 this.windowSize = windowSize;
34196 this.startWindowEvery = startWindowEvery;
34197 }
34198 WindowCountOperator.prototype.call = function (subscriber, source) {
34199 return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
34200 };
34201 return WindowCountOperator;
34202}());
34203var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
34204 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(WindowCountSubscriber, _super);
34205 function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
34206 var _this = _super.call(this, destination) || this;
34207 _this.destination = destination;
34208 _this.windowSize = windowSize;
34209 _this.startWindowEvery = startWindowEvery;
34210 _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_1__.Subject()];
34211 _this.count = 0;
34212 destination.next(_this.windows[0]);
34213 return _this;
34214 }
34215 WindowCountSubscriber.prototype._next = function (value) {
34216 var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
34217 var destination = this.destination;
34218 var windowSize = this.windowSize;
34219 var windows = this.windows;
34220 var len = windows.length;
34221 for (var i = 0; i < len && !this.closed; i++) {
34222 windows[i].next(value);
34223 }
34224 var c = this.count - windowSize + 1;
34225 if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
34226 windows.shift().complete();
34227 }
34228 if (++this.count % startWindowEvery === 0 && !this.closed) {
34229 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__.Subject();
34230 windows.push(window_1);
34231 destination.next(window_1);
34232 }
34233 };
34234 WindowCountSubscriber.prototype._error = function (err) {
34235 var windows = this.windows;
34236 if (windows) {
34237 while (windows.length > 0 && !this.closed) {
34238 windows.shift().error(err);
34239 }
34240 }
34241 this.destination.error(err);
34242 };
34243 WindowCountSubscriber.prototype._complete = function () {
34244 var windows = this.windows;
34245 if (windows) {
34246 while (windows.length > 0 && !this.closed) {
34247 windows.shift().complete();
34248 }
34249 }
34250 this.destination.complete();
34251 };
34252 WindowCountSubscriber.prototype._unsubscribe = function () {
34253 this.count = 0;
34254 this.windows = null;
34255 };
34256 return WindowCountSubscriber;
34257}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__.Subscriber));
34258//# sourceMappingURL=windowCount.js.map
34259
34260
34261/***/ }),
34262/* 360 */
34263/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34264
34265"use strict";
34266__webpack_require__.r(__webpack_exports__);
34267/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34268/* harmony export */ "windowTime": () => /* binding */ windowTime
34269/* harmony export */ });
34270/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
34271/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(185);
34272/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
34273/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(168);
34274/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
34275/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
34276/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
34277
34278
34279
34280
34281
34282
34283function windowTime(windowTimeSpan) {
34284 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__.async;
34285 var windowCreationInterval = null;
34286 var maxWindowSize = Number.POSITIVE_INFINITY;
34287 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__.isScheduler)(arguments[3])) {
34288 scheduler = arguments[3];
34289 }
34290 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__.isScheduler)(arguments[2])) {
34291 scheduler = arguments[2];
34292 }
34293 else if ((0,_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__.isNumeric)(arguments[2])) {
34294 maxWindowSize = arguments[2];
34295 }
34296 if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__.isScheduler)(arguments[1])) {
34297 scheduler = arguments[1];
34298 }
34299 else if ((0,_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__.isNumeric)(arguments[1])) {
34300 windowCreationInterval = arguments[1];
34301 }
34302 return function windowTimeOperatorFunction(source) {
34303 return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
34304 };
34305}
34306var WindowTimeOperator = /*@__PURE__*/ (function () {
34307 function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
34308 this.windowTimeSpan = windowTimeSpan;
34309 this.windowCreationInterval = windowCreationInterval;
34310 this.maxWindowSize = maxWindowSize;
34311 this.scheduler = scheduler;
34312 }
34313 WindowTimeOperator.prototype.call = function (subscriber, source) {
34314 return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
34315 };
34316 return WindowTimeOperator;
34317}());
34318var CountedSubject = /*@__PURE__*/ (function (_super) {
34319 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(CountedSubject, _super);
34320 function CountedSubject() {
34321 var _this = _super !== null && _super.apply(this, arguments) || this;
34322 _this._numberOfNextedValues = 0;
34323 return _this;
34324 }
34325 CountedSubject.prototype.next = function (value) {
34326 this._numberOfNextedValues++;
34327 _super.prototype.next.call(this, value);
34328 };
34329 Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
34330 get: function () {
34331 return this._numberOfNextedValues;
34332 },
34333 enumerable: true,
34334 configurable: true
34335 });
34336 return CountedSubject;
34337}(_Subject__WEBPACK_IMPORTED_MODULE_4__.Subject));
34338var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
34339 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(WindowTimeSubscriber, _super);
34340 function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
34341 var _this = _super.call(this, destination) || this;
34342 _this.destination = destination;
34343 _this.windowTimeSpan = windowTimeSpan;
34344 _this.windowCreationInterval = windowCreationInterval;
34345 _this.maxWindowSize = maxWindowSize;
34346 _this.scheduler = scheduler;
34347 _this.windows = [];
34348 var window = _this.openWindow();
34349 if (windowCreationInterval !== null && windowCreationInterval >= 0) {
34350 var closeState = { subscriber: _this, window: window, context: null };
34351 var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
34352 _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
34353 _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
34354 }
34355 else {
34356 var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
34357 _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
34358 }
34359 return _this;
34360 }
34361 WindowTimeSubscriber.prototype._next = function (value) {
34362 var windows = this.windows;
34363 var len = windows.length;
34364 for (var i = 0; i < len; i++) {
34365 var window_1 = windows[i];
34366 if (!window_1.closed) {
34367 window_1.next(value);
34368 if (window_1.numberOfNextedValues >= this.maxWindowSize) {
34369 this.closeWindow(window_1);
34370 }
34371 }
34372 }
34373 };
34374 WindowTimeSubscriber.prototype._error = function (err) {
34375 var windows = this.windows;
34376 while (windows.length > 0) {
34377 windows.shift().error(err);
34378 }
34379 this.destination.error(err);
34380 };
34381 WindowTimeSubscriber.prototype._complete = function () {
34382 var windows = this.windows;
34383 while (windows.length > 0) {
34384 var window_2 = windows.shift();
34385 if (!window_2.closed) {
34386 window_2.complete();
34387 }
34388 }
34389 this.destination.complete();
34390 };
34391 WindowTimeSubscriber.prototype.openWindow = function () {
34392 var window = new CountedSubject();
34393 this.windows.push(window);
34394 var destination = this.destination;
34395 destination.next(window);
34396 return window;
34397 };
34398 WindowTimeSubscriber.prototype.closeWindow = function (window) {
34399 window.complete();
34400 var windows = this.windows;
34401 windows.splice(windows.indexOf(window), 1);
34402 };
34403 return WindowTimeSubscriber;
34404}(_Subscriber__WEBPACK_IMPORTED_MODULE_5__.Subscriber));
34405function dispatchWindowTimeSpanOnly(state) {
34406 var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
34407 if (window) {
34408 subscriber.closeWindow(window);
34409 }
34410 state.window = subscriber.openWindow();
34411 this.schedule(state, windowTimeSpan);
34412}
34413function dispatchWindowCreation(state) {
34414 var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
34415 var window = subscriber.openWindow();
34416 var action = this;
34417 var context = { action: action, subscription: null };
34418 var timeSpanState = { subscriber: subscriber, window: window, context: context };
34419 context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
34420 action.add(context.subscription);
34421 action.schedule(state, windowCreationInterval);
34422}
34423function dispatchWindowClose(state) {
34424 var subscriber = state.subscriber, window = state.window, context = state.context;
34425 if (context && context.action && context.subscription) {
34426 context.action.remove(context.subscription);
34427 }
34428 subscriber.closeWindow(window);
34429}
34430//# sourceMappingURL=windowTime.js.map
34431
34432
34433/***/ }),
34434/* 361 */
34435/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34436
34437"use strict";
34438__webpack_require__.r(__webpack_exports__);
34439/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34440/* harmony export */ "windowToggle": () => /* binding */ windowToggle
34441/* harmony export */ });
34442/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
34443/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
34444/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(174);
34445/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(235);
34446/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
34447/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34448
34449
34450
34451
34452
34453function windowToggle(openings, closingSelector) {
34454 return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
34455}
34456var WindowToggleOperator = /*@__PURE__*/ (function () {
34457 function WindowToggleOperator(openings, closingSelector) {
34458 this.openings = openings;
34459 this.closingSelector = closingSelector;
34460 }
34461 WindowToggleOperator.prototype.call = function (subscriber, source) {
34462 return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
34463 };
34464 return WindowToggleOperator;
34465}());
34466var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
34467 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(WindowToggleSubscriber, _super);
34468 function WindowToggleSubscriber(destination, openings, closingSelector) {
34469 var _this = _super.call(this, destination) || this;
34470 _this.openings = openings;
34471 _this.closingSelector = closingSelector;
34472 _this.contexts = [];
34473 _this.add(_this.openSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(_this, openings, openings));
34474 return _this;
34475 }
34476 WindowToggleSubscriber.prototype._next = function (value) {
34477 var contexts = this.contexts;
34478 if (contexts) {
34479 var len = contexts.length;
34480 for (var i = 0; i < len; i++) {
34481 contexts[i].window.next(value);
34482 }
34483 }
34484 };
34485 WindowToggleSubscriber.prototype._error = function (err) {
34486 var contexts = this.contexts;
34487 this.contexts = null;
34488 if (contexts) {
34489 var len = contexts.length;
34490 var index = -1;
34491 while (++index < len) {
34492 var context_1 = contexts[index];
34493 context_1.window.error(err);
34494 context_1.subscription.unsubscribe();
34495 }
34496 }
34497 _super.prototype._error.call(this, err);
34498 };
34499 WindowToggleSubscriber.prototype._complete = function () {
34500 var contexts = this.contexts;
34501 this.contexts = null;
34502 if (contexts) {
34503 var len = contexts.length;
34504 var index = -1;
34505 while (++index < len) {
34506 var context_2 = contexts[index];
34507 context_2.window.complete();
34508 context_2.subscription.unsubscribe();
34509 }
34510 }
34511 _super.prototype._complete.call(this);
34512 };
34513 WindowToggleSubscriber.prototype._unsubscribe = function () {
34514 var contexts = this.contexts;
34515 this.contexts = null;
34516 if (contexts) {
34517 var len = contexts.length;
34518 var index = -1;
34519 while (++index < len) {
34520 var context_3 = contexts[index];
34521 context_3.window.unsubscribe();
34522 context_3.subscription.unsubscribe();
34523 }
34524 }
34525 };
34526 WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34527 if (outerValue === this.openings) {
34528 var closingNotifier = void 0;
34529 try {
34530 var closingSelector = this.closingSelector;
34531 closingNotifier = closingSelector(innerValue);
34532 }
34533 catch (e) {
34534 return this.error(e);
34535 }
34536 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__.Subject();
34537 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_3__.Subscription();
34538 var context_4 = { window: window_1, subscription: subscription };
34539 this.contexts.push(context_4);
34540 var innerSubscription = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(this, closingNotifier, context_4);
34541 if (innerSubscription.closed) {
34542 this.closeWindow(this.contexts.length - 1);
34543 }
34544 else {
34545 innerSubscription.context = context_4;
34546 subscription.add(innerSubscription);
34547 }
34548 this.destination.next(window_1);
34549 }
34550 else {
34551 this.closeWindow(this.contexts.indexOf(outerValue));
34552 }
34553 };
34554 WindowToggleSubscriber.prototype.notifyError = function (err) {
34555 this.error(err);
34556 };
34557 WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
34558 if (inner !== this.openSubscription) {
34559 this.closeWindow(this.contexts.indexOf(inner.context));
34560 }
34561 };
34562 WindowToggleSubscriber.prototype.closeWindow = function (index) {
34563 if (index === -1) {
34564 return;
34565 }
34566 var contexts = this.contexts;
34567 var context = contexts[index];
34568 var window = context.window, subscription = context.subscription;
34569 contexts.splice(index, 1);
34570 window.complete();
34571 subscription.unsubscribe();
34572 };
34573 return WindowToggleSubscriber;
34574}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__.OuterSubscriber));
34575//# sourceMappingURL=windowToggle.js.map
34576
34577
34578/***/ }),
34579/* 362 */
34580/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34581
34582"use strict";
34583__webpack_require__.r(__webpack_exports__);
34584/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34585/* harmony export */ "windowWhen": () => /* binding */ windowWhen
34586/* harmony export */ });
34587/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
34588/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
34589/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(235);
34590/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(226);
34591/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34592
34593
34594
34595
34596function windowWhen(closingSelector) {
34597 return function windowWhenOperatorFunction(source) {
34598 return source.lift(new WindowOperator(closingSelector));
34599 };
34600}
34601var WindowOperator = /*@__PURE__*/ (function () {
34602 function WindowOperator(closingSelector) {
34603 this.closingSelector = closingSelector;
34604 }
34605 WindowOperator.prototype.call = function (subscriber, source) {
34606 return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
34607 };
34608 return WindowOperator;
34609}());
34610var WindowSubscriber = /*@__PURE__*/ (function (_super) {
34611 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(WindowSubscriber, _super);
34612 function WindowSubscriber(destination, closingSelector) {
34613 var _this = _super.call(this, destination) || this;
34614 _this.destination = destination;
34615 _this.closingSelector = closingSelector;
34616 _this.openWindow();
34617 return _this;
34618 }
34619 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34620 this.openWindow(innerSub);
34621 };
34622 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
34623 this._error(error);
34624 };
34625 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
34626 this.openWindow(innerSub);
34627 };
34628 WindowSubscriber.prototype._next = function (value) {
34629 this.window.next(value);
34630 };
34631 WindowSubscriber.prototype._error = function (err) {
34632 this.window.error(err);
34633 this.destination.error(err);
34634 this.unsubscribeClosingNotification();
34635 };
34636 WindowSubscriber.prototype._complete = function () {
34637 this.window.complete();
34638 this.destination.complete();
34639 this.unsubscribeClosingNotification();
34640 };
34641 WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
34642 if (this.closingNotification) {
34643 this.closingNotification.unsubscribe();
34644 }
34645 };
34646 WindowSubscriber.prototype.openWindow = function (innerSub) {
34647 if (innerSub === void 0) {
34648 innerSub = null;
34649 }
34650 if (innerSub) {
34651 this.remove(innerSub);
34652 innerSub.unsubscribe();
34653 }
34654 var prevWindow = this.window;
34655 if (prevWindow) {
34656 prevWindow.complete();
34657 }
34658 var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__.Subject();
34659 this.destination.next(window);
34660 var closingNotifier;
34661 try {
34662 var closingSelector = this.closingSelector;
34663 closingNotifier = closingSelector();
34664 }
34665 catch (e) {
34666 this.destination.error(e);
34667 this.window.error(e);
34668 return;
34669 }
34670 this.add(this.closingNotification = (0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__.subscribeToResult)(this, closingNotifier));
34671 };
34672 return WindowSubscriber;
34673}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__.OuterSubscriber));
34674//# sourceMappingURL=windowWhen.js.map
34675
34676
34677/***/ }),
34678/* 363 */
34679/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34680
34681"use strict";
34682__webpack_require__.r(__webpack_exports__);
34683/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34684/* harmony export */ "withLatestFrom": () => /* binding */ withLatestFrom
34685/* harmony export */ });
34686/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169);
34687/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(235);
34688/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(226);
34689/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
34690
34691
34692
34693function withLatestFrom() {
34694 var args = [];
34695 for (var _i = 0; _i < arguments.length; _i++) {
34696 args[_i] = arguments[_i];
34697 }
34698 return function (source) {
34699 var project;
34700 if (typeof args[args.length - 1] === 'function') {
34701 project = args.pop();
34702 }
34703 var observables = args;
34704 return source.lift(new WithLatestFromOperator(observables, project));
34705 };
34706}
34707var WithLatestFromOperator = /*@__PURE__*/ (function () {
34708 function WithLatestFromOperator(observables, project) {
34709 this.observables = observables;
34710 this.project = project;
34711 }
34712 WithLatestFromOperator.prototype.call = function (subscriber, source) {
34713 return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
34714 };
34715 return WithLatestFromOperator;
34716}());
34717var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
34718 tslib__WEBPACK_IMPORTED_MODULE_0__.__extends(WithLatestFromSubscriber, _super);
34719 function WithLatestFromSubscriber(destination, observables, project) {
34720 var _this = _super.call(this, destination) || this;
34721 _this.observables = observables;
34722 _this.project = project;
34723 _this.toRespond = [];
34724 var len = observables.length;
34725 _this.values = new Array(len);
34726 for (var i = 0; i < len; i++) {
34727 _this.toRespond.push(i);
34728 }
34729 for (var i = 0; i < len; i++) {
34730 var observable = observables[i];
34731 _this.add((0,_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__.subscribeToResult)(_this, observable, observable, i));
34732 }
34733 return _this;
34734 }
34735 WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
34736 this.values[outerIndex] = innerValue;
34737 var toRespond = this.toRespond;
34738 if (toRespond.length > 0) {
34739 var found = toRespond.indexOf(outerIndex);
34740 if (found !== -1) {
34741 toRespond.splice(found, 1);
34742 }
34743 }
34744 };
34745 WithLatestFromSubscriber.prototype.notifyComplete = function () {
34746 };
34747 WithLatestFromSubscriber.prototype._next = function (value) {
34748 if (this.toRespond.length === 0) {
34749 var args = [value].concat(this.values);
34750 if (this.project) {
34751 this._tryProject(args);
34752 }
34753 else {
34754 this.destination.next(args);
34755 }
34756 }
34757 };
34758 WithLatestFromSubscriber.prototype._tryProject = function (args) {
34759 var result;
34760 try {
34761 result = this.project.apply(this, args);
34762 }
34763 catch (err) {
34764 this.destination.error(err);
34765 return;
34766 }
34767 this.destination.next(result);
34768 };
34769 return WithLatestFromSubscriber;
34770}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__.OuterSubscriber));
34771//# sourceMappingURL=withLatestFrom.js.map
34772
34773
34774/***/ }),
34775/* 364 */
34776/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34777
34778"use strict";
34779__webpack_require__.r(__webpack_exports__);
34780/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34781/* harmony export */ "zip": () => /* binding */ zip
34782/* harmony export */ });
34783/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(266);
34784/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
34785
34786function zip() {
34787 var observables = [];
34788 for (var _i = 0; _i < arguments.length; _i++) {
34789 observables[_i] = arguments[_i];
34790 }
34791 return function zipOperatorFunction(source) {
34792 return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__.zip.apply(void 0, [source].concat(observables)));
34793 };
34794}
34795//# sourceMappingURL=zip.js.map
34796
34797
34798/***/ }),
34799/* 365 */
34800/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34801
34802"use strict";
34803__webpack_require__.r(__webpack_exports__);
34804/* harmony export */ __webpack_require__.d(__webpack_exports__, {
34805/* harmony export */ "zipAll": () => /* binding */ zipAll
34806/* harmony export */ });
34807/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(266);
34808/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
34809
34810function zipAll(project) {
34811 return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__.ZipOperator(project)); };
34812}
34813//# sourceMappingURL=zipAll.js.map
34814
34815
34816/***/ }),
34817/* 366 */,
34818/* 367 */,
34819/* 368 */,
34820/* 369 */
34821/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
34822
34823"use strict";
34824
34825var __importDefault = (this && this.__importDefault) || function (mod) {
34826 return (mod && mod.__esModule) ? mod : { "default": mod };
34827};
34828Object.defineProperty(exports, "__esModule", ({ value: true }));
34829var fast_glob_1 = __importDefault(__webpack_require__(59));
34830var os_1 = __importDefault(__webpack_require__(14));
34831var path_1 = __webpack_require__(13);
34832var rxjs_1 = __webpack_require__(165);
34833var operators_1 = __webpack_require__(268);
34834var vscode_uri_1 = __webpack_require__(148);
34835var fs_1 = __webpack_require__(40);
34836var constant_1 = __webpack_require__(44);
34837var util_1 = __webpack_require__(46);
34838var indexes = {};
34839var indexesFiles = {};
34840var queue = [];
34841var source$;
34842var gap = 100;
34843var count = 3;
34844var customProjectRootPatterns = constant_1.projectRootPatterns;
34845function initSource() {
34846 if (source$) {
34847 return;
34848 }
34849 source$ = new rxjs_1.Subject();
34850 source$.pipe(operators_1.concatMap(function (uri) {
34851 return rxjs_1.from(util_1.findProjectRoot(vscode_uri_1.URI.parse(uri).fsPath, customProjectRootPatterns)).pipe(operators_1.switchMap(function (projectRoot) {
34852 return rxjs_1.from(util_1.getRealPath(projectRoot));
34853 }), operators_1.filter(function (projectRoot) { return projectRoot && projectRoot !== os_1.default.homedir(); }), operators_1.map(function (projectRoot) { return ({
34854 uri: uri,
34855 projectRoot: projectRoot,
34856 }); }));
34857 }), operators_1.filter(function (_a) {
34858 var projectRoot = _a.projectRoot;
34859 if (!indexes[projectRoot]) {
34860 indexes[projectRoot] = true;
34861 return true;
34862 }
34863 return false;
34864 }), operators_1.concatMap(function (_a) {
34865 var projectRoot = _a.projectRoot;
34866 var indexPath = path_1.join(projectRoot, "**/*.vim");
34867 return rxjs_1.from(fast_glob_1.default([indexPath, "!**/node_modules/**"])).pipe(operators_1.catchError(function (error) {
34868 process.send({
34869 msglog: [
34870 "Index Workspace Error: " + indexPath,
34871 "Error => " + (error.stack || error.message || error),
34872 ].join("\n"),
34873 });
34874 return rxjs_1.of(undefined);
34875 }), operators_1.filter(function (list) { return list && list.length > 0; }), operators_1.concatMap(function (list) {
34876 return rxjs_1.of.apply(void 0, list.sort(function (a, b) { return a.length - b.length; })).pipe(operators_1.filter(function (fpath) {
34877 if (!indexesFiles[fpath]) {
34878 indexesFiles[fpath] = true;
34879 return true;
34880 }
34881 return false;
34882 }), operators_1.mergeMap(function (fpath) {
34883 return rxjs_1.timer(gap).pipe(operators_1.concatMap(function () {
34884 var content = fs_1.readFileSync(fpath).toString();
34885 return rxjs_1.from(util_1.handleParse(content)).pipe(operators_1.filter(function (res) { return res[0] !== null; }), operators_1.map(function (res) { return ({
34886 node: res[0],
34887 uri: vscode_uri_1.URI.file(fpath).toString(),
34888 }); }), operators_1.catchError(function (error) {
34889 process.send({
34890 msglog: fpath + ":\n" + (error.stack || error.message || error),
34891 });
34892 return rxjs_1.of(undefined);
34893 }));
34894 }));
34895 }, count));
34896 }));
34897 }), operators_1.filter(function (res) { return !!res; })).subscribe(function (res) {
34898 process.send({
34899 data: res,
34900 });
34901 }, function (error) {
34902 process.send({
34903 msglog: error.stack || error.message || error,
34904 });
34905 });
34906 if (queue.length) {
34907 queue.forEach(function (uri) {
34908 source$.next(uri);
34909 });
34910 queue = [];
34911 }
34912}
34913process.on("message", function (mess) {
34914 var uri = mess.uri, config = mess.config;
34915 if (uri) {
34916 if (source$) {
34917 source$.next(uri);
34918 }
34919 else {
34920 queue.push(uri);
34921 }
34922 }
34923 if (config) {
34924 if (config.gap !== undefined) {
34925 gap = config.gap;
34926 }
34927 if (config.count !== undefined) {
34928 count = config.count;
34929 }
34930 if (config.projectRootPatterns !== undefined) {
34931 customProjectRootPatterns = config.projectRootPatterns;
34932 }
34933 initSource();
34934 }
34935});
34936
34937
34938/***/ })
34939/******/ ]);
34940/************************************************************************/
34941/******/ // The module cache
34942/******/ var __webpack_module_cache__ = {};
34943/******/
34944/******/ // The require function
34945/******/ function __webpack_require__(moduleId) {
34946/******/ // Check if module is in cache
34947/******/ if(__webpack_module_cache__[moduleId]) {
34948/******/ return __webpack_module_cache__[moduleId].exports;
34949/******/ }
34950/******/ // Create a new module (and put it into the cache)
34951/******/ var module = __webpack_module_cache__[moduleId] = {
34952/******/ id: moduleId,
34953/******/ loaded: false,
34954/******/ exports: {}
34955/******/ };
34956/******/
34957/******/ // Execute the module function
34958/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
34959/******/
34960/******/ // Flag the module as loaded
34961/******/ module.loaded = true;
34962/******/
34963/******/ // Return the exports of the module
34964/******/ return module.exports;
34965/******/ }
34966/******/
34967/******/ // expose the module cache
34968/******/ __webpack_require__.c = __webpack_module_cache__;
34969/******/
34970/************************************************************************/
34971/******/ /* webpack/runtime/define property getters */
34972/******/ (() => {
34973/******/ // define getter functions for harmony exports
34974/******/ __webpack_require__.d = (exports, definition) => {
34975/******/ for(var key in definition) {
34976/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
34977/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
34978/******/ }
34979/******/ }
34980/******/ };
34981/******/ })();
34982/******/
34983/******/ /* webpack/runtime/hasOwnProperty shorthand */
34984/******/ (() => {
34985/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
34986/******/ })();
34987/******/
34988/******/ /* webpack/runtime/make namespace object */
34989/******/ (() => {
34990/******/ // define __esModule on exports
34991/******/ __webpack_require__.r = (exports) => {
34992/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
34993/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
34994/******/ }
34995/******/ Object.defineProperty(exports, '__esModule', { value: true });
34996/******/ };
34997/******/ })();
34998/******/
34999/******/ /* webpack/runtime/node module decorator */
35000/******/ (() => {
35001/******/ __webpack_require__.nmd = (module) => {
35002/******/ module.paths = [];
35003/******/ if (!module.children) module.children = [];
35004/******/ return module;
35005/******/ };
35006/******/ })();
35007/******/
35008/************************************************************************/
35009/******/ // module cache are used so entry inlining is disabled
35010/******/ // startup
35011/******/ // Load entry module and return exports
35012/******/ return __webpack_require__(__webpack_require__.s = 369);
35013/******/ })()
35014
35015));
\No newline at end of file