@dcloudio/uni-stacktracey 3.0.0-alpha-3061520221220001 → 3.0.0-alpha-3061620221230002

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -199,7 +199,14 @@ function parseItem(e, maxColumnWidths, isMP) {
199
199
  /* ------------------------------------------------------------------------ */
200
200
  var StackTracey$1 = StackTracey;
201
201
 
202
+ var sourceMapGenerator = {};
203
+
204
+ var base64Vlq = {};
205
+
206
+ var base64$1 = {};
207
+
202
208
  /* -*- Mode: js; js-indent-level: 2; -*- */
209
+
203
210
  /*
204
211
  * Copyright 2011 Mozilla Foundation and contributors
205
212
  * Licensed under the New BSD license. See LICENSE or:
@@ -212,19 +219,13 @@ const intToCharMap =
212
219
  /**
213
220
  * Encode an integer in the range of 0 to 63 to a single base 64 digit.
214
221
  */
215
- var encode$1 = function (number) {
222
+ base64$1.encode = function (number) {
216
223
  if (0 <= number && number < intToCharMap.length) {
217
224
  return intToCharMap[number]
218
225
  }
219
226
  throw new TypeError('Must be between 0 and 63: ' + number)
220
227
  };
221
228
 
222
- var base64$1 = {
223
- encode: encode$1
224
- };
225
-
226
- var base64 = base64$1;
227
-
228
229
  /* -*- Mode: js; js-indent-level: 2; -*- */
229
230
 
230
231
  /*
@@ -263,7 +264,7 @@ var base64 = base64$1;
263
264
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
264
265
  */
265
266
 
266
-
267
+ const base64 = base64$1;
267
268
 
268
269
  // A single base 64 digit can contain 6 bits of data. For the base 64 variable
269
270
  // length quantities we use in the source map spec, the first bit is the sign,
@@ -301,7 +302,7 @@ function toVLQSigned(aValue) {
301
302
  /**
302
303
  * Returns the base 64 VLQ encoded value.
303
304
  */
304
- var encode = function base64VLQ_encode(aValue) {
305
+ base64Vlq.encode = function base64VLQ_encode(aValue) {
305
306
  let encoded = '';
306
307
  let digit;
307
308
 
@@ -321,575 +322,571 @@ var encode = function base64VLQ_encode(aValue) {
321
322
  return encoded
322
323
  };
323
324
 
324
- var base64Vlq = {
325
- encode: encode
326
- };
327
-
328
- function createCommonjsModule(fn) {
329
- var module = { exports: {} };
330
- return fn(module, module.exports), module.exports;
331
- }
325
+ var util$4 = {};
332
326
 
333
327
  /* -*- Mode: js; js-indent-level: 2; -*- */
334
328
 
335
- var util$1 = createCommonjsModule(function (module, exports) {
336
- /*
337
- * Copyright 2011 Mozilla Foundation and contributors
338
- * Licensed under the New BSD license. See LICENSE or:
339
- * http://opensource.org/licenses/BSD-3-Clause
340
- */
341
-
342
- /**
343
- * This is a helper function for getting values from parameter/options
344
- * objects.
345
- *
346
- * @param args The object we are extracting values from
347
- * @param name The name of the property we are getting.
348
- * @param defaultValue An optional value to return if the property is missing
349
- * from the object. If this is not specified and the property is missing, an
350
- * error will be thrown.
351
- */
352
- function getArg(aArgs, aName, aDefaultValue) {
353
- if (aName in aArgs) {
354
- return aArgs[aName]
355
- } else if (arguments.length === 3) {
356
- return aDefaultValue
357
- }
358
- throw new Error('"' + aName + '" is a required argument.')
359
- }
360
- exports.getArg = getArg;
361
-
362
- const urlRegexp =
363
- /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
364
- const dataUrlRegexp = /^data:.+\,.+$/;
365
-
366
- function urlParse(aUrl) {
367
- const match = aUrl.match(urlRegexp);
368
- if (!match) {
369
- return null
370
- }
371
- return {
372
- scheme: match[1],
373
- auth: match[2],
374
- host: match[3],
375
- port: match[4],
376
- path: match[5],
377
- }
378
- }
379
- exports.urlParse = urlParse;
380
-
381
- function urlGenerate(aParsedUrl) {
382
- let url = '';
383
- if (aParsedUrl.scheme) {
384
- url += aParsedUrl.scheme + ':';
385
- }
386
- url += '//';
387
- if (aParsedUrl.auth) {
388
- url += aParsedUrl.auth + '@';
389
- }
390
- if (aParsedUrl.host) {
391
- url += aParsedUrl.host;
392
- }
393
- if (aParsedUrl.port) {
394
- url += ':' + aParsedUrl.port;
395
- }
396
- if (aParsedUrl.path) {
397
- url += aParsedUrl.path;
398
- }
399
- return url
400
- }
401
- exports.urlGenerate = urlGenerate;
402
-
403
- const MAX_CACHED_INPUTS = 32;
404
-
405
- /**
406
- * Takes some function `f(input) -> result` and returns a memoized version of
407
- * `f`.
408
- *
409
- * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The
410
- * memoization is a dumb-simple, linear least-recently-used cache.
411
- */
412
- function lruMemoize(f) {
413
- const cache = [];
414
-
415
- return function (input) {
416
- for (let i = 0; i < cache.length; i++) {
417
- if (cache[i].input === input) {
418
- const temp = cache[0];
419
- cache[0] = cache[i];
420
- cache[i] = temp;
421
- return cache[0].result
422
- }
423
- }
424
-
425
- const result = f(input);
426
-
427
- cache.unshift({
428
- input,
429
- result,
430
- });
431
-
432
- if (cache.length > MAX_CACHED_INPUTS) {
433
- cache.pop();
434
- }
435
-
436
- return result
437
- }
438
- }
439
-
440
- /**
441
- * Normalizes a path, or the path portion of a URL:
442
- *
443
- * - Replaces consecutive slashes with one slash.
444
- * - Removes unnecessary '.' parts.
445
- * - Removes unnecessary '<dir>/..' parts.
446
- *
447
- * Based on code in the Node.js 'path' core module.
448
- *
449
- * @param aPath The path or url to normalize.
450
- */
451
- const normalize = lruMemoize(function normalize(aPath) {
452
- let path = aPath;
453
- const url = urlParse(aPath);
454
- if (url) {
455
- if (!url.path) {
456
- return aPath
457
- }
458
- path = url.path;
459
- }
460
- const isAbsolute = exports.isAbsolute(path);
461
-
462
- // Split the path into parts between `/` characters. This is much faster than
463
- // using `.split(/\/+/g)`.
464
- const parts = [];
465
- let start = 0;
466
- let i = 0;
467
- while (true) {
468
- start = i;
469
- i = path.indexOf('/', start);
470
- if (i === -1) {
471
- parts.push(path.slice(start));
472
- break
473
- } else {
474
- parts.push(path.slice(start, i));
475
- while (i < path.length && path[i] === '/') {
476
- i++;
477
- }
478
- }
479
- }
480
-
481
- let up = 0;
482
- for (i = parts.length - 1; i >= 0; i--) {
483
- const part = parts[i];
484
- if (part === '.') {
485
- parts.splice(i, 1);
486
- } else if (part === '..') {
487
- up++;
488
- } else if (up > 0) {
489
- if (part === '') {
490
- // The first part is blank if the path is absolute. Trying to go
491
- // above the root is a no-op. Therefore we can remove all '..' parts
492
- // directly after the root.
493
- parts.splice(i + 1, up);
494
- up = 0;
495
- } else {
496
- parts.splice(i, 2);
497
- up--;
498
- }
499
- }
500
- }
501
- path = parts.join('/');
502
-
503
- if (path === '') {
504
- path = isAbsolute ? '/' : '.';
505
- }
506
-
507
- if (url) {
508
- url.path = path;
509
- return urlGenerate(url)
510
- }
511
- return path
512
- });
513
- exports.normalize = normalize;
514
-
515
- /**
516
- * Joins two paths/URLs.
517
- *
518
- * @param aRoot The root path or URL.
519
- * @param aPath The path or URL to be joined with the root.
520
- *
521
- * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
522
- * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
523
- * first.
524
- * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
525
- * is updated with the result and aRoot is returned. Otherwise the result
526
- * is returned.
527
- * - If aPath is absolute, the result is aPath.
528
- * - Otherwise the two paths are joined with a slash.
529
- * - Joining for example 'http://' and 'www.example.com' is also supported.
530
- */
531
- function join(aRoot, aPath) {
532
- if (aRoot === '') {
533
- aRoot = '.';
534
- }
535
- if (aPath === '') {
536
- aPath = '.';
537
- }
538
- const aPathUrl = urlParse(aPath);
539
- const aRootUrl = urlParse(aRoot);
540
- if (aRootUrl) {
541
- aRoot = aRootUrl.path || '/';
542
- }
543
-
544
- // `join(foo, '//www.example.org')`
545
- if (aPathUrl && !aPathUrl.scheme) {
546
- if (aRootUrl) {
547
- aPathUrl.scheme = aRootUrl.scheme;
548
- }
549
- return urlGenerate(aPathUrl)
550
- }
551
-
552
- if (aPathUrl || aPath.match(dataUrlRegexp)) {
553
- return aPath
554
- }
555
-
556
- // `join('http://', 'www.example.com')`
557
- if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
558
- aRootUrl.host = aPath;
559
- return urlGenerate(aRootUrl)
560
- }
561
-
562
- const joined =
563
- aPath.charAt(0) === '/'
564
- ? aPath
565
- : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
566
-
567
- if (aRootUrl) {
568
- aRootUrl.path = joined;
569
- return urlGenerate(aRootUrl)
570
- }
571
- return joined
572
- }
573
- exports.join = join;
574
-
575
- exports.isAbsolute = function (aPath) {
576
- return aPath.charAt(0) === '/' || urlRegexp.test(aPath)
577
- };
578
-
579
- /**
580
- * Make a path relative to a URL or another path.
581
- *
582
- * @param aRoot The root path or URL.
583
- * @param aPath The path or URL to be made relative to aRoot.
584
- */
585
- function relative(aRoot, aPath) {
586
- if (aRoot === '') {
587
- aRoot = '.';
588
- }
589
-
590
- aRoot = aRoot.replace(/\/$/, '');
591
-
592
- // It is possible for the path to be above the root. In this case, simply
593
- // checking whether the root is a prefix of the path won't work. Instead, we
594
- // need to remove components from the root one by one, until either we find
595
- // a prefix that fits, or we run out of components to remove.
596
- let level = 0;
597
- while (aPath.indexOf(aRoot + '/') !== 0) {
598
- const index = aRoot.lastIndexOf('/');
599
- if (index < 0) {
600
- return aPath
601
- }
602
-
603
- // If the only part of the root that is left is the scheme (i.e. http://,
604
- // file:///, etc.), one or more slashes (/), or simply nothing at all, we
605
- // have exhausted all components, so the path is not relative to the root.
606
- aRoot = aRoot.slice(0, index);
607
- if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
608
- return aPath
609
- }
610
-
611
- ++level;
612
- }
613
-
614
- // Make sure we add a "../" for each component we removed from the root.
615
- return Array(level + 1).join('../') + aPath.substr(aRoot.length + 1)
616
- }
617
- exports.relative = relative;
618
-
619
- const supportsNullProto = (function () {
620
- const obj = Object.create(null);
621
- return !('__proto__' in obj)
622
- })();
623
-
624
- function identity(s) {
625
- return s
626
- }
627
-
628
- /**
629
- * Because behavior goes wacky when you set `__proto__` on objects, we
630
- * have to prefix all the strings in our set with an arbitrary character.
631
- *
632
- * See https://github.com/mozilla/source-map/pull/31 and
633
- * https://github.com/mozilla/source-map/issues/30
634
- *
635
- * @param String aStr
636
- */
637
- function toSetString(aStr) {
638
- if (isProtoString(aStr)) {
639
- return '$' + aStr
640
- }
641
-
642
- return aStr
643
- }
644
- exports.toSetString = supportsNullProto ? identity : toSetString;
645
-
646
- function fromSetString(aStr) {
647
- if (isProtoString(aStr)) {
648
- return aStr.slice(1)
649
- }
650
-
651
- return aStr
652
- }
653
- exports.fromSetString = supportsNullProto ? identity : fromSetString;
654
-
655
- function isProtoString(s) {
656
- if (!s) {
657
- return false
658
- }
659
-
660
- const length = s.length;
661
-
662
- if (length < 9 /* "__proto__".length */) {
663
- return false
664
- }
665
-
666
- /* eslint-disable no-multi-spaces */
667
- if (
668
- s.charCodeAt(length - 1) !== 95 /* '_' */ ||
669
- s.charCodeAt(length - 2) !== 95 /* '_' */ ||
670
- s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
671
- s.charCodeAt(length - 4) !== 116 /* 't' */ ||
672
- s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
673
- s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
674
- s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
675
- s.charCodeAt(length - 8) !== 95 /* '_' */ ||
676
- s.charCodeAt(length - 9) !== 95 /* '_' */
677
- ) {
678
- return false
679
- }
680
- /* eslint-enable no-multi-spaces */
681
-
682
- for (let i = length - 10; i >= 0; i--) {
683
- if (s.charCodeAt(i) !== 36 /* '$' */) {
684
- return false
685
- }
686
- }
687
-
688
- return true
689
- }
690
-
691
- /**
692
- * Comparator between two mappings where the original positions are compared.
693
- *
694
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
695
- * mappings with the same original source/line/column, but different generated
696
- * line and column the same. Useful when searching for a mapping with a
697
- * stubbed out mapping.
698
- */
699
- function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
700
- let cmp = strcmp(mappingA.source, mappingB.source);
701
- if (cmp !== 0) {
702
- return cmp
703
- }
704
-
705
- cmp = mappingA.originalLine - mappingB.originalLine;
706
- if (cmp !== 0) {
707
- return cmp
708
- }
709
-
710
- cmp = mappingA.originalColumn - mappingB.originalColumn;
711
- if (cmp !== 0 || onlyCompareOriginal) {
712
- return cmp
713
- }
714
-
715
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
716
- if (cmp !== 0) {
717
- return cmp
718
- }
719
-
720
- cmp = mappingA.generatedLine - mappingB.generatedLine;
721
- if (cmp !== 0) {
722
- return cmp
723
- }
724
-
725
- return strcmp(mappingA.name, mappingB.name)
726
- }
727
- exports.compareByOriginalPositions = compareByOriginalPositions;
728
-
729
- /**
730
- * Comparator between two mappings with deflated source and name indices where
731
- * the generated positions are compared.
732
- *
733
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
734
- * mappings with the same generated line and column, but different
735
- * source/name/original line and column the same. Useful when searching for a
736
- * mapping with a stubbed out mapping.
737
- */
738
- function compareByGeneratedPositionsDeflated(
739
- mappingA,
740
- mappingB,
741
- onlyCompareGenerated
742
- ) {
743
- let cmp = mappingA.generatedLine - mappingB.generatedLine;
744
- if (cmp !== 0) {
745
- return cmp
746
- }
747
-
748
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
749
- if (cmp !== 0 || onlyCompareGenerated) {
750
- return cmp
751
- }
752
-
753
- cmp = strcmp(mappingA.source, mappingB.source);
754
- if (cmp !== 0) {
755
- return cmp
756
- }
757
-
758
- cmp = mappingA.originalLine - mappingB.originalLine;
759
- if (cmp !== 0) {
760
- return cmp
761
- }
762
-
763
- cmp = mappingA.originalColumn - mappingB.originalColumn;
764
- if (cmp !== 0) {
765
- return cmp
766
- }
767
-
768
- return strcmp(mappingA.name, mappingB.name)
769
- }
770
- exports.compareByGeneratedPositionsDeflated =
771
- compareByGeneratedPositionsDeflated;
772
-
773
- function strcmp(aStr1, aStr2) {
774
- if (aStr1 === aStr2) {
775
- return 0
776
- }
777
-
778
- if (aStr1 === null) {
779
- return 1 // aStr2 !== null
780
- }
781
-
782
- if (aStr2 === null) {
783
- return -1 // aStr1 !== null
784
- }
785
-
786
- if (aStr1 > aStr2) {
787
- return 1
788
- }
789
-
790
- return -1
791
- }
792
-
793
- /**
794
- * Comparator between two mappings with inflated source and name strings where
795
- * the generated positions are compared.
796
- */
797
- function compareByGeneratedPositionsInflated(mappingA, mappingB) {
798
- let cmp = mappingA.generatedLine - mappingB.generatedLine;
799
- if (cmp !== 0) {
800
- return cmp
801
- }
802
-
803
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
804
- if (cmp !== 0) {
805
- return cmp
806
- }
807
-
808
- cmp = strcmp(mappingA.source, mappingB.source);
809
- if (cmp !== 0) {
810
- return cmp
811
- }
812
-
813
- cmp = mappingA.originalLine - mappingB.originalLine;
814
- if (cmp !== 0) {
815
- return cmp
816
- }
817
-
818
- cmp = mappingA.originalColumn - mappingB.originalColumn;
819
- if (cmp !== 0) {
820
- return cmp
821
- }
822
-
823
- return strcmp(mappingA.name, mappingB.name)
824
- }
825
- exports.compareByGeneratedPositionsInflated =
826
- compareByGeneratedPositionsInflated;
827
-
828
- /**
829
- * Strip any JSON XSSI avoidance prefix from the string (as documented
830
- * in the source maps specification), and then parse the string as
831
- * JSON.
832
- */
833
- function parseSourceMapInput(str) {
834
- return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''))
835
- }
836
- exports.parseSourceMapInput = parseSourceMapInput;
837
-
838
- /**
839
- * Compute the URL of a source given the the source root, the source's
840
- * URL, and the source map's URL.
841
- */
842
- function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
843
- sourceURL = sourceURL || '';
844
-
845
- if (sourceRoot) {
846
- // This follows what Chrome does.
847
- if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
848
- sourceRoot += '/';
849
- }
850
- // The spec says:
851
- // Line 4: An optional source root, useful for relocating source
852
- // files on a server or removing repeated values in the
853
- // “sources” entry. This value is prepended to the individual
854
- // entries in the “source” field.
855
- sourceURL = sourceRoot + sourceURL;
856
- }
857
-
858
- // Historically, SourceMapConsumer did not take the sourceMapURL as
859
- // a parameter. This mode is still somewhat supported, which is why
860
- // this code block is conditional. However, it's preferable to pass
861
- // the source map URL to SourceMapConsumer, so that this function
862
- // can implement the source URL resolution algorithm as outlined in
863
- // the spec. This block is basically the equivalent of:
864
- // new URL(sourceURL, sourceMapURL).toString()
865
- // ... except it avoids using URL, which wasn't available in the
866
- // older releases of node still supported by this library.
867
- //
868
- // The spec says:
869
- // If the sources are not absolute URLs after prepending of the
870
- // “sourceRoot”, the sources are resolved relative to the
871
- // SourceMap (like resolving script src in a html document).
872
- if (sourceMapURL) {
873
- const parsed = urlParse(sourceMapURL);
874
- if (!parsed) {
875
- throw new Error('sourceMapURL could not be parsed')
876
- }
877
- if (parsed.path) {
878
- // Strip the last path component, but keep the "/".
879
- const index = parsed.path.lastIndexOf('/');
880
- if (index >= 0) {
881
- parsed.path = parsed.path.substring(0, index + 1);
882
- }
883
- }
884
- sourceURL = join(urlGenerate(parsed), sourceURL);
885
- }
886
-
887
- return normalize(sourceURL)
888
- }
889
- exports.computeSourceURL = computeSourceURL;
890
- });
329
+ (function (exports) {
330
+ /*
331
+ * Copyright 2011 Mozilla Foundation and contributors
332
+ * Licensed under the New BSD license. See LICENSE or:
333
+ * http://opensource.org/licenses/BSD-3-Clause
334
+ */
335
+
336
+ /**
337
+ * This is a helper function for getting values from parameter/options
338
+ * objects.
339
+ *
340
+ * @param args The object we are extracting values from
341
+ * @param name The name of the property we are getting.
342
+ * @param defaultValue An optional value to return if the property is missing
343
+ * from the object. If this is not specified and the property is missing, an
344
+ * error will be thrown.
345
+ */
346
+ function getArg(aArgs, aName, aDefaultValue) {
347
+ if (aName in aArgs) {
348
+ return aArgs[aName]
349
+ } else if (arguments.length === 3) {
350
+ return aDefaultValue
351
+ }
352
+ throw new Error('"' + aName + '" is a required argument.')
353
+ }
354
+ exports.getArg = getArg;
355
+
356
+ const urlRegexp =
357
+ /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
358
+ const dataUrlRegexp = /^data:.+\,.+$/;
359
+
360
+ function urlParse(aUrl) {
361
+ const match = aUrl.match(urlRegexp);
362
+ if (!match) {
363
+ return null
364
+ }
365
+ return {
366
+ scheme: match[1],
367
+ auth: match[2],
368
+ host: match[3],
369
+ port: match[4],
370
+ path: match[5],
371
+ }
372
+ }
373
+ exports.urlParse = urlParse;
374
+
375
+ function urlGenerate(aParsedUrl) {
376
+ let url = '';
377
+ if (aParsedUrl.scheme) {
378
+ url += aParsedUrl.scheme + ':';
379
+ }
380
+ url += '//';
381
+ if (aParsedUrl.auth) {
382
+ url += aParsedUrl.auth + '@';
383
+ }
384
+ if (aParsedUrl.host) {
385
+ url += aParsedUrl.host;
386
+ }
387
+ if (aParsedUrl.port) {
388
+ url += ':' + aParsedUrl.port;
389
+ }
390
+ if (aParsedUrl.path) {
391
+ url += aParsedUrl.path;
392
+ }
393
+ return url
394
+ }
395
+ exports.urlGenerate = urlGenerate;
396
+
397
+ const MAX_CACHED_INPUTS = 32;
398
+
399
+ /**
400
+ * Takes some function `f(input) -> result` and returns a memoized version of
401
+ * `f`.
402
+ *
403
+ * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The
404
+ * memoization is a dumb-simple, linear least-recently-used cache.
405
+ */
406
+ function lruMemoize(f) {
407
+ const cache = [];
408
+
409
+ return function (input) {
410
+ for (let i = 0; i < cache.length; i++) {
411
+ if (cache[i].input === input) {
412
+ const temp = cache[0];
413
+ cache[0] = cache[i];
414
+ cache[i] = temp;
415
+ return cache[0].result
416
+ }
417
+ }
418
+
419
+ const result = f(input);
420
+
421
+ cache.unshift({
422
+ input,
423
+ result,
424
+ });
425
+
426
+ if (cache.length > MAX_CACHED_INPUTS) {
427
+ cache.pop();
428
+ }
429
+
430
+ return result
431
+ }
432
+ }
433
+
434
+ /**
435
+ * Normalizes a path, or the path portion of a URL:
436
+ *
437
+ * - Replaces consecutive slashes with one slash.
438
+ * - Removes unnecessary '.' parts.
439
+ * - Removes unnecessary '<dir>/..' parts.
440
+ *
441
+ * Based on code in the Node.js 'path' core module.
442
+ *
443
+ * @param aPath The path or url to normalize.
444
+ */
445
+ const normalize = lruMemoize(function normalize(aPath) {
446
+ let path = aPath;
447
+ const url = urlParse(aPath);
448
+ if (url) {
449
+ if (!url.path) {
450
+ return aPath
451
+ }
452
+ path = url.path;
453
+ }
454
+ const isAbsolute = exports.isAbsolute(path);
455
+
456
+ // Split the path into parts between `/` characters. This is much faster than
457
+ // using `.split(/\/+/g)`.
458
+ const parts = [];
459
+ let start = 0;
460
+ let i = 0;
461
+ while (true) {
462
+ start = i;
463
+ i = path.indexOf('/', start);
464
+ if (i === -1) {
465
+ parts.push(path.slice(start));
466
+ break
467
+ } else {
468
+ parts.push(path.slice(start, i));
469
+ while (i < path.length && path[i] === '/') {
470
+ i++;
471
+ }
472
+ }
473
+ }
474
+
475
+ let up = 0;
476
+ for (i = parts.length - 1; i >= 0; i--) {
477
+ const part = parts[i];
478
+ if (part === '.') {
479
+ parts.splice(i, 1);
480
+ } else if (part === '..') {
481
+ up++;
482
+ } else if (up > 0) {
483
+ if (part === '') {
484
+ // The first part is blank if the path is absolute. Trying to go
485
+ // above the root is a no-op. Therefore we can remove all '..' parts
486
+ // directly after the root.
487
+ parts.splice(i + 1, up);
488
+ up = 0;
489
+ } else {
490
+ parts.splice(i, 2);
491
+ up--;
492
+ }
493
+ }
494
+ }
495
+ path = parts.join('/');
496
+
497
+ if (path === '') {
498
+ path = isAbsolute ? '/' : '.';
499
+ }
500
+
501
+ if (url) {
502
+ url.path = path;
503
+ return urlGenerate(url)
504
+ }
505
+ return path
506
+ });
507
+ exports.normalize = normalize;
508
+
509
+ /**
510
+ * Joins two paths/URLs.
511
+ *
512
+ * @param aRoot The root path or URL.
513
+ * @param aPath The path or URL to be joined with the root.
514
+ *
515
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
516
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
517
+ * first.
518
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
519
+ * is updated with the result and aRoot is returned. Otherwise the result
520
+ * is returned.
521
+ * - If aPath is absolute, the result is aPath.
522
+ * - Otherwise the two paths are joined with a slash.
523
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
524
+ */
525
+ function join(aRoot, aPath) {
526
+ if (aRoot === '') {
527
+ aRoot = '.';
528
+ }
529
+ if (aPath === '') {
530
+ aPath = '.';
531
+ }
532
+ const aPathUrl = urlParse(aPath);
533
+ const aRootUrl = urlParse(aRoot);
534
+ if (aRootUrl) {
535
+ aRoot = aRootUrl.path || '/';
536
+ }
537
+
538
+ // `join(foo, '//www.example.org')`
539
+ if (aPathUrl && !aPathUrl.scheme) {
540
+ if (aRootUrl) {
541
+ aPathUrl.scheme = aRootUrl.scheme;
542
+ }
543
+ return urlGenerate(aPathUrl)
544
+ }
545
+
546
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
547
+ return aPath
548
+ }
549
+
550
+ // `join('http://', 'www.example.com')`
551
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
552
+ aRootUrl.host = aPath;
553
+ return urlGenerate(aRootUrl)
554
+ }
555
+
556
+ const joined =
557
+ aPath.charAt(0) === '/'
558
+ ? aPath
559
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
560
+
561
+ if (aRootUrl) {
562
+ aRootUrl.path = joined;
563
+ return urlGenerate(aRootUrl)
564
+ }
565
+ return joined
566
+ }
567
+ exports.join = join;
568
+
569
+ exports.isAbsolute = function (aPath) {
570
+ return aPath.charAt(0) === '/' || urlRegexp.test(aPath)
571
+ };
572
+
573
+ /**
574
+ * Make a path relative to a URL or another path.
575
+ *
576
+ * @param aRoot The root path or URL.
577
+ * @param aPath The path or URL to be made relative to aRoot.
578
+ */
579
+ function relative(aRoot, aPath) {
580
+ if (aRoot === '') {
581
+ aRoot = '.';
582
+ }
583
+
584
+ aRoot = aRoot.replace(/\/$/, '');
585
+
586
+ // It is possible for the path to be above the root. In this case, simply
587
+ // checking whether the root is a prefix of the path won't work. Instead, we
588
+ // need to remove components from the root one by one, until either we find
589
+ // a prefix that fits, or we run out of components to remove.
590
+ let level = 0;
591
+ while (aPath.indexOf(aRoot + '/') !== 0) {
592
+ const index = aRoot.lastIndexOf('/');
593
+ if (index < 0) {
594
+ return aPath
595
+ }
596
+
597
+ // If the only part of the root that is left is the scheme (i.e. http://,
598
+ // file:///, etc.), one or more slashes (/), or simply nothing at all, we
599
+ // have exhausted all components, so the path is not relative to the root.
600
+ aRoot = aRoot.slice(0, index);
601
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
602
+ return aPath
603
+ }
604
+
605
+ ++level;
606
+ }
607
+
608
+ // Make sure we add a "../" for each component we removed from the root.
609
+ return Array(level + 1).join('../') + aPath.substr(aRoot.length + 1)
610
+ }
611
+ exports.relative = relative;
612
+
613
+ const supportsNullProto = (function () {
614
+ const obj = Object.create(null);
615
+ return !('__proto__' in obj)
616
+ })();
617
+
618
+ function identity(s) {
619
+ return s
620
+ }
621
+
622
+ /**
623
+ * Because behavior goes wacky when you set `__proto__` on objects, we
624
+ * have to prefix all the strings in our set with an arbitrary character.
625
+ *
626
+ * See https://github.com/mozilla/source-map/pull/31 and
627
+ * https://github.com/mozilla/source-map/issues/30
628
+ *
629
+ * @param String aStr
630
+ */
631
+ function toSetString(aStr) {
632
+ if (isProtoString(aStr)) {
633
+ return '$' + aStr
634
+ }
635
+
636
+ return aStr
637
+ }
638
+ exports.toSetString = supportsNullProto ? identity : toSetString;
639
+
640
+ function fromSetString(aStr) {
641
+ if (isProtoString(aStr)) {
642
+ return aStr.slice(1)
643
+ }
644
+
645
+ return aStr
646
+ }
647
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
648
+
649
+ function isProtoString(s) {
650
+ if (!s) {
651
+ return false
652
+ }
653
+
654
+ const length = s.length;
655
+
656
+ if (length < 9 /* "__proto__".length */) {
657
+ return false
658
+ }
659
+
660
+ /* eslint-disable no-multi-spaces */
661
+ if (
662
+ s.charCodeAt(length - 1) !== 95 /* '_' */ ||
663
+ s.charCodeAt(length - 2) !== 95 /* '_' */ ||
664
+ s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
665
+ s.charCodeAt(length - 4) !== 116 /* 't' */ ||
666
+ s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
667
+ s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
668
+ s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
669
+ s.charCodeAt(length - 8) !== 95 /* '_' */ ||
670
+ s.charCodeAt(length - 9) !== 95 /* '_' */
671
+ ) {
672
+ return false
673
+ }
674
+ /* eslint-enable no-multi-spaces */
675
+
676
+ for (let i = length - 10; i >= 0; i--) {
677
+ if (s.charCodeAt(i) !== 36 /* '$' */) {
678
+ return false
679
+ }
680
+ }
681
+
682
+ return true
683
+ }
684
+
685
+ /**
686
+ * Comparator between two mappings where the original positions are compared.
687
+ *
688
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
689
+ * mappings with the same original source/line/column, but different generated
690
+ * line and column the same. Useful when searching for a mapping with a
691
+ * stubbed out mapping.
692
+ */
693
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
694
+ let cmp = strcmp(mappingA.source, mappingB.source);
695
+ if (cmp !== 0) {
696
+ return cmp
697
+ }
698
+
699
+ cmp = mappingA.originalLine - mappingB.originalLine;
700
+ if (cmp !== 0) {
701
+ return cmp
702
+ }
703
+
704
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
705
+ if (cmp !== 0 || onlyCompareOriginal) {
706
+ return cmp
707
+ }
708
+
709
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
710
+ if (cmp !== 0) {
711
+ return cmp
712
+ }
713
+
714
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
715
+ if (cmp !== 0) {
716
+ return cmp
717
+ }
718
+
719
+ return strcmp(mappingA.name, mappingB.name)
720
+ }
721
+ exports.compareByOriginalPositions = compareByOriginalPositions;
722
+
723
+ /**
724
+ * Comparator between two mappings with deflated source and name indices where
725
+ * the generated positions are compared.
726
+ *
727
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
728
+ * mappings with the same generated line and column, but different
729
+ * source/name/original line and column the same. Useful when searching for a
730
+ * mapping with a stubbed out mapping.
731
+ */
732
+ function compareByGeneratedPositionsDeflated(
733
+ mappingA,
734
+ mappingB,
735
+ onlyCompareGenerated
736
+ ) {
737
+ let cmp = mappingA.generatedLine - mappingB.generatedLine;
738
+ if (cmp !== 0) {
739
+ return cmp
740
+ }
741
+
742
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
743
+ if (cmp !== 0 || onlyCompareGenerated) {
744
+ return cmp
745
+ }
746
+
747
+ cmp = strcmp(mappingA.source, mappingB.source);
748
+ if (cmp !== 0) {
749
+ return cmp
750
+ }
751
+
752
+ cmp = mappingA.originalLine - mappingB.originalLine;
753
+ if (cmp !== 0) {
754
+ return cmp
755
+ }
756
+
757
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
758
+ if (cmp !== 0) {
759
+ return cmp
760
+ }
761
+
762
+ return strcmp(mappingA.name, mappingB.name)
763
+ }
764
+ exports.compareByGeneratedPositionsDeflated =
765
+ compareByGeneratedPositionsDeflated;
766
+
767
+ function strcmp(aStr1, aStr2) {
768
+ if (aStr1 === aStr2) {
769
+ return 0
770
+ }
771
+
772
+ if (aStr1 === null) {
773
+ return 1 // aStr2 !== null
774
+ }
775
+
776
+ if (aStr2 === null) {
777
+ return -1 // aStr1 !== null
778
+ }
779
+
780
+ if (aStr1 > aStr2) {
781
+ return 1
782
+ }
783
+
784
+ return -1
785
+ }
786
+
787
+ /**
788
+ * Comparator between two mappings with inflated source and name strings where
789
+ * the generated positions are compared.
790
+ */
791
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
792
+ let cmp = mappingA.generatedLine - mappingB.generatedLine;
793
+ if (cmp !== 0) {
794
+ return cmp
795
+ }
796
+
797
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
798
+ if (cmp !== 0) {
799
+ return cmp
800
+ }
801
+
802
+ cmp = strcmp(mappingA.source, mappingB.source);
803
+ if (cmp !== 0) {
804
+ return cmp
805
+ }
806
+
807
+ cmp = mappingA.originalLine - mappingB.originalLine;
808
+ if (cmp !== 0) {
809
+ return cmp
810
+ }
811
+
812
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
813
+ if (cmp !== 0) {
814
+ return cmp
815
+ }
816
+
817
+ return strcmp(mappingA.name, mappingB.name)
818
+ }
819
+ exports.compareByGeneratedPositionsInflated =
820
+ compareByGeneratedPositionsInflated;
821
+
822
+ /**
823
+ * Strip any JSON XSSI avoidance prefix from the string (as documented
824
+ * in the source maps specification), and then parse the string as
825
+ * JSON.
826
+ */
827
+ function parseSourceMapInput(str) {
828
+ return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''))
829
+ }
830
+ exports.parseSourceMapInput = parseSourceMapInput;
831
+
832
+ /**
833
+ * Compute the URL of a source given the the source root, the source's
834
+ * URL, and the source map's URL.
835
+ */
836
+ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
837
+ sourceURL = sourceURL || '';
838
+
839
+ if (sourceRoot) {
840
+ // This follows what Chrome does.
841
+ if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
842
+ sourceRoot += '/';
843
+ }
844
+ // The spec says:
845
+ // Line 4: An optional source root, useful for relocating source
846
+ // files on a server or removing repeated values in the
847
+ // “sources” entry. This value is prepended to the individual
848
+ // entries in the “source” field.
849
+ sourceURL = sourceRoot + sourceURL;
850
+ }
851
+
852
+ // Historically, SourceMapConsumer did not take the sourceMapURL as
853
+ // a parameter. This mode is still somewhat supported, which is why
854
+ // this code block is conditional. However, it's preferable to pass
855
+ // the source map URL to SourceMapConsumer, so that this function
856
+ // can implement the source URL resolution algorithm as outlined in
857
+ // the spec. This block is basically the equivalent of:
858
+ // new URL(sourceURL, sourceMapURL).toString()
859
+ // ... except it avoids using URL, which wasn't available in the
860
+ // older releases of node still supported by this library.
861
+ //
862
+ // The spec says:
863
+ // If the sources are not absolute URLs after prepending of the
864
+ // “sourceRoot”, the sources are resolved relative to the
865
+ // SourceMap (like resolving script src in a html document).
866
+ if (sourceMapURL) {
867
+ const parsed = urlParse(sourceMapURL);
868
+ if (!parsed) {
869
+ throw new Error('sourceMapURL could not be parsed')
870
+ }
871
+ if (parsed.path) {
872
+ // Strip the last path component, but keep the "/".
873
+ const index = parsed.path.lastIndexOf('/');
874
+ if (index >= 0) {
875
+ parsed.path = parsed.path.substring(0, index + 1);
876
+ }
877
+ }
878
+ sourceURL = join(urlGenerate(parsed), sourceURL);
879
+ }
880
+
881
+ return normalize(sourceURL)
882
+ }
883
+ exports.computeSourceURL = computeSourceURL;
884
+ } (util$4));
885
+
886
+ var arraySet = {};
891
887
 
892
888
  /* -*- Mode: js; js-indent-level: 2; -*- */
889
+
893
890
  /*
894
891
  * Copyright 2011 Mozilla Foundation and contributors
895
892
  * Licensed under the New BSD license. See LICENSE or:
@@ -902,7 +899,7 @@ exports.computeSourceURL = computeSourceURL;
902
899
  * element is O(1). Removing elements from the set is not supported. Only
903
900
  * strings are supported for membership.
904
901
  */
905
- class ArraySet$2 {
902
+ let ArraySet$2 = class ArraySet {
906
903
  constructor() {
907
904
  this._array = [];
908
905
  this._set = new Map();
@@ -987,14 +984,10 @@ class ArraySet$2 {
987
984
  toArray() {
988
985
  return this._array.slice()
989
986
  }
990
- }
991
- var ArraySet_1 = ArraySet$2;
992
-
993
- var arraySet = {
994
- ArraySet: ArraySet_1
995
987
  };
988
+ arraySet.ArraySet = ArraySet$2;
996
989
 
997
- var util = util$1;
990
+ var mappingList = {};
998
991
 
999
992
  /* -*- Mode: js; js-indent-level: 2; -*- */
1000
993
 
@@ -1004,7 +997,7 @@ var util = util$1;
1004
997
  * http://opensource.org/licenses/BSD-3-Clause
1005
998
  */
1006
999
 
1007
-
1000
+ const util$3 = util$4;
1008
1001
 
1009
1002
  /**
1010
1003
  * Determine whether mappingB is after mappingA with respect to generated
@@ -1019,7 +1012,7 @@ function generatedPositionAfter(mappingA, mappingB) {
1019
1012
  return (
1020
1013
  lineB > lineA ||
1021
1014
  (lineB == lineA && columnB >= columnA) ||
1022
- util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0
1015
+ util$3.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0
1023
1016
  )
1024
1017
  }
1025
1018
 
@@ -1028,7 +1021,7 @@ function generatedPositionAfter(mappingA, mappingB) {
1028
1021
  * performance conscious manner. It trades a negligible overhead in general
1029
1022
  * case for a large speedup in case of mappings being added in order.
1030
1023
  */
1031
- class MappingList$1 {
1024
+ let MappingList$1 = class MappingList {
1032
1025
  constructor() {
1033
1026
  this._array = [];
1034
1027
  this._sorted = true;
@@ -1072,24 +1065,14 @@ class MappingList$1 {
1072
1065
  */
1073
1066
  toArray() {
1074
1067
  if (!this._sorted) {
1075
- this._array.sort(util.compareByGeneratedPositionsInflated);
1068
+ this._array.sort(util$3.compareByGeneratedPositionsInflated);
1076
1069
  this._sorted = true;
1077
1070
  }
1078
1071
  return this._array
1079
1072
  }
1080
- }
1081
-
1082
- var MappingList_1 = MappingList$1;
1083
-
1084
- var mappingList = {
1085
- MappingList: MappingList_1
1086
1073
  };
1087
1074
 
1088
- var base64VLQ = base64Vlq;
1089
-
1090
- var require$$0$1 = arraySet;
1091
-
1092
- var require$$1$1 = mappingList;
1075
+ mappingList.MappingList = MappingList$1;
1093
1076
 
1094
1077
  /* -*- Mode: js; js-indent-level: 2; -*- */
1095
1078
 
@@ -1099,10 +1082,10 @@ var require$$1$1 = mappingList;
1099
1082
  * http://opensource.org/licenses/BSD-3-Clause
1100
1083
  */
1101
1084
 
1102
-
1103
-
1104
- const ArraySet$1 = require$$0$1.ArraySet;
1105
- const MappingList = require$$1$1.MappingList;
1085
+ const base64VLQ = base64Vlq;
1086
+ const util$2 = util$4;
1087
+ const ArraySet$1 = arraySet.ArraySet;
1088
+ const MappingList = mappingList.MappingList;
1106
1089
 
1107
1090
  /**
1108
1091
  * An instance of the SourceMapGenerator represents a source map which is
@@ -1112,14 +1095,14 @@ const MappingList = require$$1$1.MappingList;
1112
1095
  * - file: The filename of the generated source.
1113
1096
  * - sourceRoot: A root for all relative URLs in this source map.
1114
1097
  */
1115
- class SourceMapGenerator$1 {
1098
+ let SourceMapGenerator$1 = class SourceMapGenerator {
1116
1099
  constructor(aArgs) {
1117
1100
  if (!aArgs) {
1118
1101
  aArgs = {};
1119
1102
  }
1120
- this._file = util.getArg(aArgs, 'file', null);
1121
- this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
1122
- this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
1103
+ this._file = util$2.getArg(aArgs, 'file', null);
1104
+ this._sourceRoot = util$2.getArg(aArgs, 'sourceRoot', null);
1105
+ this._skipValidation = util$2.getArg(aArgs, 'skipValidation', false);
1123
1106
  this._sources = new ArraySet$1();
1124
1107
  this._names = new ArraySet$1();
1125
1108
  this._mappings = new MappingList();
@@ -1148,7 +1131,7 @@ class SourceMapGenerator$1 {
1148
1131
  if (mapping.source != null) {
1149
1132
  newMapping.source = mapping.source;
1150
1133
  if (sourceRoot != null) {
1151
- newMapping.source = util.relative(sourceRoot, newMapping.source);
1134
+ newMapping.source = util$2.relative(sourceRoot, newMapping.source);
1152
1135
  }
1153
1136
 
1154
1137
  newMapping.original = {
@@ -1166,7 +1149,7 @@ class SourceMapGenerator$1 {
1166
1149
  aSourceMapConsumer.sources.forEach(function (sourceFile) {
1167
1150
  let sourceRelative = sourceFile;
1168
1151
  if (sourceRoot !== null) {
1169
- sourceRelative = util.relative(sourceRoot, sourceFile);
1152
+ sourceRelative = util$2.relative(sourceRoot, sourceFile);
1170
1153
  }
1171
1154
 
1172
1155
  if (!generator._sources.has(sourceRelative)) {
@@ -1192,10 +1175,10 @@ class SourceMapGenerator$1 {
1192
1175
  * - name: An optional original token name for this mapping.
1193
1176
  */
1194
1177
  addMapping(aArgs) {
1195
- const generated = util.getArg(aArgs, 'generated');
1196
- const original = util.getArg(aArgs, 'original', null);
1197
- let source = util.getArg(aArgs, 'source', null);
1198
- let name = util.getArg(aArgs, 'name', null);
1178
+ const generated = util$2.getArg(aArgs, 'generated');
1179
+ const original = util$2.getArg(aArgs, 'original', null);
1180
+ let source = util$2.getArg(aArgs, 'source', null);
1181
+ let name = util$2.getArg(aArgs, 'name', null);
1199
1182
 
1200
1183
  if (!this._skipValidation) {
1201
1184
  this._validateMapping(generated, original, source, name);
@@ -1231,7 +1214,7 @@ class SourceMapGenerator$1 {
1231
1214
  setSourceContent(aSourceFile, aSourceContent) {
1232
1215
  let source = aSourceFile;
1233
1216
  if (this._sourceRoot != null) {
1234
- source = util.relative(this._sourceRoot, source);
1217
+ source = util$2.relative(this._sourceRoot, source);
1235
1218
  }
1236
1219
 
1237
1220
  if (aSourceContent != null) {
@@ -1240,11 +1223,11 @@ class SourceMapGenerator$1 {
1240
1223
  if (!this._sourcesContents) {
1241
1224
  this._sourcesContents = Object.create(null);
1242
1225
  }
1243
- this._sourcesContents[util.toSetString(source)] = aSourceContent;
1226
+ this._sourcesContents[util$2.toSetString(source)] = aSourceContent;
1244
1227
  } else if (this._sourcesContents) {
1245
1228
  // Remove the source file from the _sourcesContents map.
1246
1229
  // If the _sourcesContents map is empty, set the property to null.
1247
- delete this._sourcesContents[util.toSetString(source)];
1230
+ delete this._sourcesContents[util$2.toSetString(source)];
1248
1231
  if (Object.keys(this._sourcesContents).length === 0) {
1249
1232
  this._sourcesContents = null;
1250
1233
  }
@@ -1282,7 +1265,7 @@ class SourceMapGenerator$1 {
1282
1265
  const sourceRoot = this._sourceRoot;
1283
1266
  // Make "sourceFile" relative if an absolute Url is passed.
1284
1267
  if (sourceRoot != null) {
1285
- sourceFile = util.relative(sourceRoot, sourceFile);
1268
+ sourceFile = util$2.relative(sourceRoot, sourceFile);
1286
1269
  }
1287
1270
  // Applying the SourceMap can add and remove items from the sources and
1288
1271
  // the names array.
@@ -1302,10 +1285,10 @@ class SourceMapGenerator$1 {
1302
1285
  // Copy mapping
1303
1286
  mapping.source = original.source;
1304
1287
  if (aSourceMapPath != null) {
1305
- mapping.source = util.join(aSourceMapPath, mapping.source);
1288
+ mapping.source = util$2.join(aSourceMapPath, mapping.source);
1306
1289
  }
1307
1290
  if (sourceRoot != null) {
1308
- mapping.source = util.relative(sourceRoot, mapping.source);
1291
+ mapping.source = util$2.relative(sourceRoot, mapping.source);
1309
1292
  }
1310
1293
  mapping.originalLine = original.line;
1311
1294
  mapping.originalColumn = original.column;
@@ -1333,10 +1316,10 @@ class SourceMapGenerator$1 {
1333
1316
  const content = aSourceMapConsumer.sourceContentFor(srcFile);
1334
1317
  if (content != null) {
1335
1318
  if (aSourceMapPath != null) {
1336
- srcFile = util.join(aSourceMapPath, srcFile);
1319
+ srcFile = util$2.join(aSourceMapPath, srcFile);
1337
1320
  }
1338
1321
  if (sourceRoot != null) {
1339
- srcFile = util.relative(sourceRoot, srcFile);
1322
+ srcFile = util$2.relative(sourceRoot, srcFile);
1340
1323
  }
1341
1324
  this.setSourceContent(srcFile, content);
1342
1325
  }
@@ -1435,7 +1418,7 @@ class SourceMapGenerator$1 {
1435
1418
  }
1436
1419
  } else if (i > 0) {
1437
1420
  if (
1438
- !util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])
1421
+ !util$2.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])
1439
1422
  ) {
1440
1423
  continue
1441
1424
  }
@@ -1482,9 +1465,9 @@ class SourceMapGenerator$1 {
1482
1465
  return null
1483
1466
  }
1484
1467
  if (aSourceRoot != null) {
1485
- source = util.relative(aSourceRoot, source);
1468
+ source = util$2.relative(aSourceRoot, source);
1486
1469
  }
1487
- const key = util.toSetString(source);
1470
+ const key = util$2.toSetString(source);
1488
1471
  return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
1489
1472
  ? this._sourcesContents[key]
1490
1473
  : null
@@ -1523,141 +1506,145 @@ class SourceMapGenerator$1 {
1523
1506
  toString() {
1524
1507
  return JSON.stringify(this.toJSON())
1525
1508
  }
1526
- }
1527
-
1528
- SourceMapGenerator$1.prototype._version = 3;
1529
- var SourceMapGenerator_1 = SourceMapGenerator$1;
1530
-
1531
- var sourceMapGenerator = {
1532
- SourceMapGenerator: SourceMapGenerator_1
1533
1509
  };
1534
1510
 
1535
- /* -*- Mode: js; js-indent-level: 2; -*- */
1536
-
1537
- var binarySearch$1 = createCommonjsModule(function (module, exports) {
1538
- /*
1539
- * Copyright 2011 Mozilla Foundation and contributors
1540
- * Licensed under the New BSD license. See LICENSE or:
1541
- * http://opensource.org/licenses/BSD-3-Clause
1542
- */
1543
-
1544
- exports.GREATEST_LOWER_BOUND = 1;
1545
- exports.LEAST_UPPER_BOUND = 2;
1546
-
1547
- /**
1548
- * Recursive implementation of binary search.
1549
- *
1550
- * @param aLow Indices here and lower do not contain the needle.
1551
- * @param aHigh Indices here and higher do not contain the needle.
1552
- * @param aNeedle The element being searched for.
1553
- * @param aHaystack The non-empty array being searched.
1554
- * @param aCompare Function which takes two elements and returns -1, 0, or 1.
1555
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
1556
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
1557
- * closest element that is smaller than or greater than the one we are
1558
- * searching for, respectively, if the exact element cannot be found.
1559
- */
1560
- function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
1561
- // This function terminates when one of the following is true:
1562
- //
1563
- // 1. We find the exact element we are looking for.
1564
- //
1565
- // 2. We did not find the exact element, but we can return the index of
1566
- // the next-closest element.
1567
- //
1568
- // 3. We did not find the exact element, and there is no next-closest
1569
- // element than the one we are searching for, so we return -1.
1570
- const mid = Math.floor((aHigh - aLow) / 2) + aLow;
1571
- const cmp = aCompare(aNeedle, aHaystack[mid], true);
1572
- if (cmp === 0) {
1573
- // Found the element we are looking for.
1574
- return mid
1575
- } else if (cmp > 0) {
1576
- // Our needle is greater than aHaystack[mid].
1577
- if (aHigh - mid > 1) {
1578
- // The element is in the upper half.
1579
- return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias)
1580
- }
1581
-
1582
- // The exact needle element was not found in this haystack. Determine if
1583
- // we are in termination case (3) or (2) and return the appropriate thing.
1584
- if (aBias == exports.LEAST_UPPER_BOUND) {
1585
- return aHigh < aHaystack.length ? aHigh : -1
1586
- }
1587
- return mid
1588
- }
1589
-
1590
- // Our needle is less than aHaystack[mid].
1591
- if (mid - aLow > 1) {
1592
- // The element is in the lower half.
1593
- return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias)
1594
- }
1511
+ SourceMapGenerator$1.prototype._version = 3;
1512
+ sourceMapGenerator.SourceMapGenerator = SourceMapGenerator$1;
1595
1513
 
1596
- // we are in termination case (3) or (2) and return the appropriate thing.
1597
- if (aBias == exports.LEAST_UPPER_BOUND) {
1598
- return mid
1599
- }
1600
- return aLow < 0 ? -1 : aLow
1601
- }
1514
+ var sourceMapConsumer = {};
1602
1515
 
1603
- /**
1604
- * This is an implementation of binary search which will always try and return
1605
- * the index of the closest element if there is no exact hit. This is because
1606
- * mappings between original and generated line/col pairs are single points,
1607
- * and there is an implicit region between each of them, so a miss just means
1608
- * that you aren't on the very start of a region.
1609
- *
1610
- * @param aNeedle The element you are looking for.
1611
- * @param aHaystack The array that is being searched.
1612
- * @param aCompare A function which takes the needle and an element in the
1613
- * array and returns -1, 0, or 1 depending on whether the needle is less
1614
- * than, equal to, or greater than the element, respectively.
1615
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
1616
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
1617
- * closest element that is smaller than or greater than the one we are
1618
- * searching for, respectively, if the exact element cannot be found.
1619
- * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
1620
- */
1621
- exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
1622
- if (aHaystack.length === 0) {
1623
- return -1
1624
- }
1625
-
1626
- let index = recursiveSearch(
1627
- -1,
1628
- aHaystack.length,
1629
- aNeedle,
1630
- aHaystack,
1631
- aCompare,
1632
- aBias || exports.GREATEST_LOWER_BOUND
1633
- );
1634
- if (index < 0) {
1635
- return -1
1636
- }
1516
+ var binarySearch$1 = {};
1637
1517
 
1638
- // We have found either the exact element, or the next-closest element than
1639
- // the one we are searching for. However, there may be more than one such
1640
- // element. Make sure we always return the smallest of these.
1641
- while (index - 1 >= 0) {
1642
- if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
1643
- break
1644
- }
1645
- --index;
1646
- }
1518
+ /* -*- Mode: js; js-indent-level: 2; -*- */
1647
1519
 
1648
- return index
1520
+ (function (exports) {
1521
+ /*
1522
+ * Copyright 2011 Mozilla Foundation and contributors
1523
+ * Licensed under the New BSD license. See LICENSE or:
1524
+ * http://opensource.org/licenses/BSD-3-Clause
1525
+ */
1526
+
1527
+ exports.GREATEST_LOWER_BOUND = 1;
1528
+ exports.LEAST_UPPER_BOUND = 2;
1529
+
1530
+ /**
1531
+ * Recursive implementation of binary search.
1532
+ *
1533
+ * @param aLow Indices here and lower do not contain the needle.
1534
+ * @param aHigh Indices here and higher do not contain the needle.
1535
+ * @param aNeedle The element being searched for.
1536
+ * @param aHaystack The non-empty array being searched.
1537
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
1538
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
1539
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
1540
+ * closest element that is smaller than or greater than the one we are
1541
+ * searching for, respectively, if the exact element cannot be found.
1542
+ */
1543
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
1544
+ // This function terminates when one of the following is true:
1545
+ //
1546
+ // 1. We find the exact element we are looking for.
1547
+ //
1548
+ // 2. We did not find the exact element, but we can return the index of
1549
+ // the next-closest element.
1550
+ //
1551
+ // 3. We did not find the exact element, and there is no next-closest
1552
+ // element than the one we are searching for, so we return -1.
1553
+ const mid = Math.floor((aHigh - aLow) / 2) + aLow;
1554
+ const cmp = aCompare(aNeedle, aHaystack[mid], true);
1555
+ if (cmp === 0) {
1556
+ // Found the element we are looking for.
1557
+ return mid
1558
+ } else if (cmp > 0) {
1559
+ // Our needle is greater than aHaystack[mid].
1560
+ if (aHigh - mid > 1) {
1561
+ // The element is in the upper half.
1562
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias)
1563
+ }
1564
+
1565
+ // The exact needle element was not found in this haystack. Determine if
1566
+ // we are in termination case (3) or (2) and return the appropriate thing.
1567
+ if (aBias == exports.LEAST_UPPER_BOUND) {
1568
+ return aHigh < aHaystack.length ? aHigh : -1
1569
+ }
1570
+ return mid
1571
+ }
1572
+
1573
+ // Our needle is less than aHaystack[mid].
1574
+ if (mid - aLow > 1) {
1575
+ // The element is in the lower half.
1576
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias)
1577
+ }
1578
+
1579
+ // we are in termination case (3) or (2) and return the appropriate thing.
1580
+ if (aBias == exports.LEAST_UPPER_BOUND) {
1581
+ return mid
1582
+ }
1583
+ return aLow < 0 ? -1 : aLow
1584
+ }
1585
+
1586
+ /**
1587
+ * This is an implementation of binary search which will always try and return
1588
+ * the index of the closest element if there is no exact hit. This is because
1589
+ * mappings between original and generated line/col pairs are single points,
1590
+ * and there is an implicit region between each of them, so a miss just means
1591
+ * that you aren't on the very start of a region.
1592
+ *
1593
+ * @param aNeedle The element you are looking for.
1594
+ * @param aHaystack The array that is being searched.
1595
+ * @param aCompare A function which takes the needle and an element in the
1596
+ * array and returns -1, 0, or 1 depending on whether the needle is less
1597
+ * than, equal to, or greater than the element, respectively.
1598
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
1599
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
1600
+ * closest element that is smaller than or greater than the one we are
1601
+ * searching for, respectively, if the exact element cannot be found.
1602
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
1603
+ */
1604
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
1605
+ if (aHaystack.length === 0) {
1606
+ return -1
1607
+ }
1608
+
1609
+ let index = recursiveSearch(
1610
+ -1,
1611
+ aHaystack.length,
1612
+ aNeedle,
1613
+ aHaystack,
1614
+ aCompare,
1615
+ aBias || exports.GREATEST_LOWER_BOUND
1616
+ );
1617
+ if (index < 0) {
1618
+ return -1
1619
+ }
1620
+
1621
+ // We have found either the exact element, or the next-closest element than
1622
+ // the one we are searching for. However, there may be more than one such
1623
+ // element. Make sure we always return the smallest of these.
1624
+ while (index - 1 >= 0) {
1625
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
1626
+ break
1627
+ }
1628
+ --index;
1629
+ }
1630
+
1631
+ return index
1632
+ };
1633
+ } (binarySearch$1));
1634
+
1635
+ var readWasmExports = {};
1636
+ var readWasm$2 = {
1637
+ get exports(){ return readWasmExports; },
1638
+ set exports(v){ readWasmExports = v; },
1649
1639
  };
1650
- });
1651
1640
 
1652
1641
  /* Determine browser vs node environment by testing the default top level context. Solution courtesy of: https://stackoverflow.com/questions/17575790/environment-detection-node-js-or-browser */
1653
-
1654
- var readWasm$1 = createCommonjsModule(function (module) {
1655
1642
  {
1656
1643
  // Web version of reading a wasm file into an array buffer.
1657
1644
 
1658
1645
  let mappingsWasm = null;
1659
1646
 
1660
- module.exports = function readWasm() {
1647
+ readWasm$2.exports = function readWasm() {
1661
1648
  if (typeof mappingsWasm === 'string') {
1662
1649
  return fetch(mappingsWasm).then((response) => response.arrayBuffer())
1663
1650
  }
@@ -1672,11 +1659,10 @@ var readWasm$1 = createCommonjsModule(function (module) {
1672
1659
  )
1673
1660
  };
1674
1661
 
1675
- module.exports.initialize = (input) => (mappingsWasm = input);
1662
+ readWasmExports.initialize = (input) => (mappingsWasm = input);
1676
1663
  }
1677
- });
1678
1664
 
1679
- var readWasm = readWasm$1;
1665
+ const readWasm$1 = readWasmExports;
1680
1666
 
1681
1667
  /**
1682
1668
  * Provide the JIT with a nice shape / hidden class.
@@ -1700,7 +1686,7 @@ var wasm$1 = function wasm() {
1700
1686
 
1701
1687
  const callbackStack = [];
1702
1688
 
1703
- cachedWasm = readWasm()
1689
+ cachedWasm = readWasm$1()
1704
1690
  .then((buffer) => {
1705
1691
  return WebAssembly.instantiate(buffer, {
1706
1692
  env: {
@@ -1815,10 +1801,6 @@ var wasm$1 = function wasm() {
1815
1801
  return cachedWasm
1816
1802
  };
1817
1803
 
1818
- var binarySearch = binarySearch$1;
1819
-
1820
- var wasm = wasm$1;
1821
-
1822
1804
  /* -*- Mode: js; js-indent-level: 2; -*- */
1823
1805
 
1824
1806
  /*
@@ -1827,16 +1809,15 @@ var wasm = wasm$1;
1827
1809
  * http://opensource.org/licenses/BSD-3-Clause
1828
1810
  */
1829
1811
 
1830
-
1831
-
1832
- const ArraySet = require$$0$1.ArraySet;
1833
- // eslint-disable-line no-unused-vars
1834
-
1835
-
1812
+ const util$1 = util$4;
1813
+ const binarySearch = binarySearch$1;
1814
+ const ArraySet = arraySet.ArraySet;
1815
+ const readWasm = readWasmExports;
1816
+ const wasm = wasm$1;
1836
1817
 
1837
1818
  const INTERNAL = Symbol('smcInternal');
1838
1819
 
1839
- class SourceMapConsumer$1 {
1820
+ let SourceMapConsumer$1 = class SourceMapConsumer {
1840
1821
  constructor(aSourceMap, aSourceMapURL) {
1841
1822
  // If the constructor was called by super(), just return Promise<this>.
1842
1823
  // Yes, this is a hack to retain the pre-existing API of the base-class
@@ -1953,7 +1934,7 @@ class SourceMapConsumer$1 {
1953
1934
  destroy() {
1954
1935
  throw new Error('Subclasses must implement destroy')
1955
1936
  }
1956
- }
1937
+ };
1957
1938
 
1958
1939
  /**
1959
1940
  * The version of the source mapping spec that we are consuming.
@@ -1965,7 +1946,7 @@ SourceMapConsumer$1.ORIGINAL_ORDER = 2;
1965
1946
  SourceMapConsumer$1.GREATEST_LOWER_BOUND = 1;
1966
1947
  SourceMapConsumer$1.LEAST_UPPER_BOUND = 2;
1967
1948
 
1968
- var SourceMapConsumer_1 = SourceMapConsumer$1;
1949
+ sourceMapConsumer.SourceMapConsumer = SourceMapConsumer$1;
1969
1950
 
1970
1951
  /**
1971
1952
  * A BasicSourceMapConsumer instance represents a parsed source map which we can
@@ -2006,18 +1987,18 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2006
1987
  return super(INTERNAL).then((that) => {
2007
1988
  let sourceMap = aSourceMap;
2008
1989
  if (typeof aSourceMap === 'string') {
2009
- sourceMap = util.parseSourceMapInput(aSourceMap);
1990
+ sourceMap = util$1.parseSourceMapInput(aSourceMap);
2010
1991
  }
2011
1992
 
2012
- const version = util.getArg(sourceMap, 'version');
2013
- let sources = util.getArg(sourceMap, 'sources');
1993
+ const version = util$1.getArg(sourceMap, 'version');
1994
+ let sources = util$1.getArg(sourceMap, 'sources');
2014
1995
  // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
2015
1996
  // requires the array) to play nice here.
2016
- const names = util.getArg(sourceMap, 'names', []);
2017
- let sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
2018
- const sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
2019
- const mappings = util.getArg(sourceMap, 'mappings');
2020
- const file = util.getArg(sourceMap, 'file', null);
1997
+ const names = util$1.getArg(sourceMap, 'names', []);
1998
+ let sourceRoot = util$1.getArg(sourceMap, 'sourceRoot', null);
1999
+ const sourcesContent = util$1.getArg(sourceMap, 'sourcesContent', null);
2000
+ const mappings = util$1.getArg(sourceMap, 'mappings');
2001
+ const file = util$1.getArg(sourceMap, 'file', null);
2021
2002
 
2022
2003
  // Once again, Sass deviates from the spec and supplies the version as a
2023
2004
  // string rather than a number, so we use loose equality checking here.
@@ -2026,7 +2007,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2026
2007
  }
2027
2008
 
2028
2009
  if (sourceRoot) {
2029
- sourceRoot = util.normalize(sourceRoot);
2010
+ sourceRoot = util$1.normalize(sourceRoot);
2030
2011
  }
2031
2012
 
2032
2013
  sources = sources
@@ -2034,16 +2015,16 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2034
2015
  // Some source maps produce relative source paths like "./foo.js" instead of
2035
2016
  // "foo.js". Normalize these first so that future comparisons will succeed.
2036
2017
  // See bugzil.la/1090768.
2037
- .map(util.normalize)
2018
+ .map(util$1.normalize)
2038
2019
  // Always ensure that absolute sources are internally stored relative to
2039
2020
  // the source root, if the source root is absolute. Not doing this would
2040
2021
  // be particularly problematic when the source root is a prefix of the
2041
2022
  // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
2042
2023
  .map(function (source) {
2043
2024
  return sourceRoot &&
2044
- util.isAbsolute(sourceRoot) &&
2045
- util.isAbsolute(source)
2046
- ? util.relative(sourceRoot, source)
2025
+ util$1.isAbsolute(sourceRoot) &&
2026
+ util$1.isAbsolute(source)
2027
+ ? util$1.relative(sourceRoot, source)
2047
2028
  : source
2048
2029
  });
2049
2030
 
@@ -2055,7 +2036,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2055
2036
  that._sources = ArraySet.fromArray(sources, true);
2056
2037
 
2057
2038
  that._absoluteSources = that._sources.toArray().map(function (s) {
2058
- return util.computeSourceURL(sourceRoot, s, aSourceMapURL)
2039
+ return util$1.computeSourceURL(sourceRoot, s, aSourceMapURL)
2059
2040
  });
2060
2041
 
2061
2042
  that.sourceRoot = sourceRoot;
@@ -2082,7 +2063,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2082
2063
  _findSourceIndex(aSource) {
2083
2064
  let relativeSource = aSource;
2084
2065
  if (this.sourceRoot != null) {
2085
- relativeSource = util.relative(this.sourceRoot, relativeSource);
2066
+ relativeSource = util$1.relative(this.sourceRoot, relativeSource);
2086
2067
  }
2087
2068
 
2088
2069
  if (this._sources.has(relativeSource)) {
@@ -2184,7 +2165,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2184
2165
  (mapping) => {
2185
2166
  if (mapping.source !== null) {
2186
2167
  mapping.source = this._sources.at(mapping.source);
2187
- mapping.source = util.computeSourceURL(
2168
+ mapping.source = util$1.computeSourceURL(
2188
2169
  sourceRoot,
2189
2170
  mapping.source,
2190
2171
  this._sourceMapURL
@@ -2213,8 +2194,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2213
2194
  }
2214
2195
 
2215
2196
  allGeneratedPositionsFor(aArgs) {
2216
- let source = util.getArg(aArgs, 'source');
2217
- const originalLine = util.getArg(aArgs, 'line');
2197
+ let source = util$1.getArg(aArgs, 'source');
2198
+ const originalLine = util$1.getArg(aArgs, 'line');
2218
2199
  const originalColumn = aArgs.column || 0;
2219
2200
 
2220
2201
  source = this._findSourceIndex(source);
@@ -2304,8 +2285,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2304
2285
  */
2305
2286
  originalPositionFor(aArgs) {
2306
2287
  const needle = {
2307
- generatedLine: util.getArg(aArgs, 'line'),
2308
- generatedColumn: util.getArg(aArgs, 'column'),
2288
+ generatedLine: util$1.getArg(aArgs, 'line'),
2289
+ generatedColumn: util$1.getArg(aArgs, 'column'),
2309
2290
  };
2310
2291
 
2311
2292
  if (needle.generatedLine < 1) {
@@ -2316,7 +2297,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2316
2297
  throw new Error('Column numbers must be >= 0')
2317
2298
  }
2318
2299
 
2319
- let bias = util.getArg(
2300
+ let bias = util$1.getArg(
2320
2301
  aArgs,
2321
2302
  'bias',
2322
2303
  SourceMapConsumer$1.GREATEST_LOWER_BOUND
@@ -2340,25 +2321,25 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2340
2321
 
2341
2322
  if (mapping) {
2342
2323
  if (mapping.generatedLine === needle.generatedLine) {
2343
- let source = util.getArg(mapping, 'source', null);
2324
+ let source = util$1.getArg(mapping, 'source', null);
2344
2325
  if (source !== null) {
2345
2326
  source = this._sources.at(source);
2346
- source = util.computeSourceURL(
2327
+ source = util$1.computeSourceURL(
2347
2328
  this.sourceRoot,
2348
2329
  source,
2349
2330
  this._sourceMapURL
2350
2331
  );
2351
2332
  }
2352
2333
 
2353
- let name = util.getArg(mapping, 'name', null);
2334
+ let name = util$1.getArg(mapping, 'name', null);
2354
2335
  if (name !== null) {
2355
2336
  name = this._names.at(name);
2356
2337
  }
2357
2338
 
2358
2339
  return {
2359
2340
  source,
2360
- line: util.getArg(mapping, 'originalLine', null),
2361
- column: util.getArg(mapping, 'originalColumn', null),
2341
+ line: util$1.getArg(mapping, 'originalLine', null),
2342
+ column: util$1.getArg(mapping, 'originalColumn', null),
2362
2343
  name,
2363
2344
  }
2364
2345
  }
@@ -2405,11 +2386,11 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2405
2386
 
2406
2387
  let relativeSource = aSource;
2407
2388
  if (this.sourceRoot != null) {
2408
- relativeSource = util.relative(this.sourceRoot, relativeSource);
2389
+ relativeSource = util$1.relative(this.sourceRoot, relativeSource);
2409
2390
  }
2410
2391
 
2411
2392
  let url;
2412
- if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
2393
+ if (this.sourceRoot != null && (url = util$1.urlParse(this.sourceRoot))) {
2413
2394
  // XXX: file:// URIs and absolute paths lead to unexpected behavior for
2414
2395
  // many users. We can help them out when they expect file:// URIs to
2415
2396
  // behave like it would if they were running a local HTTP server. See
@@ -2462,7 +2443,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2462
2443
  * The column number is 0-based.
2463
2444
  */
2464
2445
  generatedPositionFor(aArgs) {
2465
- let source = util.getArg(aArgs, 'source');
2446
+ let source = util$1.getArg(aArgs, 'source');
2466
2447
  source = this._findSourceIndex(source);
2467
2448
  if (source < 0) {
2468
2449
  return {
@@ -2474,8 +2455,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2474
2455
 
2475
2456
  const needle = {
2476
2457
  source,
2477
- originalLine: util.getArg(aArgs, 'line'),
2478
- originalColumn: util.getArg(aArgs, 'column'),
2458
+ originalLine: util$1.getArg(aArgs, 'line'),
2459
+ originalColumn: util$1.getArg(aArgs, 'column'),
2479
2460
  };
2480
2461
 
2481
2462
  if (needle.originalLine < 1) {
@@ -2486,7 +2467,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2486
2467
  throw new Error('Column numbers must be >= 0')
2487
2468
  }
2488
2469
 
2489
- let bias = util.getArg(
2470
+ let bias = util$1.getArg(
2490
2471
  aArgs,
2491
2472
  'bias',
2492
2473
  SourceMapConsumer$1.GREATEST_LOWER_BOUND
@@ -2516,8 +2497,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2516
2497
  lastColumn = Infinity;
2517
2498
  }
2518
2499
  return {
2519
- line: util.getArg(mapping, 'generatedLine', null),
2520
- column: util.getArg(mapping, 'generatedColumn', null),
2500
+ line: util$1.getArg(mapping, 'generatedLine', null),
2501
+ column: util$1.getArg(mapping, 'generatedColumn', null),
2521
2502
  lastColumn,
2522
2503
  }
2523
2504
  }
@@ -2532,7 +2513,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
2532
2513
  }
2533
2514
 
2534
2515
  BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer$1;
2535
- var BasicSourceMapConsumer_1 = BasicSourceMapConsumer;
2516
+ sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer;
2536
2517
 
2537
2518
  /**
2538
2519
  * An IndexedSourceMapConsumer instance represents a parsed source map which
@@ -2588,11 +2569,11 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2588
2569
  return super(INTERNAL).then((that) => {
2589
2570
  let sourceMap = aSourceMap;
2590
2571
  if (typeof aSourceMap === 'string') {
2591
- sourceMap = util.parseSourceMapInput(aSourceMap);
2572
+ sourceMap = util$1.parseSourceMapInput(aSourceMap);
2592
2573
  }
2593
2574
 
2594
- const version = util.getArg(sourceMap, 'version');
2595
- const sections = util.getArg(sourceMap, 'sections');
2575
+ const version = util$1.getArg(sourceMap, 'version');
2576
+ const sections = util$1.getArg(sourceMap, 'sections');
2596
2577
 
2597
2578
  if (version != that._version) {
2598
2579
  throw new Error('Unsupported version: ' + version)
@@ -2618,9 +2599,9 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2618
2599
  'Support for url field in sections not implemented.'
2619
2600
  )
2620
2601
  }
2621
- const offset = util.getArg(s, 'offset');
2622
- const offsetLine = util.getArg(offset, 'line');
2623
- const offsetColumn = util.getArg(offset, 'column');
2602
+ const offset = util$1.getArg(s, 'offset');
2603
+ const offsetLine = util$1.getArg(offset, 'line');
2604
+ const offsetColumn = util$1.getArg(offset, 'column');
2624
2605
 
2625
2606
  if (
2626
2607
  offsetLine < lastOffset.line ||
@@ -2633,7 +2614,7 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2633
2614
  lastOffset = offset;
2634
2615
 
2635
2616
  const cons = new SourceMapConsumer$1(
2636
- util.getArg(s, 'map'),
2617
+ util$1.getArg(s, 'map'),
2637
2618
  aSourceMapURL
2638
2619
  );
2639
2620
  return cons.then((consumer) => {
@@ -2718,13 +2699,13 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2718
2699
 
2719
2700
  _sortGeneratedMappings() {
2720
2701
  const mappings = this._generatedMappingsUnsorted;
2721
- mappings.sort(util.compareByGeneratedPositionsDeflated);
2702
+ mappings.sort(util$1.compareByGeneratedPositionsDeflated);
2722
2703
  this.__generatedMappings = mappings;
2723
2704
  }
2724
2705
 
2725
2706
  _sortOriginalMappings() {
2726
2707
  const mappings = this._originalMappingsUnsorted;
2727
- mappings.sort(util.compareByOriginalPositions);
2708
+ mappings.sort(util$1.compareByOriginalPositions);
2728
2709
  this.__originalMappings = mappings;
2729
2710
  }
2730
2711
 
@@ -2762,8 +2743,8 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2762
2743
  */
2763
2744
  originalPositionFor(aArgs) {
2764
2745
  const needle = {
2765
- generatedLine: util.getArg(aArgs, 'line'),
2766
- generatedColumn: util.getArg(aArgs, 'column'),
2746
+ generatedLine: util$1.getArg(aArgs, 'line'),
2747
+ generatedColumn: util$1.getArg(aArgs, 'column'),
2767
2748
  };
2768
2749
 
2769
2750
  // Find the section containing the generated position we're trying to map
@@ -2858,7 +2839,7 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2858
2839
  // Only consider this section if the requested source is in the list of
2859
2840
  // sources of the consumer.
2860
2841
  if (
2861
- section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1
2842
+ section.consumer._findSourceIndex(util$1.getArg(aArgs, 'source')) === -1
2862
2843
  ) {
2863
2844
  continue
2864
2845
  }
@@ -2905,7 +2886,7 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2905
2886
  // `source`, which would actually have gotten used as null because
2906
2887
  // var's get hoisted.
2907
2888
  // See: https://github.com/mozilla/source-map/issues/333
2908
- let source = util.computeSourceURL(
2889
+ let source = util$1.computeSourceURL(
2909
2890
  section.consumer.sourceRoot,
2910
2891
  null,
2911
2892
  this._sourceMapURL
@@ -2967,7 +2948,7 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2967
2948
  let source = null;
2968
2949
  if (mapping.source !== null) {
2969
2950
  source = this._sources.at(mapping.source);
2970
- source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
2951
+ source = util$1.computeSourceURL(sourceRoot, source, this._sourceMapURL);
2971
2952
  }
2972
2953
  return {
2973
2954
  source,
@@ -3006,16 +2987,16 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
3006
2987
  }
3007
2988
 
3008
2989
  allGeneratedPositionsFor(aArgs) {
3009
- const line = util.getArg(aArgs, 'line');
2990
+ const line = util$1.getArg(aArgs, 'line');
3010
2991
 
3011
2992
  // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
3012
2993
  // returns the index of the closest mapping less than the needle. By
3013
2994
  // setting needle.originalColumn to 0, we thus find the last mapping for
3014
2995
  // the given line, provided such a mapping exists.
3015
2996
  const needle = {
3016
- source: util.getArg(aArgs, 'source'),
2997
+ source: util$1.getArg(aArgs, 'source'),
3017
2998
  originalLine: line,
3018
- originalColumn: util.getArg(aArgs, 'column', 0),
2999
+ originalColumn: util$1.getArg(aArgs, 'column', 0),
3019
3000
  };
3020
3001
 
3021
3002
  needle.source = this._findSourceIndex(needle.source);
@@ -3038,7 +3019,7 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
3038
3019
  this._originalMappings,
3039
3020
  'originalLine',
3040
3021
  'originalColumn',
3041
- util.compareByOriginalPositions,
3022
+ util$1.compareByOriginalPositions,
3042
3023
  binarySearch.LEAST_UPPER_BOUND
3043
3024
  );
3044
3025
  if (index >= 0) {
@@ -3057,8 +3038,8 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
3057
3038
  lastColumn = Infinity;
3058
3039
  }
3059
3040
  mappings.push({
3060
- line: util.getArg(mapping, 'generatedLine', null),
3061
- column: util.getArg(mapping, 'generatedColumn', null),
3041
+ line: util$1.getArg(mapping, 'generatedLine', null),
3042
+ column: util$1.getArg(mapping, 'generatedColumn', null),
3062
3043
  lastColumn,
3063
3044
  });
3064
3045
 
@@ -3081,8 +3062,8 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
3081
3062
  lastColumn = Infinity;
3082
3063
  }
3083
3064
  mappings.push({
3084
- line: util.getArg(mapping, 'generatedLine', null),
3085
- column: util.getArg(mapping, 'generatedColumn', null),
3065
+ line: util$1.getArg(mapping, 'generatedLine', null),
3066
+ column: util$1.getArg(mapping, 'generatedColumn', null),
3086
3067
  lastColumn,
3087
3068
  });
3088
3069
 
@@ -3100,7 +3081,7 @@ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
3100
3081
  }
3101
3082
  }
3102
3083
  }
3103
- var IndexedSourceMapConsumer_1 = IndexedSourceMapConsumer;
3084
+ sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
3104
3085
 
3105
3086
  /*
3106
3087
  * Cheat to get around inter-twingled classes. `factory()` can be at the end
@@ -3109,7 +3090,7 @@ var IndexedSourceMapConsumer_1 = IndexedSourceMapConsumer;
3109
3090
  function _factory(aSourceMap, aSourceMapURL) {
3110
3091
  let sourceMap = aSourceMap;
3111
3092
  if (typeof aSourceMap === 'string') {
3112
- sourceMap = util.parseSourceMapInput(aSourceMap);
3093
+ sourceMap = util$1.parseSourceMapInput(aSourceMap);
3113
3094
  }
3114
3095
 
3115
3096
  const consumer =
@@ -3123,13 +3104,7 @@ function _factoryBSM(aSourceMap, aSourceMapURL) {
3123
3104
  return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL)
3124
3105
  }
3125
3106
 
3126
- var sourceMapConsumer = {
3127
- SourceMapConsumer: SourceMapConsumer_1,
3128
- BasicSourceMapConsumer: BasicSourceMapConsumer_1,
3129
- IndexedSourceMapConsumer: IndexedSourceMapConsumer_1
3130
- };
3131
-
3132
- var require$$0 = sourceMapGenerator;
3107
+ var sourceNode = {};
3133
3108
 
3134
3109
  /* -*- Mode: js; js-indent-level: 2; -*- */
3135
3110
 
@@ -3139,8 +3114,8 @@ var require$$0 = sourceMapGenerator;
3139
3114
  * http://opensource.org/licenses/BSD-3-Clause
3140
3115
  */
3141
3116
 
3142
- const SourceMapGenerator = require$$0.SourceMapGenerator;
3143
-
3117
+ const SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;
3118
+ const util = util$4;
3144
3119
 
3145
3120
  // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
3146
3121
  // operating systems these days (capturing the result).
@@ -3561,15 +3536,7 @@ class SourceNode {
3561
3536
  }
3562
3537
  }
3563
3538
 
3564
- var SourceNode_1 = SourceNode;
3565
-
3566
- var sourceNode = {
3567
- SourceNode: SourceNode_1
3568
- };
3569
-
3570
- var require$$1 = sourceMapConsumer;
3571
-
3572
- var require$$2 = sourceNode;
3539
+ sourceNode.SourceNode = SourceNode;
3573
3540
 
3574
3541
  /*
3575
3542
  * Copyright 2009-2011 Mozilla Foundation and contributors
@@ -3577,10 +3544,9 @@ var require$$2 = sourceNode;
3577
3544
  * http://opensource.org/licenses/BSD-3-Clause
3578
3545
  */
3579
3546
 
3580
- require$$0.SourceMapGenerator;
3581
- var SourceMapConsumer =
3582
- require$$1.SourceMapConsumer;
3583
- require$$2.SourceNode;
3547
+ sourceMapGenerator.SourceMapGenerator;
3548
+ var SourceMapConsumer = sourceMapConsumer.SourceMapConsumer;
3549
+ sourceNode.SourceNode;
3584
3550
 
3585
3551
  const splitRE = /\r?\n/;
3586
3552
  const range = 2;