@validate.qa/runner 1.0.87 → 1.0.88

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.
Files changed (3) hide show
  1. package/dist/cli.js +2378 -20
  2. package/dist/cli.mjs +2378 -20
  3. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -87749,6 +87749,7 @@ var require_auth_recipe = __commonJS({
87749
87749
  var START_MARKER = `// >>> VALIDATE_QA_AUTH ${exports.AUTH_MARKER_VERSION} \u2014 generated, do not edit >>>`;
87750
87750
  var END_MARKER = `// <<< VALIDATE_QA_AUTH ${exports.AUTH_MARKER_VERSION} <<<`;
87751
87751
  var SHARED_AUTH_RUNTIME_ENABLED = `!/^false$/i.test((process.env.SHARED_AUTH_INJECT ?? '').trim())`;
87752
+ var WARM_PROOF_SETTLE_MS = 8e3;
87752
87753
  var AUTH_REGION_RE = /\/\/ >>> VALIDATE_QA_AUTH[^\n]*\r?\n[\s\S]*?\/\/ <<< VALIDATE_QA_AUTH[^\n]*\r?\n?/g;
87753
87754
  function computeRecipeHash(input) {
87754
87755
  const canonical = JSON.stringify({
@@ -87884,12 +87885,20 @@ ${tabs}`);
87884
87885
  const pred = urlProofPredicateExpr(recipe.authProof.route, recipe.authProof.exact);
87885
87886
  lines.push(` await page.waitForURL((u) => !(${pred})(u), { timeout: 2000 }).catch(() => {});`);
87886
87887
  lines.push(` if ((${pred})(new URL(page.url())) && !(await page.locator('input[type="password"]').first().isVisible().catch(() => false))) return;`);
87887
- } else if (loginRoute) {
87888
- lines.push(` if (await ${authProofLocator(recipe.authProof)}.isVisible().catch(() => false) && new URL(page.url()).pathname !== new URL(${JSON.stringify(loginRoute)}, page.url()).pathname) return;`);
87889
87888
  } else {
87890
- lines.push(` if (await ${authProofLocator(recipe.authProof)}.isVisible().catch(() => false)) return;`);
87889
+ const proofSettle = `await ${authProofLocator(recipe.authProof)}.waitFor({ state: 'visible', timeout: ${WARM_PROOF_SETTLE_MS} }).then(() => true).catch(() => false)`;
87890
+ if (loginRoute) {
87891
+ lines.push(` if (new URL(page.url()).pathname !== new URL(${JSON.stringify(loginRoute)}, page.url()).pathname && ${proofSettle}) return;`);
87892
+ } else {
87893
+ lines.push(` if (${proofSettle}) return;`);
87894
+ }
87891
87895
  }
87892
87896
  lines.push(` }`);
87897
+ lines.push(` if (${SHARED_AUTH_RUNTIME_ENABLED}) {`);
87898
+ lines.push(` await page.context().clearCookies().catch(() => {});`);
87899
+ lines.push(` await page.goto(${JSON.stringify(recipe.preNavRoute)}, { waitUntil: 'domcontentloaded' }).catch(() => {});`);
87900
+ lines.push(` await page.evaluate(() => { try { localStorage.clear(); sessionStorage.clear(); } catch {} }).catch(() => {});`);
87901
+ lines.push(` }`);
87893
87902
  }
87894
87903
  lines.push(` await page.goto(${JSON.stringify(recipe.preNavRoute)}, { waitUntil: 'domcontentloaded' });`);
87895
87904
  for (const cmd of recipe.preNavCmds)
@@ -95842,6 +95851,32 @@ var require_agentic_discovery_prompts = __commonJS({
95842
95851
  lines.push("For a pure navigation or page-load scenario (no in-page mutation), URL + one");
95843
95852
  lines.push("structural heading is sufficient.");
95844
95853
  lines.push("");
95854
+ lines.push("**Stop at the gate for expensive or irreversible actions.** Some controls");
95855
+ lines.push("start work that costs the account real money (an AI generation, a paid");
95856
+ lines.push("third-party call, a checkout), takes minutes to finish, or cannot be undone");
95857
+ lines.push("(delete, publish, cancel a subscription). Do NOT press them. The regression");
95858
+ lines.push("risk lives in the wiring, and the wiring is fully provable for free:");
95859
+ lines.push("- Assert the control is present and correctly ENABLED/DISABLED by its inputs.");
95860
+ lines.push("- If it opens a dialog, assert the dialog, its fields and its confirm button,");
95861
+ lines.push(" then press Cancel and assert nothing changed.");
95862
+ lines.push("- Assert the auth / quota wall fires for a caller who should be refused.");
95863
+ lines.push("A test that waits minutes for generated output cannot finish inside the run");
95864
+ lines.push("budget, bills the account on every run, and leaves permanent rows behind. If");
95865
+ lines.push("the ONLY way to prove a scenario is to trigger such an action, drop it as a");
95866
+ lines.push("gap rather than emitting a test that does.");
95867
+ lines.push("");
95868
+ lines.push("**Never sign up a new account.** Use the injected credentials. Registering a");
95869
+ lines.push("`testuser-<timestamp>` account to get past a login wall leaves a permanent,");
95870
+ lines.push("unowned user in the target database on every single run. Registration is in");
95871
+ lines.push("scope ONLY when the scenario under test IS registration, in which case use");
95872
+ lines.push("the provided inbox helper so the account is tracked and reaped.");
95873
+ lines.push("");
95874
+ lines.push("**Write the assertion so the BUG fails it.** When a scenario documents broken");
95875
+ lines.push("behaviour, still assert the CORRECT outcome. A test that passes because the");
95876
+ lines.push("error message / console error / not-found page is present inverts the suite:");
95877
+ lines.push("fixing the bug turns the test red and the fix is reported as a regression.");
95878
+ lines.push("State the intended behaviour, let it fail, and flag it as a bug.");
95879
+ lines.push("");
95845
95880
  lines.push("## Tools");
95846
95881
  lines.push("");
95847
95882
  lines.push("Browser MCP: `browser_navigate`, `browser_snapshot`, `browser_click`,");
@@ -96651,7 +96686,7 @@ var require_discover_generator = __commonJS({
96651
96686
  "../runner-core/dist/services/discover-generator.js"(exports) {
96652
96687
  "use strict";
96653
96688
  Object.defineProperty(exports, "__esModule", { value: true });
96654
- exports.MIN_BUG_DESCRIPTION_LENGTH = exports.VALID_PLAYWRIGHT_GETBY_METHODS = exports.BLOCKED_MCP_TOOLS_SCENARIO_GEN = void 0;
96689
+ exports.MIN_BUG_DESCRIPTION_LENGTH = exports.NAME_PROHIBITED_ROLES = exports.VALID_PLAYWRIGHT_GETBY_METHODS = exports.BLOCKED_MCP_TOOLS_SCENARIO_GEN = void 0;
96655
96690
  exports.scenarioLooksLikeRegistration = scenarioLooksLikeRegistration;
96656
96691
  exports.signupFeatureTestingAllowed = signupFeatureTestingAllowed;
96657
96692
  exports.scenarioTouchesSignupAuthSurface = scenarioTouchesSignupAuthSurface;
@@ -96681,6 +96716,7 @@ var require_discover_generator = __commonJS({
96681
96716
  exports.scanFragileStructuralLocators = scanFragileStructuralLocators;
96682
96717
  exports.bannedRoleTokensInSelector = bannedRoleTokensInSelector;
96683
96718
  exports.scanInvalidRoleTagLocators = scanInvalidRoleTagLocators;
96719
+ exports.scanNameProhibitedRoleLocators = scanNameProhibitedRoleLocators;
96684
96720
  exports.scanHealedRoleTagLocators = scanHealedRoleTagLocators;
96685
96721
  exports.validateFinalActionFidelity = validateFinalActionFidelity;
96686
96722
  exports.resolveSuspectedBugVerdict = resolveSuspectedBugVerdict;
@@ -99748,10 +99784,55 @@ ${testOpen}`;
99748
99784
  }
99749
99785
  return findings;
99750
99786
  }
99787
+ exports.NAME_PROHIBITED_ROLES = /* @__PURE__ */ new Set([
99788
+ "caption",
99789
+ "code",
99790
+ "deletion",
99791
+ "emphasis",
99792
+ "generic",
99793
+ "insertion",
99794
+ "mark",
99795
+ "none",
99796
+ "paragraph",
99797
+ "presentation",
99798
+ "strong",
99799
+ "subscript",
99800
+ "superscript",
99801
+ "term",
99802
+ "time"
99803
+ ]);
99804
+ function scanNameProhibitedRoleLocators(code) {
99805
+ const findings = [];
99806
+ const seen = /* @__PURE__ */ new Set();
99807
+ const scanCode = code.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, " "));
99808
+ const RE = /getByRole\(\s*(['"`])([a-zA-Z]+)\1\s*,\s*\{[^}]*\bname\s*:/g;
99809
+ for (const rawLine of scanCode.split("\n")) {
99810
+ const line = rawLine.replace(/\/\/.*$/, "");
99811
+ if (line.indexOf("getByRole(") === -1)
99812
+ continue;
99813
+ RE.lastIndex = 0;
99814
+ let m;
99815
+ while ((m = RE.exec(line)) !== null) {
99816
+ const role = m[2].toLowerCase();
99817
+ if (!exports.NAME_PROHIBITED_ROLES.has(role))
99818
+ continue;
99819
+ const key = `${rawLine.trim()} ${role}`;
99820
+ if (seen.has(key))
99821
+ continue;
99822
+ seen.add(key);
99823
+ findings.push({
99824
+ line: rawLine.trim().slice(0, 200),
99825
+ role,
99826
+ reason: `ARIA prohibits an accessible name on role "${role}", so no element ever exposes one \u2014 getByRole('${role}', { name: \u2026 }) matches ZERO nodes and the assertion hangs to its timeout. Match the text instead: page.getByText('\u2026', { exact: true }), optionally scoped (e.g. page.getByRole('main').getByText('\u2026')). If you need the element itself, select a nameable ancestor (region/listitem/link/button) and assert its text.`
99827
+ });
99828
+ }
99829
+ }
99830
+ return findings;
99831
+ }
99751
99832
  function scanHealedRoleTagLocators(code, opts) {
99752
99833
  const inboxStripped = (0, inbox_stamp_js_1.stripInboxRegions)(code);
99753
99834
  const scanned = opts?.stripAuth === false ? inboxStripped : (0, auth_recipe_js_1.stripAuthRegions)(inboxStripped);
99754
- return scanInvalidRoleTagLocators(scanned);
99835
+ return [...scanInvalidRoleTagLocators(scanned), ...scanNameProhibitedRoleLocators(scanned)];
99755
99836
  }
99756
99837
  function validateFinalActionFidelity(playwrightCode, actionLedger, credentials, opts) {
99757
99838
  const ledgerSigs = [];
@@ -100472,7 +100553,7 @@ Do NOT add steps you did not execute. Do NOT skip steps from the recording.${led
100472
100553
  continue;
100473
100554
  }
100474
100555
  const roleTagMode = (0, discovery_lint_flags_js_1.roleTagLocatorLintMode)();
100475
- const roleTagFindings = roleTagMode !== "off" ? scanInvalidRoleTagLocators((0, auth_recipe_js_1.stripAuthRegions)((0, inbox_stamp_js_1.stripInboxRegions)(validated[0].playwrightCode))) : [];
100556
+ const roleTagFindings = roleTagMode !== "off" ? scanHealedRoleTagLocators(validated[0].playwrightCode) : [];
100476
100557
  if (roleTagMode === "warn" && roleTagFindings.length > 0) {
100477
100558
  logs2.push(` Role-tag locator gate [warn]: ${roleTagFindings.length} role-as-CSS-tag locator(s) \u2014 ${roleTagFindings.map((f) => sanitizeLedgerText(f.line)).join(" | ").slice(0, 300)}`);
100478
100559
  }
@@ -100485,12 +100566,10 @@ Do NOT add steps you did not execute. Do NOT skip steps from the recording.${led
100485
100566
  valid: false,
100486
100567
  revisionRequired: true,
100487
100568
  reason: "invalid_role_tag_locator",
100488
- instruction: targeted ? `One or more locators below use an ARIA ROLE as a CSS tag selector, e.g. page.locator('textbox[name^="code"]'). There is no <textbox>/<checkbox>/<heading> HTML element, so page.locator() matches ZERO nodes and the action hangs until the test times out.
100489
- For EACH flagged locator, rewrite it as a real Playwright locator:
100490
- 1. Prefer page.getByRole('<role>', { name: '<accessible name>' }) \u2014 the role is the token you wrongly put in the CSS.
100491
- 2. Or page.getByLabel('<label>'), or a type-scoped CSS like page.locator('input[type="text"]') / input[type="email"].
100492
- 3. For a verification-code field, prefer the injected helper: await __vqaEnterVerificationCode(page, code).
100493
- Keep every other line exactly as-is. Submit the COMPLETE corrected test and call finish_generate again.` : `Your resubmission STILL contains a locator that uses an ARIA role as a CSS tag selector (page.locator('<role>[\u2026]')). This can only ever match nothing. Replace EVERY such locator with page.getByRole('<role>', { name: '\u2026' }) / getByLabel / input[type="\u2026"], or use await __vqaEnterVerificationCode(page, code) for the code field, and resubmit the COMPLETE test.`,
100569
+ instruction: targeted ? `Every locator listed below matches ZERO nodes, so the step hangs until the test times out. Read the \`reason\` on each one \u2014 there are two distinct mistakes:
100570
+ (a) An ARIA ROLE used as a CSS tag selector, e.g. page.locator('textbox[name^="code"]'). There is no <textbox>/<checkbox>/<heading> element. Rewrite as page.getByRole('<role>', { name: '<accessible name>' }), or page.getByLabel('<label>'), or a type-scoped CSS like page.locator('input[type="email"]'). For a verification-code field prefer the injected helper: await __vqaEnterVerificationCode(page, code).
100571
+ (b) A { name: \u2026 } filter on a role whose accessible name ARIA PROHIBITS (paragraph, generic, code, emphasis, strong, term, time, mark, caption, presentation/none, insertion, deletion, sub/superscript). No element with those roles ever exposes a name. Match the text instead: page.getByText('\u2026', { exact: true }), scoped if needed (page.getByRole('main').getByText('\u2026')), or target a nameable ancestor such as region/listitem/link/button.
100572
+ Fix EVERY flagged locator, keep every other line exactly as-is, then submit the COMPLETE corrected test and call finish_generate again.` : `Your resubmission STILL contains a locator that can only ever match nothing \u2014 either an ARIA role used as a CSS tag selector (page.locator('<role>[\u2026]')) or a { name: \u2026 } filter on a name-prohibited role (paragraph/generic/code/emphasis/strong/term/time/\u2026). Replace EVERY one: use getByRole('<role>', { name: '\u2026' }) / getByLabel / input[type="\u2026"] for the first, and getByText('\u2026', { exact: true }) for the second. Resubmit the COMPLETE test.`,
100494
100573
  offendingLocators: roleTagFindings.map((f) => ({
100495
100574
  line: sanitizeLedgerText(f.line),
100496
100575
  reason: f.reason
@@ -101536,6 +101615,2285 @@ var require_rate_limit_detector = __commonJS({
101536
101615
  }
101537
101616
  });
101538
101617
 
101618
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/base64.js
101619
+ var require_base64 = __commonJS({
101620
+ "../../node_modules/source-map-support/node_modules/source-map/lib/base64.js"(exports) {
101621
+ "use strict";
101622
+ var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
101623
+ exports.encode = function(number) {
101624
+ if (0 <= number && number < intToCharMap.length) {
101625
+ return intToCharMap[number];
101626
+ }
101627
+ throw new TypeError("Must be between 0 and 63: " + number);
101628
+ };
101629
+ exports.decode = function(charCode) {
101630
+ var bigA = 65;
101631
+ var bigZ = 90;
101632
+ var littleA = 97;
101633
+ var littleZ = 122;
101634
+ var zero = 48;
101635
+ var nine = 57;
101636
+ var plus = 43;
101637
+ var slash = 47;
101638
+ var littleOffset = 26;
101639
+ var numberOffset = 52;
101640
+ if (bigA <= charCode && charCode <= bigZ) {
101641
+ return charCode - bigA;
101642
+ }
101643
+ if (littleA <= charCode && charCode <= littleZ) {
101644
+ return charCode - littleA + littleOffset;
101645
+ }
101646
+ if (zero <= charCode && charCode <= nine) {
101647
+ return charCode - zero + numberOffset;
101648
+ }
101649
+ if (charCode == plus) {
101650
+ return 62;
101651
+ }
101652
+ if (charCode == slash) {
101653
+ return 63;
101654
+ }
101655
+ return -1;
101656
+ };
101657
+ }
101658
+ });
101659
+
101660
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js
101661
+ var require_base64_vlq = __commonJS({
101662
+ "../../node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js"(exports) {
101663
+ "use strict";
101664
+ var base64 = require_base64();
101665
+ var VLQ_BASE_SHIFT = 5;
101666
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
101667
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
101668
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
101669
+ function toVLQSigned(aValue) {
101670
+ return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
101671
+ }
101672
+ function fromVLQSigned(aValue) {
101673
+ var isNegative = (aValue & 1) === 1;
101674
+ var shifted = aValue >> 1;
101675
+ return isNegative ? -shifted : shifted;
101676
+ }
101677
+ exports.encode = function base64VLQ_encode(aValue) {
101678
+ var encoded = "";
101679
+ var digit;
101680
+ var vlq = toVLQSigned(aValue);
101681
+ do {
101682
+ digit = vlq & VLQ_BASE_MASK;
101683
+ vlq >>>= VLQ_BASE_SHIFT;
101684
+ if (vlq > 0) {
101685
+ digit |= VLQ_CONTINUATION_BIT;
101686
+ }
101687
+ encoded += base64.encode(digit);
101688
+ } while (vlq > 0);
101689
+ return encoded;
101690
+ };
101691
+ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
101692
+ var strLen = aStr.length;
101693
+ var result = 0;
101694
+ var shift = 0;
101695
+ var continuation, digit;
101696
+ do {
101697
+ if (aIndex >= strLen) {
101698
+ throw new Error("Expected more digits in base 64 VLQ value.");
101699
+ }
101700
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
101701
+ if (digit === -1) {
101702
+ throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
101703
+ }
101704
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
101705
+ digit &= VLQ_BASE_MASK;
101706
+ result = result + (digit << shift);
101707
+ shift += VLQ_BASE_SHIFT;
101708
+ } while (continuation);
101709
+ aOutParam.value = fromVLQSigned(result);
101710
+ aOutParam.rest = aIndex;
101711
+ };
101712
+ }
101713
+ });
101714
+
101715
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/util.js
101716
+ var require_util4 = __commonJS({
101717
+ "../../node_modules/source-map-support/node_modules/source-map/lib/util.js"(exports) {
101718
+ "use strict";
101719
+ function getArg(aArgs, aName, aDefaultValue) {
101720
+ if (aName in aArgs) {
101721
+ return aArgs[aName];
101722
+ } else if (arguments.length === 3) {
101723
+ return aDefaultValue;
101724
+ } else {
101725
+ throw new Error('"' + aName + '" is a required argument.');
101726
+ }
101727
+ }
101728
+ exports.getArg = getArg;
101729
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
101730
+ var dataUrlRegexp = /^data:.+\,.+$/;
101731
+ function urlParse(aUrl) {
101732
+ var match = aUrl.match(urlRegexp);
101733
+ if (!match) {
101734
+ return null;
101735
+ }
101736
+ return {
101737
+ scheme: match[1],
101738
+ auth: match[2],
101739
+ host: match[3],
101740
+ port: match[4],
101741
+ path: match[5]
101742
+ };
101743
+ }
101744
+ exports.urlParse = urlParse;
101745
+ function urlGenerate(aParsedUrl) {
101746
+ var url = "";
101747
+ if (aParsedUrl.scheme) {
101748
+ url += aParsedUrl.scheme + ":";
101749
+ }
101750
+ url += "//";
101751
+ if (aParsedUrl.auth) {
101752
+ url += aParsedUrl.auth + "@";
101753
+ }
101754
+ if (aParsedUrl.host) {
101755
+ url += aParsedUrl.host;
101756
+ }
101757
+ if (aParsedUrl.port) {
101758
+ url += ":" + aParsedUrl.port;
101759
+ }
101760
+ if (aParsedUrl.path) {
101761
+ url += aParsedUrl.path;
101762
+ }
101763
+ return url;
101764
+ }
101765
+ exports.urlGenerate = urlGenerate;
101766
+ function normalize(aPath) {
101767
+ var path = aPath;
101768
+ var url = urlParse(aPath);
101769
+ if (url) {
101770
+ if (!url.path) {
101771
+ return aPath;
101772
+ }
101773
+ path = url.path;
101774
+ }
101775
+ var isAbsolute2 = exports.isAbsolute(path);
101776
+ var parts = path.split(/\/+/);
101777
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
101778
+ part = parts[i];
101779
+ if (part === ".") {
101780
+ parts.splice(i, 1);
101781
+ } else if (part === "..") {
101782
+ up++;
101783
+ } else if (up > 0) {
101784
+ if (part === "") {
101785
+ parts.splice(i + 1, up);
101786
+ up = 0;
101787
+ } else {
101788
+ parts.splice(i, 2);
101789
+ up--;
101790
+ }
101791
+ }
101792
+ }
101793
+ path = parts.join("/");
101794
+ if (path === "") {
101795
+ path = isAbsolute2 ? "/" : ".";
101796
+ }
101797
+ if (url) {
101798
+ url.path = path;
101799
+ return urlGenerate(url);
101800
+ }
101801
+ return path;
101802
+ }
101803
+ exports.normalize = normalize;
101804
+ function join8(aRoot, aPath) {
101805
+ if (aRoot === "") {
101806
+ aRoot = ".";
101807
+ }
101808
+ if (aPath === "") {
101809
+ aPath = ".";
101810
+ }
101811
+ var aPathUrl = urlParse(aPath);
101812
+ var aRootUrl = urlParse(aRoot);
101813
+ if (aRootUrl) {
101814
+ aRoot = aRootUrl.path || "/";
101815
+ }
101816
+ if (aPathUrl && !aPathUrl.scheme) {
101817
+ if (aRootUrl) {
101818
+ aPathUrl.scheme = aRootUrl.scheme;
101819
+ }
101820
+ return urlGenerate(aPathUrl);
101821
+ }
101822
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
101823
+ return aPath;
101824
+ }
101825
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
101826
+ aRootUrl.host = aPath;
101827
+ return urlGenerate(aRootUrl);
101828
+ }
101829
+ var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
101830
+ if (aRootUrl) {
101831
+ aRootUrl.path = joined;
101832
+ return urlGenerate(aRootUrl);
101833
+ }
101834
+ return joined;
101835
+ }
101836
+ exports.join = join8;
101837
+ exports.isAbsolute = function(aPath) {
101838
+ return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
101839
+ };
101840
+ function relative(aRoot, aPath) {
101841
+ if (aRoot === "") {
101842
+ aRoot = ".";
101843
+ }
101844
+ aRoot = aRoot.replace(/\/$/, "");
101845
+ var level = 0;
101846
+ while (aPath.indexOf(aRoot + "/") !== 0) {
101847
+ var index = aRoot.lastIndexOf("/");
101848
+ if (index < 0) {
101849
+ return aPath;
101850
+ }
101851
+ aRoot = aRoot.slice(0, index);
101852
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
101853
+ return aPath;
101854
+ }
101855
+ ++level;
101856
+ }
101857
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
101858
+ }
101859
+ exports.relative = relative;
101860
+ var supportsNullProto = (function() {
101861
+ var obj = /* @__PURE__ */ Object.create(null);
101862
+ return !("__proto__" in obj);
101863
+ })();
101864
+ function identity(s) {
101865
+ return s;
101866
+ }
101867
+ function toSetString(aStr) {
101868
+ if (isProtoString(aStr)) {
101869
+ return "$" + aStr;
101870
+ }
101871
+ return aStr;
101872
+ }
101873
+ exports.toSetString = supportsNullProto ? identity : toSetString;
101874
+ function fromSetString(aStr) {
101875
+ if (isProtoString(aStr)) {
101876
+ return aStr.slice(1);
101877
+ }
101878
+ return aStr;
101879
+ }
101880
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
101881
+ function isProtoString(s) {
101882
+ if (!s) {
101883
+ return false;
101884
+ }
101885
+ var length = s.length;
101886
+ if (length < 9) {
101887
+ return false;
101888
+ }
101889
+ if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
101890
+ return false;
101891
+ }
101892
+ for (var i = length - 10; i >= 0; i--) {
101893
+ if (s.charCodeAt(i) !== 36) {
101894
+ return false;
101895
+ }
101896
+ }
101897
+ return true;
101898
+ }
101899
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
101900
+ var cmp = strcmp(mappingA.source, mappingB.source);
101901
+ if (cmp !== 0) {
101902
+ return cmp;
101903
+ }
101904
+ cmp = mappingA.originalLine - mappingB.originalLine;
101905
+ if (cmp !== 0) {
101906
+ return cmp;
101907
+ }
101908
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
101909
+ if (cmp !== 0 || onlyCompareOriginal) {
101910
+ return cmp;
101911
+ }
101912
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
101913
+ if (cmp !== 0) {
101914
+ return cmp;
101915
+ }
101916
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
101917
+ if (cmp !== 0) {
101918
+ return cmp;
101919
+ }
101920
+ return strcmp(mappingA.name, mappingB.name);
101921
+ }
101922
+ exports.compareByOriginalPositions = compareByOriginalPositions;
101923
+ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
101924
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
101925
+ if (cmp !== 0) {
101926
+ return cmp;
101927
+ }
101928
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
101929
+ if (cmp !== 0 || onlyCompareGenerated) {
101930
+ return cmp;
101931
+ }
101932
+ cmp = strcmp(mappingA.source, mappingB.source);
101933
+ if (cmp !== 0) {
101934
+ return cmp;
101935
+ }
101936
+ cmp = mappingA.originalLine - mappingB.originalLine;
101937
+ if (cmp !== 0) {
101938
+ return cmp;
101939
+ }
101940
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
101941
+ if (cmp !== 0) {
101942
+ return cmp;
101943
+ }
101944
+ return strcmp(mappingA.name, mappingB.name);
101945
+ }
101946
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
101947
+ function strcmp(aStr1, aStr2) {
101948
+ if (aStr1 === aStr2) {
101949
+ return 0;
101950
+ }
101951
+ if (aStr1 === null) {
101952
+ return 1;
101953
+ }
101954
+ if (aStr2 === null) {
101955
+ return -1;
101956
+ }
101957
+ if (aStr1 > aStr2) {
101958
+ return 1;
101959
+ }
101960
+ return -1;
101961
+ }
101962
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
101963
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
101964
+ if (cmp !== 0) {
101965
+ return cmp;
101966
+ }
101967
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
101968
+ if (cmp !== 0) {
101969
+ return cmp;
101970
+ }
101971
+ cmp = strcmp(mappingA.source, mappingB.source);
101972
+ if (cmp !== 0) {
101973
+ return cmp;
101974
+ }
101975
+ cmp = mappingA.originalLine - mappingB.originalLine;
101976
+ if (cmp !== 0) {
101977
+ return cmp;
101978
+ }
101979
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
101980
+ if (cmp !== 0) {
101981
+ return cmp;
101982
+ }
101983
+ return strcmp(mappingA.name, mappingB.name);
101984
+ }
101985
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
101986
+ function parseSourceMapInput(str) {
101987
+ return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
101988
+ }
101989
+ exports.parseSourceMapInput = parseSourceMapInput;
101990
+ function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
101991
+ sourceURL = sourceURL || "";
101992
+ if (sourceRoot) {
101993
+ if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
101994
+ sourceRoot += "/";
101995
+ }
101996
+ sourceURL = sourceRoot + sourceURL;
101997
+ }
101998
+ if (sourceMapURL) {
101999
+ var parsed = urlParse(sourceMapURL);
102000
+ if (!parsed) {
102001
+ throw new Error("sourceMapURL could not be parsed");
102002
+ }
102003
+ if (parsed.path) {
102004
+ var index = parsed.path.lastIndexOf("/");
102005
+ if (index >= 0) {
102006
+ parsed.path = parsed.path.substring(0, index + 1);
102007
+ }
102008
+ }
102009
+ sourceURL = join8(urlGenerate(parsed), sourceURL);
102010
+ }
102011
+ return normalize(sourceURL);
102012
+ }
102013
+ exports.computeSourceURL = computeSourceURL;
102014
+ }
102015
+ });
102016
+
102017
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/array-set.js
102018
+ var require_array_set = __commonJS({
102019
+ "../../node_modules/source-map-support/node_modules/source-map/lib/array-set.js"(exports) {
102020
+ "use strict";
102021
+ var util = require_util4();
102022
+ var has = Object.prototype.hasOwnProperty;
102023
+ var hasNativeMap = typeof Map !== "undefined";
102024
+ function ArraySet() {
102025
+ this._array = [];
102026
+ this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
102027
+ }
102028
+ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
102029
+ var set = new ArraySet();
102030
+ for (var i = 0, len = aArray.length; i < len; i++) {
102031
+ set.add(aArray[i], aAllowDuplicates);
102032
+ }
102033
+ return set;
102034
+ };
102035
+ ArraySet.prototype.size = function ArraySet_size() {
102036
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
102037
+ };
102038
+ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
102039
+ var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
102040
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
102041
+ var idx = this._array.length;
102042
+ if (!isDuplicate || aAllowDuplicates) {
102043
+ this._array.push(aStr);
102044
+ }
102045
+ if (!isDuplicate) {
102046
+ if (hasNativeMap) {
102047
+ this._set.set(aStr, idx);
102048
+ } else {
102049
+ this._set[sStr] = idx;
102050
+ }
102051
+ }
102052
+ };
102053
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
102054
+ if (hasNativeMap) {
102055
+ return this._set.has(aStr);
102056
+ } else {
102057
+ var sStr = util.toSetString(aStr);
102058
+ return has.call(this._set, sStr);
102059
+ }
102060
+ };
102061
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
102062
+ if (hasNativeMap) {
102063
+ var idx = this._set.get(aStr);
102064
+ if (idx >= 0) {
102065
+ return idx;
102066
+ }
102067
+ } else {
102068
+ var sStr = util.toSetString(aStr);
102069
+ if (has.call(this._set, sStr)) {
102070
+ return this._set[sStr];
102071
+ }
102072
+ }
102073
+ throw new Error('"' + aStr + '" is not in the set.');
102074
+ };
102075
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
102076
+ if (aIdx >= 0 && aIdx < this._array.length) {
102077
+ return this._array[aIdx];
102078
+ }
102079
+ throw new Error("No element indexed by " + aIdx);
102080
+ };
102081
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
102082
+ return this._array.slice();
102083
+ };
102084
+ exports.ArraySet = ArraySet;
102085
+ }
102086
+ });
102087
+
102088
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/mapping-list.js
102089
+ var require_mapping_list = __commonJS({
102090
+ "../../node_modules/source-map-support/node_modules/source-map/lib/mapping-list.js"(exports) {
102091
+ "use strict";
102092
+ var util = require_util4();
102093
+ function generatedPositionAfter(mappingA, mappingB) {
102094
+ var lineA = mappingA.generatedLine;
102095
+ var lineB = mappingB.generatedLine;
102096
+ var columnA = mappingA.generatedColumn;
102097
+ var columnB = mappingB.generatedColumn;
102098
+ return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
102099
+ }
102100
+ function MappingList() {
102101
+ this._array = [];
102102
+ this._sorted = true;
102103
+ this._last = { generatedLine: -1, generatedColumn: 0 };
102104
+ }
102105
+ MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
102106
+ this._array.forEach(aCallback, aThisArg);
102107
+ };
102108
+ MappingList.prototype.add = function MappingList_add(aMapping) {
102109
+ if (generatedPositionAfter(this._last, aMapping)) {
102110
+ this._last = aMapping;
102111
+ this._array.push(aMapping);
102112
+ } else {
102113
+ this._sorted = false;
102114
+ this._array.push(aMapping);
102115
+ }
102116
+ };
102117
+ MappingList.prototype.toArray = function MappingList_toArray() {
102118
+ if (!this._sorted) {
102119
+ this._array.sort(util.compareByGeneratedPositionsInflated);
102120
+ this._sorted = true;
102121
+ }
102122
+ return this._array;
102123
+ };
102124
+ exports.MappingList = MappingList;
102125
+ }
102126
+ });
102127
+
102128
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js
102129
+ var require_source_map_generator = __commonJS({
102130
+ "../../node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js"(exports) {
102131
+ "use strict";
102132
+ var base64VLQ = require_base64_vlq();
102133
+ var util = require_util4();
102134
+ var ArraySet = require_array_set().ArraySet;
102135
+ var MappingList = require_mapping_list().MappingList;
102136
+ function SourceMapGenerator(aArgs) {
102137
+ if (!aArgs) {
102138
+ aArgs = {};
102139
+ }
102140
+ this._file = util.getArg(aArgs, "file", null);
102141
+ this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
102142
+ this._skipValidation = util.getArg(aArgs, "skipValidation", false);
102143
+ this._sources = new ArraySet();
102144
+ this._names = new ArraySet();
102145
+ this._mappings = new MappingList();
102146
+ this._sourcesContents = null;
102147
+ }
102148
+ SourceMapGenerator.prototype._version = 3;
102149
+ SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
102150
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
102151
+ var generator = new SourceMapGenerator({
102152
+ file: aSourceMapConsumer.file,
102153
+ sourceRoot
102154
+ });
102155
+ aSourceMapConsumer.eachMapping(function(mapping) {
102156
+ var newMapping = {
102157
+ generated: {
102158
+ line: mapping.generatedLine,
102159
+ column: mapping.generatedColumn
102160
+ }
102161
+ };
102162
+ if (mapping.source != null) {
102163
+ newMapping.source = mapping.source;
102164
+ if (sourceRoot != null) {
102165
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
102166
+ }
102167
+ newMapping.original = {
102168
+ line: mapping.originalLine,
102169
+ column: mapping.originalColumn
102170
+ };
102171
+ if (mapping.name != null) {
102172
+ newMapping.name = mapping.name;
102173
+ }
102174
+ }
102175
+ generator.addMapping(newMapping);
102176
+ });
102177
+ aSourceMapConsumer.sources.forEach(function(sourceFile) {
102178
+ var sourceRelative = sourceFile;
102179
+ if (sourceRoot !== null) {
102180
+ sourceRelative = util.relative(sourceRoot, sourceFile);
102181
+ }
102182
+ if (!generator._sources.has(sourceRelative)) {
102183
+ generator._sources.add(sourceRelative);
102184
+ }
102185
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
102186
+ if (content != null) {
102187
+ generator.setSourceContent(sourceFile, content);
102188
+ }
102189
+ });
102190
+ return generator;
102191
+ };
102192
+ SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
102193
+ var generated = util.getArg(aArgs, "generated");
102194
+ var original = util.getArg(aArgs, "original", null);
102195
+ var source = util.getArg(aArgs, "source", null);
102196
+ var name = util.getArg(aArgs, "name", null);
102197
+ if (!this._skipValidation) {
102198
+ this._validateMapping(generated, original, source, name);
102199
+ }
102200
+ if (source != null) {
102201
+ source = String(source);
102202
+ if (!this._sources.has(source)) {
102203
+ this._sources.add(source);
102204
+ }
102205
+ }
102206
+ if (name != null) {
102207
+ name = String(name);
102208
+ if (!this._names.has(name)) {
102209
+ this._names.add(name);
102210
+ }
102211
+ }
102212
+ this._mappings.add({
102213
+ generatedLine: generated.line,
102214
+ generatedColumn: generated.column,
102215
+ originalLine: original != null && original.line,
102216
+ originalColumn: original != null && original.column,
102217
+ source,
102218
+ name
102219
+ });
102220
+ };
102221
+ SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
102222
+ var source = aSourceFile;
102223
+ if (this._sourceRoot != null) {
102224
+ source = util.relative(this._sourceRoot, source);
102225
+ }
102226
+ if (aSourceContent != null) {
102227
+ if (!this._sourcesContents) {
102228
+ this._sourcesContents = /* @__PURE__ */ Object.create(null);
102229
+ }
102230
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
102231
+ } else if (this._sourcesContents) {
102232
+ delete this._sourcesContents[util.toSetString(source)];
102233
+ if (Object.keys(this._sourcesContents).length === 0) {
102234
+ this._sourcesContents = null;
102235
+ }
102236
+ }
102237
+ };
102238
+ SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
102239
+ var sourceFile = aSourceFile;
102240
+ if (aSourceFile == null) {
102241
+ if (aSourceMapConsumer.file == null) {
102242
+ throw new Error(
102243
+ `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
102244
+ );
102245
+ }
102246
+ sourceFile = aSourceMapConsumer.file;
102247
+ }
102248
+ var sourceRoot = this._sourceRoot;
102249
+ if (sourceRoot != null) {
102250
+ sourceFile = util.relative(sourceRoot, sourceFile);
102251
+ }
102252
+ var newSources = new ArraySet();
102253
+ var newNames = new ArraySet();
102254
+ this._mappings.unsortedForEach(function(mapping) {
102255
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
102256
+ var original = aSourceMapConsumer.originalPositionFor({
102257
+ line: mapping.originalLine,
102258
+ column: mapping.originalColumn
102259
+ });
102260
+ if (original.source != null) {
102261
+ mapping.source = original.source;
102262
+ if (aSourceMapPath != null) {
102263
+ mapping.source = util.join(aSourceMapPath, mapping.source);
102264
+ }
102265
+ if (sourceRoot != null) {
102266
+ mapping.source = util.relative(sourceRoot, mapping.source);
102267
+ }
102268
+ mapping.originalLine = original.line;
102269
+ mapping.originalColumn = original.column;
102270
+ if (original.name != null) {
102271
+ mapping.name = original.name;
102272
+ }
102273
+ }
102274
+ }
102275
+ var source = mapping.source;
102276
+ if (source != null && !newSources.has(source)) {
102277
+ newSources.add(source);
102278
+ }
102279
+ var name = mapping.name;
102280
+ if (name != null && !newNames.has(name)) {
102281
+ newNames.add(name);
102282
+ }
102283
+ }, this);
102284
+ this._sources = newSources;
102285
+ this._names = newNames;
102286
+ aSourceMapConsumer.sources.forEach(function(sourceFile2) {
102287
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
102288
+ if (content != null) {
102289
+ if (aSourceMapPath != null) {
102290
+ sourceFile2 = util.join(aSourceMapPath, sourceFile2);
102291
+ }
102292
+ if (sourceRoot != null) {
102293
+ sourceFile2 = util.relative(sourceRoot, sourceFile2);
102294
+ }
102295
+ this.setSourceContent(sourceFile2, content);
102296
+ }
102297
+ }, this);
102298
+ };
102299
+ SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
102300
+ if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
102301
+ throw new Error(
102302
+ "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
102303
+ );
102304
+ }
102305
+ if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
102306
+ return;
102307
+ } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
102308
+ return;
102309
+ } else {
102310
+ throw new Error("Invalid mapping: " + JSON.stringify({
102311
+ generated: aGenerated,
102312
+ source: aSource,
102313
+ original: aOriginal,
102314
+ name: aName
102315
+ }));
102316
+ }
102317
+ };
102318
+ SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
102319
+ var previousGeneratedColumn = 0;
102320
+ var previousGeneratedLine = 1;
102321
+ var previousOriginalColumn = 0;
102322
+ var previousOriginalLine = 0;
102323
+ var previousName = 0;
102324
+ var previousSource = 0;
102325
+ var result = "";
102326
+ var next;
102327
+ var mapping;
102328
+ var nameIdx;
102329
+ var sourceIdx;
102330
+ var mappings = this._mappings.toArray();
102331
+ for (var i = 0, len = mappings.length; i < len; i++) {
102332
+ mapping = mappings[i];
102333
+ next = "";
102334
+ if (mapping.generatedLine !== previousGeneratedLine) {
102335
+ previousGeneratedColumn = 0;
102336
+ while (mapping.generatedLine !== previousGeneratedLine) {
102337
+ next += ";";
102338
+ previousGeneratedLine++;
102339
+ }
102340
+ } else {
102341
+ if (i > 0) {
102342
+ if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
102343
+ continue;
102344
+ }
102345
+ next += ",";
102346
+ }
102347
+ }
102348
+ next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
102349
+ previousGeneratedColumn = mapping.generatedColumn;
102350
+ if (mapping.source != null) {
102351
+ sourceIdx = this._sources.indexOf(mapping.source);
102352
+ next += base64VLQ.encode(sourceIdx - previousSource);
102353
+ previousSource = sourceIdx;
102354
+ next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
102355
+ previousOriginalLine = mapping.originalLine - 1;
102356
+ next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
102357
+ previousOriginalColumn = mapping.originalColumn;
102358
+ if (mapping.name != null) {
102359
+ nameIdx = this._names.indexOf(mapping.name);
102360
+ next += base64VLQ.encode(nameIdx - previousName);
102361
+ previousName = nameIdx;
102362
+ }
102363
+ }
102364
+ result += next;
102365
+ }
102366
+ return result;
102367
+ };
102368
+ SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
102369
+ return aSources.map(function(source) {
102370
+ if (!this._sourcesContents) {
102371
+ return null;
102372
+ }
102373
+ if (aSourceRoot != null) {
102374
+ source = util.relative(aSourceRoot, source);
102375
+ }
102376
+ var key = util.toSetString(source);
102377
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
102378
+ }, this);
102379
+ };
102380
+ SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
102381
+ var map2 = {
102382
+ version: this._version,
102383
+ sources: this._sources.toArray(),
102384
+ names: this._names.toArray(),
102385
+ mappings: this._serializeMappings()
102386
+ };
102387
+ if (this._file != null) {
102388
+ map2.file = this._file;
102389
+ }
102390
+ if (this._sourceRoot != null) {
102391
+ map2.sourceRoot = this._sourceRoot;
102392
+ }
102393
+ if (this._sourcesContents) {
102394
+ map2.sourcesContent = this._generateSourcesContent(map2.sources, map2.sourceRoot);
102395
+ }
102396
+ return map2;
102397
+ };
102398
+ SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
102399
+ return JSON.stringify(this.toJSON());
102400
+ };
102401
+ exports.SourceMapGenerator = SourceMapGenerator;
102402
+ }
102403
+ });
102404
+
102405
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/binary-search.js
102406
+ var require_binary_search = __commonJS({
102407
+ "../../node_modules/source-map-support/node_modules/source-map/lib/binary-search.js"(exports) {
102408
+ "use strict";
102409
+ exports.GREATEST_LOWER_BOUND = 1;
102410
+ exports.LEAST_UPPER_BOUND = 2;
102411
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
102412
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
102413
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
102414
+ if (cmp === 0) {
102415
+ return mid;
102416
+ } else if (cmp > 0) {
102417
+ if (aHigh - mid > 1) {
102418
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
102419
+ }
102420
+ if (aBias == exports.LEAST_UPPER_BOUND) {
102421
+ return aHigh < aHaystack.length ? aHigh : -1;
102422
+ } else {
102423
+ return mid;
102424
+ }
102425
+ } else {
102426
+ if (mid - aLow > 1) {
102427
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
102428
+ }
102429
+ if (aBias == exports.LEAST_UPPER_BOUND) {
102430
+ return mid;
102431
+ } else {
102432
+ return aLow < 0 ? -1 : aLow;
102433
+ }
102434
+ }
102435
+ }
102436
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
102437
+ if (aHaystack.length === 0) {
102438
+ return -1;
102439
+ }
102440
+ var index = recursiveSearch(
102441
+ -1,
102442
+ aHaystack.length,
102443
+ aNeedle,
102444
+ aHaystack,
102445
+ aCompare,
102446
+ aBias || exports.GREATEST_LOWER_BOUND
102447
+ );
102448
+ if (index < 0) {
102449
+ return -1;
102450
+ }
102451
+ while (index - 1 >= 0) {
102452
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
102453
+ break;
102454
+ }
102455
+ --index;
102456
+ }
102457
+ return index;
102458
+ };
102459
+ }
102460
+ });
102461
+
102462
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/quick-sort.js
102463
+ var require_quick_sort = __commonJS({
102464
+ "../../node_modules/source-map-support/node_modules/source-map/lib/quick-sort.js"(exports) {
102465
+ "use strict";
102466
+ function swap(ary, x, y) {
102467
+ var temp = ary[x];
102468
+ ary[x] = ary[y];
102469
+ ary[y] = temp;
102470
+ }
102471
+ function randomIntInRange(low, high) {
102472
+ return Math.round(low + Math.random() * (high - low));
102473
+ }
102474
+ function doQuickSort(ary, comparator, p, r) {
102475
+ if (p < r) {
102476
+ var pivotIndex = randomIntInRange(p, r);
102477
+ var i = p - 1;
102478
+ swap(ary, pivotIndex, r);
102479
+ var pivot = ary[r];
102480
+ for (var j = p; j < r; j++) {
102481
+ if (comparator(ary[j], pivot) <= 0) {
102482
+ i += 1;
102483
+ swap(ary, i, j);
102484
+ }
102485
+ }
102486
+ swap(ary, i + 1, j);
102487
+ var q = i + 1;
102488
+ doQuickSort(ary, comparator, p, q - 1);
102489
+ doQuickSort(ary, comparator, q + 1, r);
102490
+ }
102491
+ }
102492
+ exports.quickSort = function(ary, comparator) {
102493
+ doQuickSort(ary, comparator, 0, ary.length - 1);
102494
+ };
102495
+ }
102496
+ });
102497
+
102498
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js
102499
+ var require_source_map_consumer = __commonJS({
102500
+ "../../node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js"(exports) {
102501
+ "use strict";
102502
+ var util = require_util4();
102503
+ var binarySearch = require_binary_search();
102504
+ var ArraySet = require_array_set().ArraySet;
102505
+ var base64VLQ = require_base64_vlq();
102506
+ var quickSort = require_quick_sort().quickSort;
102507
+ function SourceMapConsumer(aSourceMap, aSourceMapURL) {
102508
+ var sourceMap = aSourceMap;
102509
+ if (typeof aSourceMap === "string") {
102510
+ sourceMap = util.parseSourceMapInput(aSourceMap);
102511
+ }
102512
+ return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
102513
+ }
102514
+ SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
102515
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
102516
+ };
102517
+ SourceMapConsumer.prototype._version = 3;
102518
+ SourceMapConsumer.prototype.__generatedMappings = null;
102519
+ Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
102520
+ configurable: true,
102521
+ enumerable: true,
102522
+ get: function() {
102523
+ if (!this.__generatedMappings) {
102524
+ this._parseMappings(this._mappings, this.sourceRoot);
102525
+ }
102526
+ return this.__generatedMappings;
102527
+ }
102528
+ });
102529
+ SourceMapConsumer.prototype.__originalMappings = null;
102530
+ Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
102531
+ configurable: true,
102532
+ enumerable: true,
102533
+ get: function() {
102534
+ if (!this.__originalMappings) {
102535
+ this._parseMappings(this._mappings, this.sourceRoot);
102536
+ }
102537
+ return this.__originalMappings;
102538
+ }
102539
+ });
102540
+ SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
102541
+ var c = aStr.charAt(index);
102542
+ return c === ";" || c === ",";
102543
+ };
102544
+ SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
102545
+ throw new Error("Subclasses must implement _parseMappings");
102546
+ };
102547
+ SourceMapConsumer.GENERATED_ORDER = 1;
102548
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
102549
+ SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
102550
+ SourceMapConsumer.LEAST_UPPER_BOUND = 2;
102551
+ SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
102552
+ var context = aContext || null;
102553
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
102554
+ var mappings;
102555
+ switch (order) {
102556
+ case SourceMapConsumer.GENERATED_ORDER:
102557
+ mappings = this._generatedMappings;
102558
+ break;
102559
+ case SourceMapConsumer.ORIGINAL_ORDER:
102560
+ mappings = this._originalMappings;
102561
+ break;
102562
+ default:
102563
+ throw new Error("Unknown order of iteration.");
102564
+ }
102565
+ var sourceRoot = this.sourceRoot;
102566
+ mappings.map(function(mapping) {
102567
+ var source = mapping.source === null ? null : this._sources.at(mapping.source);
102568
+ source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
102569
+ return {
102570
+ source,
102571
+ generatedLine: mapping.generatedLine,
102572
+ generatedColumn: mapping.generatedColumn,
102573
+ originalLine: mapping.originalLine,
102574
+ originalColumn: mapping.originalColumn,
102575
+ name: mapping.name === null ? null : this._names.at(mapping.name)
102576
+ };
102577
+ }, this).forEach(aCallback, context);
102578
+ };
102579
+ SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
102580
+ var line = util.getArg(aArgs, "line");
102581
+ var needle = {
102582
+ source: util.getArg(aArgs, "source"),
102583
+ originalLine: line,
102584
+ originalColumn: util.getArg(aArgs, "column", 0)
102585
+ };
102586
+ needle.source = this._findSourceIndex(needle.source);
102587
+ if (needle.source < 0) {
102588
+ return [];
102589
+ }
102590
+ var mappings = [];
102591
+ var index = this._findMapping(
102592
+ needle,
102593
+ this._originalMappings,
102594
+ "originalLine",
102595
+ "originalColumn",
102596
+ util.compareByOriginalPositions,
102597
+ binarySearch.LEAST_UPPER_BOUND
102598
+ );
102599
+ if (index >= 0) {
102600
+ var mapping = this._originalMappings[index];
102601
+ if (aArgs.column === void 0) {
102602
+ var originalLine = mapping.originalLine;
102603
+ while (mapping && mapping.originalLine === originalLine) {
102604
+ mappings.push({
102605
+ line: util.getArg(mapping, "generatedLine", null),
102606
+ column: util.getArg(mapping, "generatedColumn", null),
102607
+ lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
102608
+ });
102609
+ mapping = this._originalMappings[++index];
102610
+ }
102611
+ } else {
102612
+ var originalColumn = mapping.originalColumn;
102613
+ while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
102614
+ mappings.push({
102615
+ line: util.getArg(mapping, "generatedLine", null),
102616
+ column: util.getArg(mapping, "generatedColumn", null),
102617
+ lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
102618
+ });
102619
+ mapping = this._originalMappings[++index];
102620
+ }
102621
+ }
102622
+ }
102623
+ return mappings;
102624
+ };
102625
+ exports.SourceMapConsumer = SourceMapConsumer;
102626
+ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
102627
+ var sourceMap = aSourceMap;
102628
+ if (typeof aSourceMap === "string") {
102629
+ sourceMap = util.parseSourceMapInput(aSourceMap);
102630
+ }
102631
+ var version = util.getArg(sourceMap, "version");
102632
+ var sources = util.getArg(sourceMap, "sources");
102633
+ var names = util.getArg(sourceMap, "names", []);
102634
+ var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
102635
+ var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
102636
+ var mappings = util.getArg(sourceMap, "mappings");
102637
+ var file = util.getArg(sourceMap, "file", null);
102638
+ if (version != this._version) {
102639
+ throw new Error("Unsupported version: " + version);
102640
+ }
102641
+ if (sourceRoot) {
102642
+ sourceRoot = util.normalize(sourceRoot);
102643
+ }
102644
+ sources = sources.map(String).map(util.normalize).map(function(source) {
102645
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
102646
+ });
102647
+ this._names = ArraySet.fromArray(names.map(String), true);
102648
+ this._sources = ArraySet.fromArray(sources, true);
102649
+ this._absoluteSources = this._sources.toArray().map(function(s) {
102650
+ return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
102651
+ });
102652
+ this.sourceRoot = sourceRoot;
102653
+ this.sourcesContent = sourcesContent;
102654
+ this._mappings = mappings;
102655
+ this._sourceMapURL = aSourceMapURL;
102656
+ this.file = file;
102657
+ }
102658
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
102659
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
102660
+ BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
102661
+ var relativeSource = aSource;
102662
+ if (this.sourceRoot != null) {
102663
+ relativeSource = util.relative(this.sourceRoot, relativeSource);
102664
+ }
102665
+ if (this._sources.has(relativeSource)) {
102666
+ return this._sources.indexOf(relativeSource);
102667
+ }
102668
+ var i;
102669
+ for (i = 0; i < this._absoluteSources.length; ++i) {
102670
+ if (this._absoluteSources[i] == aSource) {
102671
+ return i;
102672
+ }
102673
+ }
102674
+ return -1;
102675
+ };
102676
+ BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
102677
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
102678
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
102679
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
102680
+ smc.sourceRoot = aSourceMap._sourceRoot;
102681
+ smc.sourcesContent = aSourceMap._generateSourcesContent(
102682
+ smc._sources.toArray(),
102683
+ smc.sourceRoot
102684
+ );
102685
+ smc.file = aSourceMap._file;
102686
+ smc._sourceMapURL = aSourceMapURL;
102687
+ smc._absoluteSources = smc._sources.toArray().map(function(s) {
102688
+ return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
102689
+ });
102690
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
102691
+ var destGeneratedMappings = smc.__generatedMappings = [];
102692
+ var destOriginalMappings = smc.__originalMappings = [];
102693
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
102694
+ var srcMapping = generatedMappings[i];
102695
+ var destMapping = new Mapping();
102696
+ destMapping.generatedLine = srcMapping.generatedLine;
102697
+ destMapping.generatedColumn = srcMapping.generatedColumn;
102698
+ if (srcMapping.source) {
102699
+ destMapping.source = sources.indexOf(srcMapping.source);
102700
+ destMapping.originalLine = srcMapping.originalLine;
102701
+ destMapping.originalColumn = srcMapping.originalColumn;
102702
+ if (srcMapping.name) {
102703
+ destMapping.name = names.indexOf(srcMapping.name);
102704
+ }
102705
+ destOriginalMappings.push(destMapping);
102706
+ }
102707
+ destGeneratedMappings.push(destMapping);
102708
+ }
102709
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
102710
+ return smc;
102711
+ };
102712
+ BasicSourceMapConsumer.prototype._version = 3;
102713
+ Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
102714
+ get: function() {
102715
+ return this._absoluteSources.slice();
102716
+ }
102717
+ });
102718
+ function Mapping() {
102719
+ this.generatedLine = 0;
102720
+ this.generatedColumn = 0;
102721
+ this.source = null;
102722
+ this.originalLine = null;
102723
+ this.originalColumn = null;
102724
+ this.name = null;
102725
+ }
102726
+ BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
102727
+ var generatedLine = 1;
102728
+ var previousGeneratedColumn = 0;
102729
+ var previousOriginalLine = 0;
102730
+ var previousOriginalColumn = 0;
102731
+ var previousSource = 0;
102732
+ var previousName = 0;
102733
+ var length = aStr.length;
102734
+ var index = 0;
102735
+ var cachedSegments = {};
102736
+ var temp = {};
102737
+ var originalMappings = [];
102738
+ var generatedMappings = [];
102739
+ var mapping, str, segment, end, value;
102740
+ while (index < length) {
102741
+ if (aStr.charAt(index) === ";") {
102742
+ generatedLine++;
102743
+ index++;
102744
+ previousGeneratedColumn = 0;
102745
+ } else if (aStr.charAt(index) === ",") {
102746
+ index++;
102747
+ } else {
102748
+ mapping = new Mapping();
102749
+ mapping.generatedLine = generatedLine;
102750
+ for (end = index; end < length; end++) {
102751
+ if (this._charIsMappingSeparator(aStr, end)) {
102752
+ break;
102753
+ }
102754
+ }
102755
+ str = aStr.slice(index, end);
102756
+ segment = cachedSegments[str];
102757
+ if (segment) {
102758
+ index += str.length;
102759
+ } else {
102760
+ segment = [];
102761
+ while (index < end) {
102762
+ base64VLQ.decode(aStr, index, temp);
102763
+ value = temp.value;
102764
+ index = temp.rest;
102765
+ segment.push(value);
102766
+ }
102767
+ if (segment.length === 2) {
102768
+ throw new Error("Found a source, but no line and column");
102769
+ }
102770
+ if (segment.length === 3) {
102771
+ throw new Error("Found a source and line, but no column");
102772
+ }
102773
+ cachedSegments[str] = segment;
102774
+ }
102775
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
102776
+ previousGeneratedColumn = mapping.generatedColumn;
102777
+ if (segment.length > 1) {
102778
+ mapping.source = previousSource + segment[1];
102779
+ previousSource += segment[1];
102780
+ mapping.originalLine = previousOriginalLine + segment[2];
102781
+ previousOriginalLine = mapping.originalLine;
102782
+ mapping.originalLine += 1;
102783
+ mapping.originalColumn = previousOriginalColumn + segment[3];
102784
+ previousOriginalColumn = mapping.originalColumn;
102785
+ if (segment.length > 4) {
102786
+ mapping.name = previousName + segment[4];
102787
+ previousName += segment[4];
102788
+ }
102789
+ }
102790
+ generatedMappings.push(mapping);
102791
+ if (typeof mapping.originalLine === "number") {
102792
+ originalMappings.push(mapping);
102793
+ }
102794
+ }
102795
+ }
102796
+ quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
102797
+ this.__generatedMappings = generatedMappings;
102798
+ quickSort(originalMappings, util.compareByOriginalPositions);
102799
+ this.__originalMappings = originalMappings;
102800
+ };
102801
+ BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
102802
+ if (aNeedle[aLineName] <= 0) {
102803
+ throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
102804
+ }
102805
+ if (aNeedle[aColumnName] < 0) {
102806
+ throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
102807
+ }
102808
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
102809
+ };
102810
+ BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
102811
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
102812
+ var mapping = this._generatedMappings[index];
102813
+ if (index + 1 < this._generatedMappings.length) {
102814
+ var nextMapping = this._generatedMappings[index + 1];
102815
+ if (mapping.generatedLine === nextMapping.generatedLine) {
102816
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
102817
+ continue;
102818
+ }
102819
+ }
102820
+ mapping.lastGeneratedColumn = Infinity;
102821
+ }
102822
+ };
102823
+ BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
102824
+ var needle = {
102825
+ generatedLine: util.getArg(aArgs, "line"),
102826
+ generatedColumn: util.getArg(aArgs, "column")
102827
+ };
102828
+ var index = this._findMapping(
102829
+ needle,
102830
+ this._generatedMappings,
102831
+ "generatedLine",
102832
+ "generatedColumn",
102833
+ util.compareByGeneratedPositionsDeflated,
102834
+ util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
102835
+ );
102836
+ if (index >= 0) {
102837
+ var mapping = this._generatedMappings[index];
102838
+ if (mapping.generatedLine === needle.generatedLine) {
102839
+ var source = util.getArg(mapping, "source", null);
102840
+ if (source !== null) {
102841
+ source = this._sources.at(source);
102842
+ source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
102843
+ }
102844
+ var name = util.getArg(mapping, "name", null);
102845
+ if (name !== null) {
102846
+ name = this._names.at(name);
102847
+ }
102848
+ return {
102849
+ source,
102850
+ line: util.getArg(mapping, "originalLine", null),
102851
+ column: util.getArg(mapping, "originalColumn", null),
102852
+ name
102853
+ };
102854
+ }
102855
+ }
102856
+ return {
102857
+ source: null,
102858
+ line: null,
102859
+ column: null,
102860
+ name: null
102861
+ };
102862
+ };
102863
+ BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
102864
+ if (!this.sourcesContent) {
102865
+ return false;
102866
+ }
102867
+ return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
102868
+ return sc == null;
102869
+ });
102870
+ };
102871
+ BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
102872
+ if (!this.sourcesContent) {
102873
+ return null;
102874
+ }
102875
+ var index = this._findSourceIndex(aSource);
102876
+ if (index >= 0) {
102877
+ return this.sourcesContent[index];
102878
+ }
102879
+ var relativeSource = aSource;
102880
+ if (this.sourceRoot != null) {
102881
+ relativeSource = util.relative(this.sourceRoot, relativeSource);
102882
+ }
102883
+ var url;
102884
+ if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
102885
+ var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
102886
+ if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
102887
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
102888
+ }
102889
+ if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
102890
+ return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
102891
+ }
102892
+ }
102893
+ if (nullOnMissing) {
102894
+ return null;
102895
+ } else {
102896
+ throw new Error('"' + relativeSource + '" is not in the SourceMap.');
102897
+ }
102898
+ };
102899
+ BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
102900
+ var source = util.getArg(aArgs, "source");
102901
+ source = this._findSourceIndex(source);
102902
+ if (source < 0) {
102903
+ return {
102904
+ line: null,
102905
+ column: null,
102906
+ lastColumn: null
102907
+ };
102908
+ }
102909
+ var needle = {
102910
+ source,
102911
+ originalLine: util.getArg(aArgs, "line"),
102912
+ originalColumn: util.getArg(aArgs, "column")
102913
+ };
102914
+ var index = this._findMapping(
102915
+ needle,
102916
+ this._originalMappings,
102917
+ "originalLine",
102918
+ "originalColumn",
102919
+ util.compareByOriginalPositions,
102920
+ util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
102921
+ );
102922
+ if (index >= 0) {
102923
+ var mapping = this._originalMappings[index];
102924
+ if (mapping.source === needle.source) {
102925
+ return {
102926
+ line: util.getArg(mapping, "generatedLine", null),
102927
+ column: util.getArg(mapping, "generatedColumn", null),
102928
+ lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
102929
+ };
102930
+ }
102931
+ }
102932
+ return {
102933
+ line: null,
102934
+ column: null,
102935
+ lastColumn: null
102936
+ };
102937
+ };
102938
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
102939
+ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
102940
+ var sourceMap = aSourceMap;
102941
+ if (typeof aSourceMap === "string") {
102942
+ sourceMap = util.parseSourceMapInput(aSourceMap);
102943
+ }
102944
+ var version = util.getArg(sourceMap, "version");
102945
+ var sections = util.getArg(sourceMap, "sections");
102946
+ if (version != this._version) {
102947
+ throw new Error("Unsupported version: " + version);
102948
+ }
102949
+ this._sources = new ArraySet();
102950
+ this._names = new ArraySet();
102951
+ var lastOffset = {
102952
+ line: -1,
102953
+ column: 0
102954
+ };
102955
+ this._sections = sections.map(function(s) {
102956
+ if (s.url) {
102957
+ throw new Error("Support for url field in sections not implemented.");
102958
+ }
102959
+ var offset = util.getArg(s, "offset");
102960
+ var offsetLine = util.getArg(offset, "line");
102961
+ var offsetColumn = util.getArg(offset, "column");
102962
+ if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
102963
+ throw new Error("Section offsets must be ordered and non-overlapping.");
102964
+ }
102965
+ lastOffset = offset;
102966
+ return {
102967
+ generatedOffset: {
102968
+ // The offset fields are 0-based, but we use 1-based indices when
102969
+ // encoding/decoding from VLQ.
102970
+ generatedLine: offsetLine + 1,
102971
+ generatedColumn: offsetColumn + 1
102972
+ },
102973
+ consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
102974
+ };
102975
+ });
102976
+ }
102977
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
102978
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
102979
+ IndexedSourceMapConsumer.prototype._version = 3;
102980
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
102981
+ get: function() {
102982
+ var sources = [];
102983
+ for (var i = 0; i < this._sections.length; i++) {
102984
+ for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
102985
+ sources.push(this._sections[i].consumer.sources[j]);
102986
+ }
102987
+ }
102988
+ return sources;
102989
+ }
102990
+ });
102991
+ IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
102992
+ var needle = {
102993
+ generatedLine: util.getArg(aArgs, "line"),
102994
+ generatedColumn: util.getArg(aArgs, "column")
102995
+ };
102996
+ var sectionIndex = binarySearch.search(
102997
+ needle,
102998
+ this._sections,
102999
+ function(needle2, section2) {
103000
+ var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
103001
+ if (cmp) {
103002
+ return cmp;
103003
+ }
103004
+ return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
103005
+ }
103006
+ );
103007
+ var section = this._sections[sectionIndex];
103008
+ if (!section) {
103009
+ return {
103010
+ source: null,
103011
+ line: null,
103012
+ column: null,
103013
+ name: null
103014
+ };
103015
+ }
103016
+ return section.consumer.originalPositionFor({
103017
+ line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
103018
+ column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
103019
+ bias: aArgs.bias
103020
+ });
103021
+ };
103022
+ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
103023
+ return this._sections.every(function(s) {
103024
+ return s.consumer.hasContentsOfAllSources();
103025
+ });
103026
+ };
103027
+ IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
103028
+ for (var i = 0; i < this._sections.length; i++) {
103029
+ var section = this._sections[i];
103030
+ var content = section.consumer.sourceContentFor(aSource, true);
103031
+ if (content) {
103032
+ return content;
103033
+ }
103034
+ }
103035
+ if (nullOnMissing) {
103036
+ return null;
103037
+ } else {
103038
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
103039
+ }
103040
+ };
103041
+ IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
103042
+ for (var i = 0; i < this._sections.length; i++) {
103043
+ var section = this._sections[i];
103044
+ if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) {
103045
+ continue;
103046
+ }
103047
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
103048
+ if (generatedPosition) {
103049
+ var ret = {
103050
+ line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
103051
+ column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
103052
+ };
103053
+ return ret;
103054
+ }
103055
+ }
103056
+ return {
103057
+ line: null,
103058
+ column: null
103059
+ };
103060
+ };
103061
+ IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
103062
+ this.__generatedMappings = [];
103063
+ this.__originalMappings = [];
103064
+ for (var i = 0; i < this._sections.length; i++) {
103065
+ var section = this._sections[i];
103066
+ var sectionMappings = section.consumer._generatedMappings;
103067
+ for (var j = 0; j < sectionMappings.length; j++) {
103068
+ var mapping = sectionMappings[j];
103069
+ var source = section.consumer._sources.at(mapping.source);
103070
+ source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
103071
+ this._sources.add(source);
103072
+ source = this._sources.indexOf(source);
103073
+ var name = null;
103074
+ if (mapping.name) {
103075
+ name = section.consumer._names.at(mapping.name);
103076
+ this._names.add(name);
103077
+ name = this._names.indexOf(name);
103078
+ }
103079
+ var adjustedMapping = {
103080
+ source,
103081
+ generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
103082
+ generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
103083
+ originalLine: mapping.originalLine,
103084
+ originalColumn: mapping.originalColumn,
103085
+ name
103086
+ };
103087
+ this.__generatedMappings.push(adjustedMapping);
103088
+ if (typeof adjustedMapping.originalLine === "number") {
103089
+ this.__originalMappings.push(adjustedMapping);
103090
+ }
103091
+ }
103092
+ }
103093
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
103094
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
103095
+ };
103096
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
103097
+ }
103098
+ });
103099
+
103100
+ // ../../node_modules/source-map-support/node_modules/source-map/lib/source-node.js
103101
+ var require_source_node = __commonJS({
103102
+ "../../node_modules/source-map-support/node_modules/source-map/lib/source-node.js"(exports) {
103103
+ "use strict";
103104
+ var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
103105
+ var util = require_util4();
103106
+ var REGEX_NEWLINE = /(\r?\n)/;
103107
+ var NEWLINE_CODE = 10;
103108
+ var isSourceNode = "$$$isSourceNode$$$";
103109
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
103110
+ this.children = [];
103111
+ this.sourceContents = {};
103112
+ this.line = aLine == null ? null : aLine;
103113
+ this.column = aColumn == null ? null : aColumn;
103114
+ this.source = aSource == null ? null : aSource;
103115
+ this.name = aName == null ? null : aName;
103116
+ this[isSourceNode] = true;
103117
+ if (aChunks != null) this.add(aChunks);
103118
+ }
103119
+ SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
103120
+ var node = new SourceNode();
103121
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
103122
+ var remainingLinesIndex = 0;
103123
+ var shiftNextLine = function() {
103124
+ var lineContents = getNextLine();
103125
+ var newLine = getNextLine() || "";
103126
+ return lineContents + newLine;
103127
+ function getNextLine() {
103128
+ return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
103129
+ }
103130
+ };
103131
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
103132
+ var lastMapping = null;
103133
+ aSourceMapConsumer.eachMapping(function(mapping) {
103134
+ if (lastMapping !== null) {
103135
+ if (lastGeneratedLine < mapping.generatedLine) {
103136
+ addMappingWithCode(lastMapping, shiftNextLine());
103137
+ lastGeneratedLine++;
103138
+ lastGeneratedColumn = 0;
103139
+ } else {
103140
+ var nextLine = remainingLines[remainingLinesIndex] || "";
103141
+ var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
103142
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
103143
+ lastGeneratedColumn = mapping.generatedColumn;
103144
+ addMappingWithCode(lastMapping, code);
103145
+ lastMapping = mapping;
103146
+ return;
103147
+ }
103148
+ }
103149
+ while (lastGeneratedLine < mapping.generatedLine) {
103150
+ node.add(shiftNextLine());
103151
+ lastGeneratedLine++;
103152
+ }
103153
+ if (lastGeneratedColumn < mapping.generatedColumn) {
103154
+ var nextLine = remainingLines[remainingLinesIndex] || "";
103155
+ node.add(nextLine.substr(0, mapping.generatedColumn));
103156
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
103157
+ lastGeneratedColumn = mapping.generatedColumn;
103158
+ }
103159
+ lastMapping = mapping;
103160
+ }, this);
103161
+ if (remainingLinesIndex < remainingLines.length) {
103162
+ if (lastMapping) {
103163
+ addMappingWithCode(lastMapping, shiftNextLine());
103164
+ }
103165
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
103166
+ }
103167
+ aSourceMapConsumer.sources.forEach(function(sourceFile) {
103168
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
103169
+ if (content != null) {
103170
+ if (aRelativePath != null) {
103171
+ sourceFile = util.join(aRelativePath, sourceFile);
103172
+ }
103173
+ node.setSourceContent(sourceFile, content);
103174
+ }
103175
+ });
103176
+ return node;
103177
+ function addMappingWithCode(mapping, code) {
103178
+ if (mapping === null || mapping.source === void 0) {
103179
+ node.add(code);
103180
+ } else {
103181
+ var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
103182
+ node.add(new SourceNode(
103183
+ mapping.originalLine,
103184
+ mapping.originalColumn,
103185
+ source,
103186
+ code,
103187
+ mapping.name
103188
+ ));
103189
+ }
103190
+ }
103191
+ };
103192
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
103193
+ if (Array.isArray(aChunk)) {
103194
+ aChunk.forEach(function(chunk) {
103195
+ this.add(chunk);
103196
+ }, this);
103197
+ } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
103198
+ if (aChunk) {
103199
+ this.children.push(aChunk);
103200
+ }
103201
+ } else {
103202
+ throw new TypeError(
103203
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
103204
+ );
103205
+ }
103206
+ return this;
103207
+ };
103208
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
103209
+ if (Array.isArray(aChunk)) {
103210
+ for (var i = aChunk.length - 1; i >= 0; i--) {
103211
+ this.prepend(aChunk[i]);
103212
+ }
103213
+ } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
103214
+ this.children.unshift(aChunk);
103215
+ } else {
103216
+ throw new TypeError(
103217
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
103218
+ );
103219
+ }
103220
+ return this;
103221
+ };
103222
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
103223
+ var chunk;
103224
+ for (var i = 0, len = this.children.length; i < len; i++) {
103225
+ chunk = this.children[i];
103226
+ if (chunk[isSourceNode]) {
103227
+ chunk.walk(aFn);
103228
+ } else {
103229
+ if (chunk !== "") {
103230
+ aFn(chunk, {
103231
+ source: this.source,
103232
+ line: this.line,
103233
+ column: this.column,
103234
+ name: this.name
103235
+ });
103236
+ }
103237
+ }
103238
+ }
103239
+ };
103240
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
103241
+ var newChildren;
103242
+ var i;
103243
+ var len = this.children.length;
103244
+ if (len > 0) {
103245
+ newChildren = [];
103246
+ for (i = 0; i < len - 1; i++) {
103247
+ newChildren.push(this.children[i]);
103248
+ newChildren.push(aSep);
103249
+ }
103250
+ newChildren.push(this.children[i]);
103251
+ this.children = newChildren;
103252
+ }
103253
+ return this;
103254
+ };
103255
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
103256
+ var lastChild = this.children[this.children.length - 1];
103257
+ if (lastChild[isSourceNode]) {
103258
+ lastChild.replaceRight(aPattern, aReplacement);
103259
+ } else if (typeof lastChild === "string") {
103260
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
103261
+ } else {
103262
+ this.children.push("".replace(aPattern, aReplacement));
103263
+ }
103264
+ return this;
103265
+ };
103266
+ SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
103267
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
103268
+ };
103269
+ SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
103270
+ for (var i = 0, len = this.children.length; i < len; i++) {
103271
+ if (this.children[i][isSourceNode]) {
103272
+ this.children[i].walkSourceContents(aFn);
103273
+ }
103274
+ }
103275
+ var sources = Object.keys(this.sourceContents);
103276
+ for (var i = 0, len = sources.length; i < len; i++) {
103277
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
103278
+ }
103279
+ };
103280
+ SourceNode.prototype.toString = function SourceNode_toString() {
103281
+ var str = "";
103282
+ this.walk(function(chunk) {
103283
+ str += chunk;
103284
+ });
103285
+ return str;
103286
+ };
103287
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
103288
+ var generated = {
103289
+ code: "",
103290
+ line: 1,
103291
+ column: 0
103292
+ };
103293
+ var map2 = new SourceMapGenerator(aArgs);
103294
+ var sourceMappingActive = false;
103295
+ var lastOriginalSource = null;
103296
+ var lastOriginalLine = null;
103297
+ var lastOriginalColumn = null;
103298
+ var lastOriginalName = null;
103299
+ this.walk(function(chunk, original) {
103300
+ generated.code += chunk;
103301
+ if (original.source !== null && original.line !== null && original.column !== null) {
103302
+ if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
103303
+ map2.addMapping({
103304
+ source: original.source,
103305
+ original: {
103306
+ line: original.line,
103307
+ column: original.column
103308
+ },
103309
+ generated: {
103310
+ line: generated.line,
103311
+ column: generated.column
103312
+ },
103313
+ name: original.name
103314
+ });
103315
+ }
103316
+ lastOriginalSource = original.source;
103317
+ lastOriginalLine = original.line;
103318
+ lastOriginalColumn = original.column;
103319
+ lastOriginalName = original.name;
103320
+ sourceMappingActive = true;
103321
+ } else if (sourceMappingActive) {
103322
+ map2.addMapping({
103323
+ generated: {
103324
+ line: generated.line,
103325
+ column: generated.column
103326
+ }
103327
+ });
103328
+ lastOriginalSource = null;
103329
+ sourceMappingActive = false;
103330
+ }
103331
+ for (var idx = 0, length = chunk.length; idx < length; idx++) {
103332
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
103333
+ generated.line++;
103334
+ generated.column = 0;
103335
+ if (idx + 1 === length) {
103336
+ lastOriginalSource = null;
103337
+ sourceMappingActive = false;
103338
+ } else if (sourceMappingActive) {
103339
+ map2.addMapping({
103340
+ source: original.source,
103341
+ original: {
103342
+ line: original.line,
103343
+ column: original.column
103344
+ },
103345
+ generated: {
103346
+ line: generated.line,
103347
+ column: generated.column
103348
+ },
103349
+ name: original.name
103350
+ });
103351
+ }
103352
+ } else {
103353
+ generated.column++;
103354
+ }
103355
+ }
103356
+ });
103357
+ this.walkSourceContents(function(sourceFile, sourceContent) {
103358
+ map2.setSourceContent(sourceFile, sourceContent);
103359
+ });
103360
+ return { code: generated.code, map: map2 };
103361
+ };
103362
+ exports.SourceNode = SourceNode;
103363
+ }
103364
+ });
103365
+
103366
+ // ../../node_modules/source-map-support/node_modules/source-map/source-map.js
103367
+ var require_source_map = __commonJS({
103368
+ "../../node_modules/source-map-support/node_modules/source-map/source-map.js"(exports) {
103369
+ "use strict";
103370
+ exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
103371
+ exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
103372
+ exports.SourceNode = require_source_node().SourceNode;
103373
+ }
103374
+ });
103375
+
103376
+ // ../../node_modules/buffer-from/index.js
103377
+ var require_buffer_from = __commonJS({
103378
+ "../../node_modules/buffer-from/index.js"(exports, module) {
103379
+ "use strict";
103380
+ var toString = Object.prototype.toString;
103381
+ var isModern = typeof Buffer !== "undefined" && typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
103382
+ function isArrayBuffer(input) {
103383
+ return toString.call(input).slice(8, -1) === "ArrayBuffer";
103384
+ }
103385
+ function fromArrayBuffer(obj, byteOffset, length) {
103386
+ byteOffset >>>= 0;
103387
+ var maxLength = obj.byteLength - byteOffset;
103388
+ if (maxLength < 0) {
103389
+ throw new RangeError("'offset' is out of bounds");
103390
+ }
103391
+ if (length === void 0) {
103392
+ length = maxLength;
103393
+ } else {
103394
+ length >>>= 0;
103395
+ if (length > maxLength) {
103396
+ throw new RangeError("'length' is out of bounds");
103397
+ }
103398
+ }
103399
+ return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)));
103400
+ }
103401
+ function fromString(string, encoding) {
103402
+ if (typeof encoding !== "string" || encoding === "") {
103403
+ encoding = "utf8";
103404
+ }
103405
+ if (!Buffer.isEncoding(encoding)) {
103406
+ throw new TypeError('"encoding" must be a valid string encoding');
103407
+ }
103408
+ return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding);
103409
+ }
103410
+ function bufferFrom(value, encodingOrOffset, length) {
103411
+ if (typeof value === "number") {
103412
+ throw new TypeError('"value" argument must not be a number');
103413
+ }
103414
+ if (isArrayBuffer(value)) {
103415
+ return fromArrayBuffer(value, encodingOrOffset, length);
103416
+ }
103417
+ if (typeof value === "string") {
103418
+ return fromString(value, encodingOrOffset);
103419
+ }
103420
+ return isModern ? Buffer.from(value) : new Buffer(value);
103421
+ }
103422
+ module.exports = bufferFrom;
103423
+ }
103424
+ });
103425
+
103426
+ // ../../node_modules/source-map-support/source-map-support.js
103427
+ var require_source_map_support = __commonJS({
103428
+ "../../node_modules/source-map-support/source-map-support.js"(exports, module) {
103429
+ "use strict";
103430
+ var SourceMapConsumer = require_source_map().SourceMapConsumer;
103431
+ var path = __require("path");
103432
+ var fs;
103433
+ try {
103434
+ fs = __require("fs");
103435
+ if (!fs.existsSync || !fs.readFileSync) {
103436
+ fs = null;
103437
+ }
103438
+ } catch (err) {
103439
+ }
103440
+ var bufferFrom = require_buffer_from();
103441
+ function dynamicRequire(mod, request) {
103442
+ return mod.require(request);
103443
+ }
103444
+ var errorFormatterInstalled = false;
103445
+ var uncaughtShimInstalled = false;
103446
+ var emptyCacheBetweenOperations = false;
103447
+ var environment = "auto";
103448
+ var fileContentsCache = {};
103449
+ var sourceMapCache = {};
103450
+ var reSourceMap = /^data:application\/json[^,]+base64,/;
103451
+ var retrieveFileHandlers = [];
103452
+ var retrieveMapHandlers = [];
103453
+ function isInBrowser() {
103454
+ if (environment === "browser")
103455
+ return true;
103456
+ if (environment === "node")
103457
+ return false;
103458
+ return typeof window !== "undefined" && typeof XMLHttpRequest === "function" && !(window.require && window.module && window.process && window.process.type === "renderer");
103459
+ }
103460
+ function hasGlobalProcessEventEmitter() {
103461
+ return typeof process === "object" && process !== null && typeof process.on === "function";
103462
+ }
103463
+ function globalProcessVersion() {
103464
+ if (typeof process === "object" && process !== null) {
103465
+ return process.version;
103466
+ } else {
103467
+ return "";
103468
+ }
103469
+ }
103470
+ function globalProcessStderr() {
103471
+ if (typeof process === "object" && process !== null) {
103472
+ return process.stderr;
103473
+ }
103474
+ }
103475
+ function globalProcessExit(code) {
103476
+ if (typeof process === "object" && process !== null && typeof process.exit === "function") {
103477
+ return process.exit(code);
103478
+ }
103479
+ }
103480
+ function handlerExec(list) {
103481
+ return function(arg) {
103482
+ for (var i = 0; i < list.length; i++) {
103483
+ var ret = list[i](arg);
103484
+ if (ret) {
103485
+ return ret;
103486
+ }
103487
+ }
103488
+ return null;
103489
+ };
103490
+ }
103491
+ var retrieveFile = handlerExec(retrieveFileHandlers);
103492
+ retrieveFileHandlers.push(function(path2) {
103493
+ path2 = path2.trim();
103494
+ if (/^file:/.test(path2)) {
103495
+ path2 = path2.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
103496
+ return drive ? "" : (
103497
+ // file:///C:/dir/file -> C:/dir/file
103498
+ "/"
103499
+ );
103500
+ });
103501
+ }
103502
+ if (path2 in fileContentsCache) {
103503
+ return fileContentsCache[path2];
103504
+ }
103505
+ var contents = "";
103506
+ try {
103507
+ if (!fs) {
103508
+ var xhr = new XMLHttpRequest();
103509
+ xhr.open(
103510
+ "GET",
103511
+ path2,
103512
+ /** async */
103513
+ false
103514
+ );
103515
+ xhr.send(null);
103516
+ if (xhr.readyState === 4 && xhr.status === 200) {
103517
+ contents = xhr.responseText;
103518
+ }
103519
+ } else if (fs.existsSync(path2)) {
103520
+ contents = fs.readFileSync(path2, "utf8");
103521
+ }
103522
+ } catch (er) {
103523
+ }
103524
+ return fileContentsCache[path2] = contents;
103525
+ });
103526
+ function supportRelativeURL(file, url) {
103527
+ if (!file) return url;
103528
+ var dir = path.dirname(file);
103529
+ var match = /^\w+:\/\/[^\/]*/.exec(dir);
103530
+ var protocol = match ? match[0] : "";
103531
+ var startPath = dir.slice(protocol.length);
103532
+ if (protocol && /^\/\w\:/.test(startPath)) {
103533
+ protocol += "/";
103534
+ return protocol + path.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
103535
+ }
103536
+ return protocol + path.resolve(dir.slice(protocol.length), url);
103537
+ }
103538
+ function retrieveSourceMapURL(source) {
103539
+ var fileData;
103540
+ if (isInBrowser()) {
103541
+ try {
103542
+ var xhr = new XMLHttpRequest();
103543
+ xhr.open("GET", source, false);
103544
+ xhr.send(null);
103545
+ fileData = xhr.readyState === 4 ? xhr.responseText : null;
103546
+ var sourceMapHeader = xhr.getResponseHeader("SourceMap") || xhr.getResponseHeader("X-SourceMap");
103547
+ if (sourceMapHeader) {
103548
+ return sourceMapHeader;
103549
+ }
103550
+ } catch (e) {
103551
+ }
103552
+ }
103553
+ fileData = retrieveFile(source);
103554
+ var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;
103555
+ var lastMatch, match;
103556
+ while (match = re.exec(fileData)) lastMatch = match;
103557
+ if (!lastMatch) return null;
103558
+ return lastMatch[1];
103559
+ }
103560
+ var retrieveSourceMap = handlerExec(retrieveMapHandlers);
103561
+ retrieveMapHandlers.push(function(source) {
103562
+ var sourceMappingURL = retrieveSourceMapURL(source);
103563
+ if (!sourceMappingURL) return null;
103564
+ var sourceMapData;
103565
+ if (reSourceMap.test(sourceMappingURL)) {
103566
+ var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(",") + 1);
103567
+ sourceMapData = bufferFrom(rawData, "base64").toString();
103568
+ sourceMappingURL = source;
103569
+ } else {
103570
+ sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
103571
+ sourceMapData = retrieveFile(sourceMappingURL);
103572
+ }
103573
+ if (!sourceMapData) {
103574
+ return null;
103575
+ }
103576
+ return {
103577
+ url: sourceMappingURL,
103578
+ map: sourceMapData
103579
+ };
103580
+ });
103581
+ function mapSourcePosition(position) {
103582
+ var sourceMap = sourceMapCache[position.source];
103583
+ if (!sourceMap) {
103584
+ var urlAndMap = retrieveSourceMap(position.source);
103585
+ if (urlAndMap) {
103586
+ sourceMap = sourceMapCache[position.source] = {
103587
+ url: urlAndMap.url,
103588
+ map: new SourceMapConsumer(urlAndMap.map)
103589
+ };
103590
+ if (sourceMap.map.sourcesContent) {
103591
+ sourceMap.map.sources.forEach(function(source, i) {
103592
+ var contents = sourceMap.map.sourcesContent[i];
103593
+ if (contents) {
103594
+ var url = supportRelativeURL(sourceMap.url, source);
103595
+ fileContentsCache[url] = contents;
103596
+ }
103597
+ });
103598
+ }
103599
+ } else {
103600
+ sourceMap = sourceMapCache[position.source] = {
103601
+ url: null,
103602
+ map: null
103603
+ };
103604
+ }
103605
+ }
103606
+ if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === "function") {
103607
+ var originalPosition = sourceMap.map.originalPositionFor(position);
103608
+ if (originalPosition.source !== null) {
103609
+ originalPosition.source = supportRelativeURL(
103610
+ sourceMap.url,
103611
+ originalPosition.source
103612
+ );
103613
+ return originalPosition;
103614
+ }
103615
+ }
103616
+ return position;
103617
+ }
103618
+ function mapEvalOrigin(origin) {
103619
+ var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
103620
+ if (match) {
103621
+ var position = mapSourcePosition({
103622
+ source: match[2],
103623
+ line: +match[3],
103624
+ column: match[4] - 1
103625
+ });
103626
+ return "eval at " + match[1] + " (" + position.source + ":" + position.line + ":" + (position.column + 1) + ")";
103627
+ }
103628
+ match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
103629
+ if (match) {
103630
+ return "eval at " + match[1] + " (" + mapEvalOrigin(match[2]) + ")";
103631
+ }
103632
+ return origin;
103633
+ }
103634
+ function CallSiteToString() {
103635
+ var fileName;
103636
+ var fileLocation = "";
103637
+ if (this.isNative()) {
103638
+ fileLocation = "native";
103639
+ } else {
103640
+ fileName = this.getScriptNameOrSourceURL();
103641
+ if (!fileName && this.isEval()) {
103642
+ fileLocation = this.getEvalOrigin();
103643
+ fileLocation += ", ";
103644
+ }
103645
+ if (fileName) {
103646
+ fileLocation += fileName;
103647
+ } else {
103648
+ fileLocation += "<anonymous>";
103649
+ }
103650
+ var lineNumber = this.getLineNumber();
103651
+ if (lineNumber != null) {
103652
+ fileLocation += ":" + lineNumber;
103653
+ var columnNumber = this.getColumnNumber();
103654
+ if (columnNumber) {
103655
+ fileLocation += ":" + columnNumber;
103656
+ }
103657
+ }
103658
+ }
103659
+ var line = "";
103660
+ var functionName = this.getFunctionName();
103661
+ var addSuffix = true;
103662
+ var isConstructor = this.isConstructor();
103663
+ var isMethodCall = !(this.isToplevel() || isConstructor);
103664
+ if (isMethodCall) {
103665
+ var typeName = this.getTypeName();
103666
+ if (typeName === "[object Object]") {
103667
+ typeName = "null";
103668
+ }
103669
+ var methodName = this.getMethodName();
103670
+ if (functionName) {
103671
+ if (typeName && functionName.indexOf(typeName) != 0) {
103672
+ line += typeName + ".";
103673
+ }
103674
+ line += functionName;
103675
+ if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) {
103676
+ line += " [as " + methodName + "]";
103677
+ }
103678
+ } else {
103679
+ line += typeName + "." + (methodName || "<anonymous>");
103680
+ }
103681
+ } else if (isConstructor) {
103682
+ line += "new " + (functionName || "<anonymous>");
103683
+ } else if (functionName) {
103684
+ line += functionName;
103685
+ } else {
103686
+ line += fileLocation;
103687
+ addSuffix = false;
103688
+ }
103689
+ if (addSuffix) {
103690
+ line += " (" + fileLocation + ")";
103691
+ }
103692
+ return line;
103693
+ }
103694
+ function cloneCallSite(frame) {
103695
+ var object = {};
103696
+ Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
103697
+ object[name] = /^(?:is|get)/.test(name) ? function() {
103698
+ return frame[name].call(frame);
103699
+ } : frame[name];
103700
+ });
103701
+ object.toString = CallSiteToString;
103702
+ return object;
103703
+ }
103704
+ function wrapCallSite(frame, state2) {
103705
+ if (state2 === void 0) {
103706
+ state2 = { nextPosition: null, curPosition: null };
103707
+ }
103708
+ if (frame.isNative()) {
103709
+ state2.curPosition = null;
103710
+ return frame;
103711
+ }
103712
+ var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
103713
+ if (source) {
103714
+ var line = frame.getLineNumber();
103715
+ var column = frame.getColumnNumber() - 1;
103716
+ var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
103717
+ var headerLength = noHeader.test(globalProcessVersion()) ? 0 : 62;
103718
+ if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
103719
+ column -= headerLength;
103720
+ }
103721
+ var position = mapSourcePosition({
103722
+ source,
103723
+ line,
103724
+ column
103725
+ });
103726
+ state2.curPosition = position;
103727
+ frame = cloneCallSite(frame);
103728
+ var originalFunctionName = frame.getFunctionName;
103729
+ frame.getFunctionName = function() {
103730
+ if (state2.nextPosition == null) {
103731
+ return originalFunctionName();
103732
+ }
103733
+ return state2.nextPosition.name || originalFunctionName();
103734
+ };
103735
+ frame.getFileName = function() {
103736
+ return position.source;
103737
+ };
103738
+ frame.getLineNumber = function() {
103739
+ return position.line;
103740
+ };
103741
+ frame.getColumnNumber = function() {
103742
+ return position.column + 1;
103743
+ };
103744
+ frame.getScriptNameOrSourceURL = function() {
103745
+ return position.source;
103746
+ };
103747
+ return frame;
103748
+ }
103749
+ var origin = frame.isEval() && frame.getEvalOrigin();
103750
+ if (origin) {
103751
+ origin = mapEvalOrigin(origin);
103752
+ frame = cloneCallSite(frame);
103753
+ frame.getEvalOrigin = function() {
103754
+ return origin;
103755
+ };
103756
+ return frame;
103757
+ }
103758
+ return frame;
103759
+ }
103760
+ function prepareStackTrace(error2, stack) {
103761
+ if (emptyCacheBetweenOperations) {
103762
+ fileContentsCache = {};
103763
+ sourceMapCache = {};
103764
+ }
103765
+ var name = error2.name || "Error";
103766
+ var message = error2.message || "";
103767
+ var errorString = name + ": " + message;
103768
+ var state2 = { nextPosition: null, curPosition: null };
103769
+ var processedStack = [];
103770
+ for (var i = stack.length - 1; i >= 0; i--) {
103771
+ processedStack.push("\n at " + wrapCallSite(stack[i], state2));
103772
+ state2.nextPosition = state2.curPosition;
103773
+ }
103774
+ state2.curPosition = state2.nextPosition = null;
103775
+ return errorString + processedStack.reverse().join("");
103776
+ }
103777
+ function getErrorSource(error2) {
103778
+ var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error2.stack);
103779
+ if (match) {
103780
+ var source = match[1];
103781
+ var line = +match[2];
103782
+ var column = +match[3];
103783
+ var contents = fileContentsCache[source];
103784
+ if (!contents && fs && fs.existsSync(source)) {
103785
+ try {
103786
+ contents = fs.readFileSync(source, "utf8");
103787
+ } catch (er) {
103788
+ contents = "";
103789
+ }
103790
+ }
103791
+ if (contents) {
103792
+ var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
103793
+ if (code) {
103794
+ return source + ":" + line + "\n" + code + "\n" + new Array(column).join(" ") + "^";
103795
+ }
103796
+ }
103797
+ }
103798
+ return null;
103799
+ }
103800
+ function printErrorAndExit(error2) {
103801
+ var source = getErrorSource(error2);
103802
+ var stderr = globalProcessStderr();
103803
+ if (stderr && stderr._handle && stderr._handle.setBlocking) {
103804
+ stderr._handle.setBlocking(true);
103805
+ }
103806
+ if (source) {
103807
+ console.error();
103808
+ console.error(source);
103809
+ }
103810
+ console.error(error2.stack);
103811
+ globalProcessExit(1);
103812
+ }
103813
+ function shimEmitUncaughtException() {
103814
+ var origEmit = process.emit;
103815
+ process.emit = function(type) {
103816
+ if (type === "uncaughtException") {
103817
+ var hasStack = arguments[1] && arguments[1].stack;
103818
+ var hasListeners = this.listeners(type).length > 0;
103819
+ if (hasStack && !hasListeners) {
103820
+ return printErrorAndExit(arguments[1]);
103821
+ }
103822
+ }
103823
+ return origEmit.apply(this, arguments);
103824
+ };
103825
+ }
103826
+ var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0);
103827
+ var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0);
103828
+ exports.wrapCallSite = wrapCallSite;
103829
+ exports.getErrorSource = getErrorSource;
103830
+ exports.mapSourcePosition = mapSourcePosition;
103831
+ exports.retrieveSourceMap = retrieveSourceMap;
103832
+ exports.install = function(options) {
103833
+ options = options || {};
103834
+ if (options.environment) {
103835
+ environment = options.environment;
103836
+ if (["node", "browser", "auto"].indexOf(environment) === -1) {
103837
+ throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}");
103838
+ }
103839
+ }
103840
+ if (options.retrieveFile) {
103841
+ if (options.overrideRetrieveFile) {
103842
+ retrieveFileHandlers.length = 0;
103843
+ }
103844
+ retrieveFileHandlers.unshift(options.retrieveFile);
103845
+ }
103846
+ if (options.retrieveSourceMap) {
103847
+ if (options.overrideRetrieveSourceMap) {
103848
+ retrieveMapHandlers.length = 0;
103849
+ }
103850
+ retrieveMapHandlers.unshift(options.retrieveSourceMap);
103851
+ }
103852
+ if (options.hookRequire && !isInBrowser()) {
103853
+ var Module = dynamicRequire(module, "module");
103854
+ var $compile = Module.prototype._compile;
103855
+ if (!$compile.__sourceMapSupport) {
103856
+ Module.prototype._compile = function(content, filename) {
103857
+ fileContentsCache[filename] = content;
103858
+ sourceMapCache[filename] = void 0;
103859
+ return $compile.call(this, content, filename);
103860
+ };
103861
+ Module.prototype._compile.__sourceMapSupport = true;
103862
+ }
103863
+ }
103864
+ if (!emptyCacheBetweenOperations) {
103865
+ emptyCacheBetweenOperations = "emptyCacheBetweenOperations" in options ? options.emptyCacheBetweenOperations : false;
103866
+ }
103867
+ if (!errorFormatterInstalled) {
103868
+ errorFormatterInstalled = true;
103869
+ Error.prepareStackTrace = prepareStackTrace;
103870
+ }
103871
+ if (!uncaughtShimInstalled) {
103872
+ var installHandler = "handleUncaughtExceptions" in options ? options.handleUncaughtExceptions : true;
103873
+ try {
103874
+ var worker_threads = dynamicRequire(module, "worker_threads");
103875
+ if (worker_threads.isMainThread === false) {
103876
+ installHandler = false;
103877
+ }
103878
+ } catch (e) {
103879
+ }
103880
+ if (installHandler && hasGlobalProcessEventEmitter()) {
103881
+ uncaughtShimInstalled = true;
103882
+ shimEmitUncaughtException();
103883
+ }
103884
+ }
103885
+ };
103886
+ exports.resetRetrieveHandlers = function() {
103887
+ retrieveFileHandlers.length = 0;
103888
+ retrieveMapHandlers.length = 0;
103889
+ retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
103890
+ retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
103891
+ retrieveSourceMap = handlerExec(retrieveMapHandlers);
103892
+ retrieveFile = handlerExec(retrieveFileHandlers);
103893
+ };
103894
+ }
103895
+ });
103896
+
101539
103897
  // ../../node_modules/typescript/lib/typescript.js
101540
103898
  var require_typescript = __commonJS({
101541
103899
  "../../node_modules/typescript/lib/typescript.js"(exports, module) {
@@ -110192,7 +112550,7 @@ ${lanes.join("\n")}
110192
112550
  debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(?:inspect|debug)(?:-brk)?(?:=\d+)?$/i.test(arg)) || !!process.recordreplay,
110193
112551
  tryEnableSourceMapsForHost() {
110194
112552
  try {
110195
- __require("source-map-support").install();
112553
+ require_source_map_support().install();
110196
112554
  } catch {
110197
112555
  }
110198
112556
  },
@@ -338727,7 +341085,7 @@ var require_decoder = __commonJS({
338727
341085
  });
338728
341086
 
338729
341087
  // ../../node_modules/adm-zip/util/index.js
338730
- var require_util4 = __commonJS({
341088
+ var require_util5 = __commonJS({
338731
341089
  "../../node_modules/adm-zip/util/index.js"(exports, module) {
338732
341090
  "use strict";
338733
341091
  module.exports = require_utils2();
@@ -338742,7 +341100,7 @@ var require_util4 = __commonJS({
338742
341100
  var require_entryHeader = __commonJS({
338743
341101
  "../../node_modules/adm-zip/headers/entryHeader.js"(exports, module) {
338744
341102
  "use strict";
338745
- var Utils = require_util4();
341103
+ var Utils = require_util5();
338746
341104
  var Constants = Utils.Constants;
338747
341105
  module.exports = function() {
338748
341106
  var _verMade = 20, _version = 10, _flags = 0, _method = 0, _time = 0, _crc = 0, _compressedSize = 0, _size = 0, _fnameLen = 0, _extraLen = 0, _comLen = 0, _diskStart = 0, _inattr = 0, _attr = 0, _offset = 0;
@@ -339013,7 +341371,7 @@ var require_entryHeader = __commonJS({
339013
341371
  var require_mainHeader = __commonJS({
339014
341372
  "../../node_modules/adm-zip/headers/mainHeader.js"(exports, module) {
339015
341373
  "use strict";
339016
- var Utils = require_util4();
341374
+ var Utils = require_util5();
339017
341375
  var Constants = Utils.Constants;
339018
341376
  module.exports = function() {
339019
341377
  var _volumeEntries = 0, _totalEntries = 0, _size = 0, _offset = 0, _commentLength = 0;
@@ -339311,7 +341669,7 @@ var require_methods = __commonJS({
339311
341669
  var require_zipEntry = __commonJS({
339312
341670
  "../../node_modules/adm-zip/zipEntry.js"(exports, module) {
339313
341671
  "use strict";
339314
- var Utils = require_util4();
341672
+ var Utils = require_util5();
339315
341673
  var Headers = require_headers3();
339316
341674
  var Constants = Utils.Constants;
339317
341675
  var Methods = require_methods();
@@ -339645,7 +342003,7 @@ var require_zipFile = __commonJS({
339645
342003
  "use strict";
339646
342004
  var ZipEntry = require_zipEntry();
339647
342005
  var Headers = require_headers3();
339648
- var Utils = require_util4();
342006
+ var Utils = require_util5();
339649
342007
  module.exports = function(inBuffer, options) {
339650
342008
  var entryList = [], entryTable = {}, _comment = Buffer.alloc(0), mainHeader = new Headers.MainHeader(), loadedEntries = false;
339651
342009
  var password = null;
@@ -339990,7 +342348,7 @@ var require_zipFile = __commonJS({
339990
342348
  var require_adm_zip = __commonJS({
339991
342349
  "../../node_modules/adm-zip/adm-zip.js"(exports, module) {
339992
342350
  "use strict";
339993
- var Utils = require_util4();
342351
+ var Utils = require_util5();
339994
342352
  var pth = __require("path");
339995
342353
  var ZipEntry = require_zipEntry();
339996
342354
  var ZipFile = require_zipFile();
@@ -351623,7 +353981,7 @@ var require_package4 = __commonJS({
351623
353981
  "package.json"(exports, module) {
351624
353982
  module.exports = {
351625
353983
  name: "@validate.qa/runner",
351626
- version: "1.0.87",
353984
+ version: "1.0.88",
351627
353985
  description: "validate local test runner - execute Playwright tests on your machine, connected to validate.qa cloud.",
351628
353986
  bin: {
351629
353987
  "validate-runner": "dist/cli.js"