Commit 1dad8da3 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Adds Speedscope flamegraphs

Adds rendering of Stackprof flamegraphs using Speedscope

Changelog: added
parent d3b84962
---
title: Add generating Speedscope flamegraphs for a request
merge_request: 53288
author:
type: added
......@@ -173,6 +173,8 @@ module Gitlab
config.assets.paths << Gemojione.images_path
config.assets.paths << "#{config.root}/vendor/assets/fonts"
config.assets.paths << "#{config.root}/vendor/speedscope"
config.assets.precompile << "application_utilities.css"
config.assets.precompile << "application_utilities_dark.css"
config.assets.precompile << "application_dark.css"
......
......@@ -2,4 +2,5 @@
Rails.application.configure do |config|
config.middleware.use(Gitlab::RequestProfiler::Middleware)
config.middleware.use(Gitlab::Middleware::Speedscope)
end
......@@ -96,6 +96,16 @@ that builds on this to add some additional niceties, such as allowing
configuration with a single YAML file for multiple URLs, and uploading of the
profile and log output to S3.
## Speedscope flamegraphs
You can generate a flamegraph for a particular URL by adding the `performance_bar=flamegraph` parameter to the request.
![Speedscope](img/speedscope_v13_12.png)
More information about the views can be found in the [Speedscope docs](https://github.com/jlfwong/speedscope#views)
This is enabled for all users that can access the performance bar.
## Sherlock
Sherlock is a custom profiling tool built into GitLab. Sherlock is _only_
......
# frozen_string_literal: true
module Gitlab
module Middleware
class Speedscope
def initialize(app)
@app = app
end
def call(env)
request = Rack::Request.new(env)
if request.params['performance_bar'] == 'flamegraph' && Gitlab::PerformanceBar.allowed_for_user?(request.env['warden'].user)
body = nil
Gitlab::SafeRequestStore[:capturing_flamegraph] = true
require 'stackprof'
flamegraph = ::StackProf.run(
mode: :wall,
raw: true,
aggregate: false,
interval: (0.5 * 1000).to_i
) do
_, _, body = @app.call(env)
end
path = env['PATH_INFO'].sub('//', '/')
body.close if body.respond_to?(:close)
return flamegraph(flamegraph, path)
end
@app.call(env)
end
def flamegraph(graph, path)
headers = { 'Content-Type' => 'text/html' }
html = <<~HTML
<!DOCTYPE html>
<html>
<head>
<style>
body { margin: 0; height: 100vh; }
#speedscope-iframe { width: 100%; height: 100%; border: none; }
</style>
</head>
<body>
<script type="text/javascript">
var graph = #{Gitlab::Json.generate(graph)};
var json = JSON.stringify(graph);
var blob = new Blob([json], { type: 'text/plain' });
var objUrl = encodeURIComponent(URL.createObjectURL(blob));
var iframe = document.createElement('IFRAME');
iframe.setAttribute('id', 'speedscope-iframe');
document.body.appendChild(iframe);
var iframeUrl = '#{Gitlab.config.gitlab.relative_url_root}/assets/speedscope/index.html#profileURL=' + objUrl + '&title=' + 'Flamegraph for #{CGI.escape(path)}';
iframe.setAttribute('src', iframeUrl);
</script>
</body>
</html>
HTML
[200, headers, [html]]
end
end
end
end
......@@ -7,7 +7,7 @@ module Gitlab
EXPIRY_TIME_L2_CACHE = 5.minutes
def self.enabled_for_request?
Gitlab::SafeRequestStore[:peek_enabled]
!Gitlab::SafeRequestStore[:capturing_flamegraph] && Gitlab::SafeRequestStore[:peek_enabled]
end
def self.allowed_for_user?(user = nil)
......
# frozen_string_literal: true
require 'spec_helper'
require 'stackprof'
RSpec.describe Gitlab::Middleware::Speedscope do
let(:app) { proc { |env| [200, { 'Content-Type' => 'text/plain' }, ['Hello world!']] } }
let(:middleware) { described_class.new(app) }
describe '#call' do
shared_examples 'returns original response' do
it 'returns original response' do
expect(StackProf).not_to receive(:run)
status, headers, body = middleware.call(env)
expect(status).to eq(200)
expect(headers).to eq({ 'Content-Type' => 'text/plain' })
expect(body.first).to eq('Hello world!')
end
end
context 'when flamegraph is not requested' do
let(:env) { Rack::MockRequest.env_for('/') }
it_behaves_like 'returns original response'
end
context 'when flamegraph requested' do
let(:env) { Rack::MockRequest.env_for('/', params: { 'performance_bar' => 'flamegraph' }) }
before do
allow(env).to receive(:[]).and_call_original
end
context 'when user is not allowed' do
before do
allow(env).to receive(:[]).with('warden').and_return(double('Warden', user: create(:user)))
end
it_behaves_like 'returns original response'
end
context 'when user is allowed' do
before do
allow(env).to receive(:[]).with('warden').and_return(double('Warden', user: create(:admin)))
end
it 'runs StackProf and returns a flamegraph' do
expect(StackProf).to receive(:run).and_call_original
status, headers, body = middleware.call(env)
expect(status).to eq(200)
expect(headers).to eq({ 'Content-Type' => 'text/html' })
expect(body.first).to include('speedscope-iframe')
end
end
end
end
end
MIT License
Copyright (c) 2018 Jamie Wong
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This is a self-contained release of https://github.com/jlfwong/speedscope.
To use it, open index.html in Chrome or Firefox.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CloseFrameEvent": {
"properties": {
"at": {
"title": "at",
"type": "number"
},
"frame": {
"title": "frame",
"type": "number"
},
"type": {
"enum": [
"C"
],
"title": "type",
"type": "string"
}
},
"required": [
"at",
"frame",
"type"
],
"title": "CloseFrameEvent",
"type": "object"
},
"FileFormat.EventType": {
"enum": [
"C",
"O"
],
"title": "FileFormat.EventType",
"type": "string"
},
"FileFormat.EventedProfile": {
"properties": {
"endValue": {
"title": "endValue",
"type": "number"
},
"events": {
"items": {
"anyOf": [
{
"$ref": "#/definitions/OpenFrameEvent"
},
{
"$ref": "#/definitions/CloseFrameEvent"
}
]
},
"title": "events",
"type": "array"
},
"name": {
"title": "name",
"type": "string"
},
"startValue": {
"title": "startValue",
"type": "number"
},
"type": {
"enum": [
"evented"
],
"title": "type",
"type": "string"
},
"unit": {
"$ref": "#/definitions/FileFormat.ValueUnit",
"title": "unit"
}
},
"required": [
"endValue",
"events",
"name",
"startValue",
"type",
"unit"
],
"title": "FileFormat.EventedProfile",
"type": "object"
},
"FileFormat.File": {
"properties": {
"$schema": {
"enum": [
"https://www.speedscope.app/file-format-schema.json"
],
"title": "$schema",
"type": "string"
},
"activeProfileIndex": {
"title": "activeProfileIndex",
"type": "number"
},
"exporter": {
"title": "exporter",
"type": "string"
},
"name": {
"title": "name",
"type": "string"
},
"profiles": {
"items": {
"anyOf": [
{
"$ref": "#/definitions/FileFormat.EventedProfile"
},
{
"$ref": "#/definitions/FileFormat.SampledProfile"
}
]
},
"title": "profiles",
"type": "array"
},
"shared": {
"properties": {
"frames": {
"items": {
"$ref": "#/definitions/FileFormat.Frame"
},
"title": "frames",
"type": "array"
}
},
"required": [
"frames"
],
"title": "shared",
"type": "object"
}
},
"required": [
"$schema",
"profiles",
"shared"
],
"title": "FileFormat.File",
"type": "object"
},
"FileFormat.Frame": {
"properties": {
"col": {
"title": "col",
"type": "number"
},
"file": {
"title": "file",
"type": "string"
},
"line": {
"title": "line",
"type": "number"
},
"name": {
"title": "name",
"type": "string"
}
},
"required": [
"name"
],
"title": "FileFormat.Frame",
"type": "object"
},
"FileFormat.IProfile": {
"properties": {
"type": {
"$ref": "#/definitions/FileFormat.ProfileType",
"title": "type"
}
},
"required": [
"type"
],
"title": "FileFormat.IProfile",
"type": "object"
},
"FileFormat.Profile": {
"anyOf": [
{
"$ref": "#/definitions/FileFormat.EventedProfile"
},
{
"$ref": "#/definitions/FileFormat.SampledProfile"
}
]
},
"FileFormat.ProfileType": {
"enum": [
"evented",
"sampled"
],
"title": "FileFormat.ProfileType",
"type": "string"
},
"FileFormat.SampledProfile": {
"properties": {
"endValue": {
"title": "endValue",
"type": "number"
},
"name": {
"title": "name",
"type": "string"
},
"samples": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"title": "samples",
"type": "array"
},
"startValue": {
"title": "startValue",
"type": "number"
},
"type": {
"enum": [
"sampled"
],
"title": "type",
"type": "string"
},
"unit": {
"$ref": "#/definitions/FileFormat.ValueUnit",
"title": "unit"
},
"weights": {
"items": {
"type": "number"
},
"title": "weights",
"type": "array"
}
},
"required": [
"endValue",
"name",
"samples",
"startValue",
"type",
"unit",
"weights"
],
"title": "FileFormat.SampledProfile",
"type": "object"
},
"FileFormat.ValueUnit": {
"enum": [
"bytes",
"microseconds",
"milliseconds",
"nanoseconds",
"none",
"seconds"
],
"title": "FileFormat.ValueUnit",
"type": "string"
},
"IEvent": {
"properties": {
"at": {
"title": "at",
"type": "number"
},
"type": {
"$ref": "#/definitions/FileFormat.EventType",
"title": "type"
}
},
"required": [
"at",
"type"
],
"title": "IEvent",
"type": "object"
},
"OpenFrameEvent": {
"properties": {
"at": {
"title": "at",
"type": "number"
},
"frame": {
"title": "frame",
"type": "number"
},
"type": {
"enum": [
"O"
],
"title": "type",
"type": "string"
}
},
"required": [
"at",
"frame",
"type"
],
"title": "OpenFrameEvent",
"type": "object"
},
"SampledStack": {
"items": {
"type": "number"
},
"type": "array"
}
},
"$ref": "#/definitions/FileFormat.File"
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>speedscope</title><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet"><script></script><link rel="stylesheet" href="reset.8c46b7a1.css"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.bc503437.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.f74b3187.png"></head><body> <script src="speedscope.026f36b0.js"></script>
</body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
speedscope@1.13.0
Sun Feb 14 23:36:53 PST 2021
03a5104317e030e07303de006a85464ed1fcdea0
a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{overflow:hidden}body,html{height:100%}body{overflow:auto}
/*# sourceMappingURL=reset.8c46b7a1.css.map */
\ No newline at end of file
{"version":3,"sources":["reset.css"],"names":[],"mappings":"AAIA,2ZAaC,QAAS,CACT,SAAU,CACV,QAAS,CACT,cAAe,CACf,YAAa,CACb,sBACD,CAEA,8EAEC,aACD,CACA,KACC,aACD,CACA,MACC,eACD,CACA,aACC,WACD,CACA,oDAEC,UAAW,CACX,YACD,CACA,MACC,wBAAyB,CACzB,gBACD,CAIA,KACI,eAEJ,CACA,UAFI,WAKJ,CAHA,KAEI,aACJ","file":"reset.8c46b7a1.css","sourceRoot":"../../assets","sourcesContent":["/* http://meyerweb.com/eric/tools/css/reset/\n v2.0 | 20110126\n License: none (public domain)\n*/\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, u, i, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed,\nfigure, figcaption, footer, header, hgroup,\nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;\n}\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure,\nfooter, header, hgroup, menu, nav, section {\n\tdisplay: block;\n}\nbody {\n\tline-height: 1;\n}\nol, ul {\n\tlist-style: none;\n}\nblockquote, q {\n\tquotes: none;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\n\tcontent: '';\n\tcontent: none;\n}\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\n/* Prevent overscrolling */\n/* https://stackoverflow.com/a/17899813 */\nhtml {\n overflow: hidden;\n height: 100%;\n}\nbody {\n height: 100%;\n overflow: auto;\n}"]}
\ No newline at end of file
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"YNEz":[function(require,module,exports) {
var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");exports.encode=function(n){if(0<=n&&n<e.length)return e[n];throw new TypeError("Must be between 0 and 63: "+n)},exports.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1};
},{}],"iWlY":[function(require,module,exports) {
var e=require("./base64"),r=5,n=1<<r,o=n-1,t=n;function i(e){return e<0?1+(-e<<1):0+(e<<1)}function d(e){var r=e>>1;return 1==(1&e)?-r:r}exports.encode=function(n){var d,a="",c=i(n);do{d=c&o,(c>>>=r)>0&&(d|=t),a+=e.encode(d)}while(c>0);return a},exports.decode=function(n,i,a){var c,u,h=n.length,s=0,v=0;do{if(i>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(u=e.decode(n.charCodeAt(i++))))throw new Error("Invalid base64 digit: "+n.charAt(i-1));c=!!(u&t),s+=(u&=o)<<v,v+=r}while(c);a.value=d(s),a.rest=i};
},{"./base64":"YNEz"}],"XUQW":[function(require,module,exports) {
function e(e,r,n){if(r in e)return e[r];if(3===arguments.length)return n;throw new Error('"'+r+'" is a required argument.')}exports.getArg=e;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function t(e){var n=e.match(r);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var r="";return e.scheme&&(r+=e.scheme+":"),r+="//",e.auth&&(r+=e.auth+"@"),e.host&&(r+=e.host),e.port&&(r+=":"+e.port),e.path&&(r+=e.path),r}function a(e){var r=e,n=t(e);if(n){if(!n.path)return e;r=n.path}for(var a,i=exports.isAbsolute(r),u=r.split(/\/+/),c=0,s=u.length-1;s>=0;s--)"."===(a=u[s])?u.splice(s,1):".."===a?c++:c>0&&(""===a?(u.splice(s+1,c),c=0):(u.splice(s,2),c--));return""===(r=u.join("/"))&&(r=i?"/":"."),n?(n.path=r,o(n)):r}function i(e,r){""===e&&(e="."),""===r&&(r=".");var i=t(r),u=t(e);if(u&&(e=u.path||"/"),i&&!i.scheme)return u&&(i.scheme=u.scheme),o(i);if(i||r.match(n))return r;if(u&&!u.host&&!u.path)return u.host=r,o(u);var c="/"===r.charAt(0)?r:a(e.replace(/\/+$/,"")+"/"+r);return u?(u.path=c,o(u)):c}function u(e,r){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==r.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return r;if((e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return r;++n}return Array(n+1).join("../")+r.substr(e.length+1)}exports.urlParse=t,exports.urlGenerate=o,exports.normalize=a,exports.join=i,exports.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},exports.relative=u;var c=!("__proto__"in Object.create(null));function s(e){return e}function l(e){return p(e)?"$"+e:e}function h(e){return p(e)?e.slice(1):e}function p(e){if(!e)return!1;var r=e.length;if(r<9)return!1;if(95!==e.charCodeAt(r-1)||95!==e.charCodeAt(r-2)||111!==e.charCodeAt(r-3)||116!==e.charCodeAt(r-4)||111!==e.charCodeAt(r-5)||114!==e.charCodeAt(r-6)||112!==e.charCodeAt(r-7)||95!==e.charCodeAt(r-8)||95!==e.charCodeAt(r-9))return!1;for(var n=r-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function f(e,r,n){var t=d(e.source,r.source);return 0!==t?t:0!==(t=e.originalLine-r.originalLine)?t:0!==(t=e.originalColumn-r.originalColumn)||n?t:0!==(t=e.generatedColumn-r.generatedColumn)?t:0!==(t=e.generatedLine-r.generatedLine)?t:d(e.name,r.name)}function g(e,r,n){var t=e.generatedLine-r.generatedLine;return 0!==t?t:0!==(t=e.generatedColumn-r.generatedColumn)||n?t:0!==(t=d(e.source,r.source))?t:0!==(t=e.originalLine-r.originalLine)?t:0!==(t=e.originalColumn-r.originalColumn)?t:d(e.name,r.name)}function d(e,r){return e===r?0:null===e?1:null===r?-1:e>r?1:-1}function m(e,r){var n=e.generatedLine-r.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-r.generatedColumn)?n:0!==(n=d(e.source,r.source))?n:0!==(n=e.originalLine-r.originalLine)?n:0!==(n=e.originalColumn-r.originalColumn)?n:d(e.name,r.name)}function C(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}function v(e,r,n){if(r=r||"",e&&("/"!==e[e.length-1]&&"/"!==r[0]&&(e+="/"),r=e+r),n){var u=t(n);if(!u)throw new Error("sourceMapURL could not be parsed");if(u.path){var c=u.path.lastIndexOf("/");c>=0&&(u.path=u.path.substring(0,c+1))}r=i(o(u),r)}return a(r)}exports.toSetString=c?s:l,exports.fromSetString=c?s:h,exports.compareByOriginalPositions=f,exports.compareByGeneratedPositionsDeflated=g,exports.compareByGeneratedPositionsInflated=m,exports.parseSourceMapInput=C,exports.computeSourceURL=v;
},{}],"dghU":[function(require,module,exports) {
var t=require("./util"),e=Object.prototype.hasOwnProperty,r="undefined"!=typeof Map;function n(){this._array=[],this._set=r?new Map:Object.create(null)}n.fromArray=function(t,e){for(var r=new n,i=0,s=t.length;i<s;i++)r.add(t[i],e);return r},n.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(n,i){var s=r?n:t.toSetString(n),o=r?this.has(n):e.call(this._set,s),a=this._array.length;o&&!i||this._array.push(n),o||(r?this._set.set(n,a):this._set[s]=a)},n.prototype.has=function(n){if(r)return this._set.has(n);var i=t.toSetString(n);return e.call(this._set,i)},n.prototype.indexOf=function(n){if(r){var i=this._set.get(n);if(i>=0)return i}else{var s=t.toSetString(n);if(e.call(this._set,s))return this._set[s]}throw new Error('"'+n+'" is not in the set.')},n.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},n.prototype.toArray=function(){return this._array.slice()},exports.ArraySet=n;
},{"./util":"XUQW"}],"AUTm":[function(require,module,exports) {
var t=require("./util");function e(e,r){var a=e.generatedLine,n=r.generatedLine,o=e.generatedColumn,s=r.generatedColumn;return n>a||n==a&&s>=o||t.compareByGeneratedPositionsInflated(e,r)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},r.prototype.add=function(t){e(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},exports.MappingList=r;
},{"./util":"XUQW"}],"Wwhl":[function(require,module,exports) {
var e=require("./base64-vlq"),n=require("./util"),o=require("./array-set").ArraySet,t=require("./mapping-list").MappingList;function r(e){e||(e={}),this._file=n.getArg(e,"file",null),this._sourceRoot=n.getArg(e,"sourceRoot",null),this._skipValidation=n.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new t,this._sourcesContents=null}r.prototype._version=3,r.fromSourceMap=function(e){var o=e.sourceRoot,t=new r({file:e.file,sourceRoot:o});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=o&&(r.source=n.relative(o,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),t.addMapping(r)}),e.sources.forEach(function(r){var i=r;null!==o&&(i=n.relative(o,r)),t._sources.has(i)||t._sources.add(i);var s=e.sourceContentFor(r);null!=s&&t.setSourceContent(r,s)}),t},r.prototype.addMapping=function(e){var o=n.getArg(e,"generated"),t=n.getArg(e,"original",null),r=n.getArg(e,"source",null),i=n.getArg(e,"name",null);this._skipValidation||this._validateMapping(o,t,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:o.line,generatedColumn:o.column,originalLine:null!=t&&t.line,originalColumn:null!=t&&t.column,source:r,name:i})},r.prototype.setSourceContent=function(e,o){var t=e;null!=this._sourceRoot&&(t=n.relative(this._sourceRoot,t)),null!=o?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(t)]=o):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(e,t,r){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var s=this._sourceRoot;null!=s&&(i=n.relative(s,i));var l=new o,u=new o;this._mappings.unsortedForEach(function(o){if(o.source===i&&null!=o.originalLine){var t=e.originalPositionFor({line:o.originalLine,column:o.originalColumn});null!=t.source&&(o.source=t.source,null!=r&&(o.source=n.join(r,o.source)),null!=s&&(o.source=n.relative(s,o.source)),o.originalLine=t.line,o.originalColumn=t.column,null!=t.name&&(o.name=t.name))}var a=o.source;null==a||l.has(a)||l.add(a);var c=o.name;null==c||u.has(c)||u.add(c)},this),this._sources=l,this._names=u,e.sources.forEach(function(o){var t=e.sourceContentFor(o);null!=t&&(null!=r&&(o=n.join(r,o)),null!=s&&(o=n.relative(s,o)),this.setSourceContent(o,t))},this)},r.prototype._validateMapping=function(e,n,o,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("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.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||o||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&o))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:o,original:n,name:t}))},r.prototype._serializeMappings=function(){for(var o,t,r,i,s=0,l=1,u=0,a=0,c=0,p=0,g="",h=this._mappings.toArray(),m=0,f=h.length;m<f;m++){if(o="",(t=h[m]).generatedLine!==l)for(s=0;t.generatedLine!==l;)o+=";",l++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(t,h[m-1]))continue;o+=","}o+=e.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),o+=e.encode(i-p),p=i,o+=e.encode(t.originalLine-1-a),a=t.originalLine-1,o+=e.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),o+=e.encode(r-c),c=r)),g+=o}return g},r.prototype._generateSourcesContent=function(e,o){return e.map(function(e){if(!this._sourcesContents)return null;null!=o&&(e=n.relative(o,e));var t=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},exports.SourceMapGenerator=r;
},{"./base64-vlq":"iWlY","./util":"XUQW","./array-set":"dghU","./mapping-list":"AUTm"}],"rdpJ":[function(require,module,exports) {
function r(t,e,E,n,o,_){var U=Math.floor((e-t)/2)+t,s=o(E,n[U],!0);return 0===s?U:s>0?e-U>1?r(U,e,E,n,o,_):_==exports.LEAST_UPPER_BOUND?e<n.length?e:-1:U:U-t>1?r(t,U,E,n,o,_):_==exports.LEAST_UPPER_BOUND?U:t<0?-1:t}exports.GREATEST_LOWER_BOUND=1,exports.LEAST_UPPER_BOUND=2,exports.search=function(t,e,E,n){if(0===e.length)return-1;var o=r(-1,e.length,t,e,E,n||exports.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===E(e[o],e[o-1],!0);)--o;return o};
},{}],"lFls":[function(require,module,exports) {
function n(n,r,t){var o=n[r];n[r]=n[t],n[t]=o}function r(n,r){return Math.round(n+Math.random()*(r-n))}function t(o,a,u,f){if(u<f){var i=u-1;n(o,r(u,f),f);for(var c=o[f],v=u;v<f;v++)a(o[v],c)<=0&&n(o,i+=1,v);n(o,i+1,v);var e=i+1;t(o,a,u,e-1),t(o,a,e+1,f)}}exports.quickSort=function(n,r){t(n,r,0,n.length-1)};
},{}],"fmOz":[function(require,module,exports) {
var e=require("./util"),n=require("./binary-search"),r=require("./array-set").ArraySet,t=require("./base64-vlq"),o=require("./quick-sort").quickSort;function i(n,r){var t=n;return"string"==typeof n&&(t=e.parseSourceMapInput(n)),null!=t.sections?new u(t,r):new s(t,r)}function s(n,t){var o=n;"string"==typeof n&&(o=e.parseSourceMapInput(n));var i=e.getArg(o,"version"),s=e.getArg(o,"sources"),a=e.getArg(o,"names",[]),u=e.getArg(o,"sourceRoot",null),l=e.getArg(o,"sourcesContent",null),g=e.getArg(o,"mappings"),p=e.getArg(o,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);u&&(u=e.normalize(u)),s=s.map(String).map(e.normalize).map(function(n){return u&&e.isAbsolute(u)&&e.isAbsolute(n)?e.relative(u,n):n}),this._names=r.fromArray(a.map(String),!0),this._sources=r.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map(function(n){return e.computeSourceURL(u,n,t)}),this.sourceRoot=u,this.sourcesContent=l,this._mappings=g,this._sourceMapURL=t,this.file=p}function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function u(n,t){var o=n;"string"==typeof n&&(o=e.parseSourceMapInput(n));var s=e.getArg(o,"version"),a=e.getArg(o,"sections");if(s!=this._version)throw new Error("Unsupported version: "+s);this._sources=new r,this._names=new r;var u={line:-1,column:0};this._sections=a.map(function(n){if(n.url)throw new Error("Support for url field in sections not implemented.");var r=e.getArg(n,"offset"),o=e.getArg(r,"line"),s=e.getArg(r,"column");if(o<u.line||o===u.line&&s<u.column)throw new Error("Section offsets must be ordered and non-overlapping.");return u=r,{generatedOffset:{generatedLine:o+1,generatedColumn:s+1},consumer:new i(e.getArg(n,"map"),t)}})}i.fromSourceMap=function(e,n){return s.fromSourceMap(e,n)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},i.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(n,r,t){var o,s=r||null;switch(t||i.GENERATED_ORDER){case i.GENERATED_ORDER:o=this._generatedMappings;break;case i.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map(function(n){var r=null===n.source?null:this._sources.at(n.source);return{source:r=e.computeSourceURL(a,r,this._sourceMapURL),generatedLine:n.generatedLine,generatedColumn:n.generatedColumn,originalLine:n.originalLine,originalColumn:n.originalColumn,name:null===n.name?null:this._names.at(n.name)}},this).forEach(n,s)},i.prototype.allGeneratedPositionsFor=function(r){var t=e.getArg(r,"line"),o={source:e.getArg(r,"source"),originalLine:t,originalColumn:e.getArg(r,"column",0)};if(o.source=this._findSourceIndex(o.source),o.source<0)return[];var i=[],s=this._findMapping(o,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,n.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(void 0===r.column)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var l=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==l;)i.push({line:e.getArg(a,"generatedLine",null),column:e.getArg(a,"generatedColumn",null),lastColumn:e.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i},exports.SourceMapConsumer=i,s.prototype=Object.create(i.prototype),s.prototype.consumer=i,s.prototype._findSourceIndex=function(n){var r,t=n;if(null!=this.sourceRoot&&(t=e.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==n)return r;return-1},s.fromSourceMap=function(n,t){var i=Object.create(s.prototype),u=i._names=r.fromArray(n._names.toArray(),!0),l=i._sources=r.fromArray(n._sources.toArray(),!0);i.sourceRoot=n._sourceRoot,i.sourcesContent=n._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=n._file,i._sourceMapURL=t,i._absoluteSources=i._sources.toArray().map(function(n){return e.computeSourceURL(i.sourceRoot,n,t)});for(var g=n._mappings.toArray().slice(),p=i.__generatedMappings=[],c=i.__originalMappings=[],h=0,m=g.length;h<m;h++){var f=g[h],_=new a;_.generatedLine=f.generatedLine,_.generatedColumn=f.generatedColumn,f.source&&(_.source=l.indexOf(f.source),_.originalLine=f.originalLine,_.originalColumn=f.originalColumn,f.name&&(_.name=u.indexOf(f.name)),c.push(_)),p.push(_)}return o(i.__originalMappings,e.compareByOriginalPositions),i},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),s.prototype._parseMappings=function(n,r){for(var i,s,u,l,g,p=1,c=0,h=0,m=0,f=0,_=0,d=n.length,C=0,A={},L={},v=[],y=[];C<d;)if(";"===n.charAt(C))p++,C++,c=0;else if(","===n.charAt(C))C++;else{for((i=new a).generatedLine=p,l=C;l<d&&!this._charIsMappingSeparator(n,l);l++);if(u=A[s=n.slice(C,l)])C+=s.length;else{for(u=[];C<l;)t.decode(n,C,L),g=L.value,C=L.rest,u.push(g);if(2===u.length)throw new Error("Found a source, but no line and column");if(3===u.length)throw new Error("Found a source and line, but no column");A[s]=u}i.generatedColumn=c+u[0],c=i.generatedColumn,u.length>1&&(i.source=f+u[1],f+=u[1],i.originalLine=h+u[2],h=i.originalLine,i.originalLine+=1,i.originalColumn=m+u[3],m=i.originalColumn,u.length>4&&(i.name=_+u[4],_+=u[4])),y.push(i),"number"==typeof i.originalLine&&v.push(i)}o(y,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,o(v,e.compareByOriginalPositions),this.__originalMappings=v},s.prototype._findMapping=function(e,r,t,o,i,s){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[o]);return n.search(e,r,i,s)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(n){var r={generatedLine:e.getArg(n,"line"),generatedColumn:e.getArg(n,"column")},t=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(n,"bias",i.GREATEST_LOWER_BOUND));if(t>=0){var o=this._generatedMappings[t];if(o.generatedLine===r.generatedLine){var s=e.getArg(o,"source",null);null!==s&&(s=this._sources.at(s),s=e.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=e.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:e.getArg(o,"originalLine",null),column:e.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},s.prototype.sourceContentFor=function(n,r){if(!this.sourcesContent)return null;var t=this._findSourceIndex(n);if(t>=0)return this.sourcesContent[t];var o,i=n;if(null!=this.sourceRoot&&(i=e.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=e.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(n){var r=e.getArg(n,"source");if((r=this._findSourceIndex(r))<0)return{line:null,column:null,lastColumn:null};var t={source:r,originalLine:e.getArg(n,"line"),originalColumn:e.getArg(n,"column")},o=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(n,"bias",i.GREATEST_LOWER_BOUND));if(o>=0){var s=this._originalMappings[o];if(s.source===t.source)return{line:e.getArg(s,"generatedLine",null),column:e.getArg(s,"generatedColumn",null),lastColumn:e.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},exports.BasicSourceMapConsumer=s,u.prototype=Object.create(i.prototype),u.prototype.constructor=i,u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),u.prototype.originalPositionFor=function(r){var t={generatedLine:e.getArg(r,"line"),generatedColumn:e.getArg(r,"column")},o=n.search(t,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r||e.generatedColumn-n.generatedOffset.generatedColumn}),i=this._sections[o];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:r.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r].consumer.sourceContentFor(e,!0);if(t)return t}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r];if(-1!==t.consumer._findSourceIndex(e.getArg(n,"source"))){var o=t.consumer.generatedPositionFor(n);if(o)return{line:o.line+(t.generatedOffset.generatedLine-1),column:o.column+(t.generatedOffset.generatedLine===o.line?t.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},u.prototype._parseMappings=function(n,r){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var i=this._sections[t],s=i.consumer._generatedMappings,a=0;a<s.length;a++){var u=s[a],l=i.consumer._sources.at(u.source);l=e.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var g=null;u.name&&(g=i.consumer._names.at(u.name),this._names.add(g),g=this._names.indexOf(g));var p={source:l,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:g};this.__generatedMappings.push(p),"number"==typeof p.originalLine&&this.__originalMappings.push(p)}o(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),o(this.__originalMappings,e.compareByOriginalPositions)},exports.IndexedSourceMapConsumer=u;
},{"./util":"XUQW","./binary-search":"rdpJ","./array-set":"dghU","./base64-vlq":"iWlY","./quick-sort":"lFls"}],"Qm02":[function(require,module,exports) {
var n=require("./source-map-generator").SourceMapGenerator,e=require("./util"),r=/(\r?\n)/,t=10,o="$$$isSourceNode$$$";function i(n,e,r,t,i){this.children=[],this.sourceContents={},this.line=null==n?null:n,this.column=null==e?null:e,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=t&&this.add(t)}i.fromStringWithSourceMap=function(n,t,o){var l=new i,u=n.split(r),s=0,c=function(){return n()+(n()||"");function n(){return s<u.length?u[s++]:void 0}},a=1,h=0,d=null;return t.eachMapping(function(n){if(null!==d){if(!(a<n.generatedLine)){var e=(r=u[s]||"").substr(0,n.generatedColumn-h);return u[s]=r.substr(n.generatedColumn-h),h=n.generatedColumn,p(d,e),void(d=n)}p(d,c()),a++,h=0}for(;a<n.generatedLine;)l.add(c()),a++;if(h<n.generatedColumn){var r=u[s]||"";l.add(r.substr(0,n.generatedColumn)),u[s]=r.substr(n.generatedColumn),h=n.generatedColumn}d=n},this),s<u.length&&(d&&p(d,c()),l.add(u.splice(s).join(""))),t.sources.forEach(function(n){var r=t.sourceContentFor(n);null!=r&&(null!=o&&(n=e.join(o,n)),l.setSourceContent(n,r))}),l;function p(n,r){if(null===n||void 0===n.source)l.add(r);else{var t=o?e.join(o,n.source):n.source;l.add(new i(n.originalLine,n.originalColumn,t,r,n.name))}}},i.prototype.add=function(n){if(Array.isArray(n))n.forEach(function(n){this.add(n)},this);else{if(!n[o]&&"string"!=typeof n)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);n&&this.children.push(n)}return this},i.prototype.prepend=function(n){if(Array.isArray(n))for(var e=n.length-1;e>=0;e--)this.prepend(n[e]);else{if(!n[o]&&"string"!=typeof n)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);this.children.unshift(n)}return this},i.prototype.walk=function(n){for(var e,r=0,t=this.children.length;r<t;r++)(e=this.children[r])[o]?e.walk(n):""!==e&&n(e,{source:this.source,line:this.line,column:this.column,name:this.name})},i.prototype.join=function(n){var e,r,t=this.children.length;if(t>0){for(e=[],r=0;r<t-1;r++)e.push(this.children[r]),e.push(n);e.push(this.children[r]),this.children=e}return this},i.prototype.replaceRight=function(n,e){var r=this.children[this.children.length-1];return r[o]?r.replaceRight(n,e):"string"==typeof r?this.children[this.children.length-1]=r.replace(n,e):this.children.push("".replace(n,e)),this},i.prototype.setSourceContent=function(n,r){this.sourceContents[e.toSetString(n)]=r},i.prototype.walkSourceContents=function(n){for(var r=0,t=this.children.length;r<t;r++)this.children[r][o]&&this.children[r].walkSourceContents(n);var i=Object.keys(this.sourceContents);for(r=0,t=i.length;r<t;r++)n(e.fromSetString(i[r]),this.sourceContents[i[r]])},i.prototype.toString=function(){var n="";return this.walk(function(e){n+=e}),n},i.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},o=new n(e),i=!1,l=null,u=null,s=null,c=null;return this.walk(function(n,e){r.code+=n,null!==e.source&&null!==e.line&&null!==e.column?(l===e.source&&u===e.line&&s===e.column&&c===e.name||o.addMapping({source:e.source,original:{line:e.line,column:e.column},generated:{line:r.line,column:r.column},name:e.name}),l=e.source,u=e.line,s=e.column,c=e.name,i=!0):i&&(o.addMapping({generated:{line:r.line,column:r.column}}),l=null,i=!1);for(var a=0,h=n.length;a<h;a++)n.charCodeAt(a)===t?(r.line++,r.column=0,a+1===h?(l=null,i=!1):i&&o.addMapping({source:e.source,original:{line:e.line,column:e.column},generated:{line:r.line,column:r.column},name:e.name})):r.column++}),this.walkSourceContents(function(n,e){o.setSourceContent(n,e)}),{code:r.code,map:o}},exports.SourceNode=i;
},{"./source-map-generator":"Wwhl","./util":"XUQW"}],"aRf0":[function(require,module,exports) {
exports.SourceMapGenerator=require("./lib/source-map-generator").SourceMapGenerator,exports.SourceMapConsumer=require("./lib/source-map-consumer").SourceMapConsumer,exports.SourceNode=require("./lib/source-node").SourceNode;
},{"./lib/source-map-generator":"Wwhl","./lib/source-map-consumer":"fmOz","./lib/source-node":"Qm02"}]},{},["aRf0"], null)
//# sourceMappingURL=source-map.438fa06b.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment