UNPKG

@opstarts/chimp

Version:

Develop acceptance tests & end-to-end tests with realtime feedback.

3 lines (2 loc) 28.8 kB
(function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function n(e){return"function"==typeof e}function t(e){return"object"==typeof e&&null!==e}function r(e){I=e}function o(e){J=e}function i(){return function(){process.nextTick(l)}}function s(){return function(){k(l)}}function u(){var e=0,n=new Z(l),t=document.createTextNode("");return n.observe(t,{characterData:!0}),function(){t.data=e=++e%2}}function a(){var e=new MessageChannel;return e.port1.onmessage=l,function(){e.port2.postMessage(0)}}function c(){return function(){setTimeout(l,1)}}function l(){for(var e=0;z>e;e+=2){var n=Q[e],t=Q[e+1];n(t),Q[e]=void 0,Q[e+1]=void 0}z=0}function f(){try{var e=require,n=e("vertx");return k=n.runOnLoop||n.runOnContext,s()}catch(t){return c()}}function g(){}function p(){return new TypeError("You cannot resolve a promise with itself")}function h(){return new TypeError("A promises callback cannot return that same promise.")}function m(e){try{return e.then}catch(n){return ne.error=n,ne}}function d(e,n,t,r){try{e.call(n,t,r)}catch(o){return o}}function _(e,n,t){J(function(e){var r=!1,o=d(t,n,function(t){r||(r=!0,n!==t?b(e,t):A(e,t))},function(n){r||(r=!0,C(e,n))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,C(e,o))},e)}function v(e,n){n._state===X?A(e,n._result):n._state===ee?C(e,n._result):L(n,void 0,function(n){b(e,n)},function(n){C(e,n)})}function y(e,t){if(t.constructor===e.constructor)v(e,t);else{var r=m(t);r===ne?C(e,ne.error):void 0===r?A(e,t):n(r)?_(e,t,r):A(e,t)}}function b(n,t){n===t?C(n,p()):e(t)?y(n,t):A(n,t)}function w(e){e._onerror&&e._onerror(e._result),E(e)}function A(e,n){e._state===V&&(e._result=n,e._state=X,0!==e._subscribers.length&&J(E,e))}function C(e,n){e._state===V&&(e._state=ee,e._result=n,J(w,e))}function L(e,n,t,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=n,o[i+X]=t,o[i+ee]=r,0===i&&e._state&&J(E,e)}function E(e){var n=e._subscribers,t=e._state;if(0!==n.length){for(var r,o,i=e._result,s=0;s<n.length;s+=3)r=n[s],o=n[s+t],r?N(t,r,o,i):o(i);e._subscribers.length=0}}function O(){this.error=null}function S(e,n){try{return e(n)}catch(t){return te.error=t,te}}function N(e,t,r,o){var i,s,u,a,c=n(r);if(c){if(i=S(r,o),i===te?(a=!0,s=i.error,i=null):u=!0,t===i)return void C(t,h())}else i=o,u=!0;t._state!==V||(c&&u?b(t,i):a?C(t,s):e===X?A(t,i):e===ee&&C(t,i))}function M(e,n){try{n(function(n){b(e,n)},function(n){C(e,n)})}catch(t){C(e,t)}}function R(e,n){var t=this;t._instanceConstructor=e,t.promise=new e(g),t._validateInput(n)?(t._input=n,t.length=n.length,t._remaining=n.length,t._init(),0===t.length?A(t.promise,t._result):(t.length=t.length||0,t._enumerate(),0===t._remaining&&A(t.promise,t._result))):C(t.promise,t._validationError())}function P(e){return new re(this,e).promise}function j(e){function n(e){b(o,e)}function t(e){C(o,e)}var r=this,o=new r(g);if(!$(e))return C(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,s=0;o._state===V&&i>s;s++)L(r.resolve(e[s]),void 0,n,t);return o}function x(e){var n=this;if(e&&"object"==typeof e&&e.constructor===n)return e;var t=new n(g);return b(t,e),t}function T(e){var n=this,t=new n(g);return C(t,e),t}function F(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function G(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function D(e){this._id=ae++,this._state=void 0,this._result=void 0,this._subscribers=[],g!==e&&(n(e)||F(),this instanceof D||G(),M(this,e))}function B(){var e;if("undefined"!=typeof global)e=global;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(n){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;(!t||"[object Promise]"!==Object.prototype.toString.call(t.resolve())||t.cast)&&(e.Promise=ce)}var U;U=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var k,I,q,$=U,z=0,J=({}.toString,function(e,n){Q[z]=e,Q[z+1]=n,z+=2,2===z&&(I?I(l):q())}),W="undefined"!=typeof window?window:void 0,Y=W||{},Z=Y.MutationObserver||Y.WebKitMutationObserver,H="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),K="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Q=new Array(1e3);q=H?i():Z?u():K?a():void 0===W&&"function"==typeof require?f():c();var V=void 0,X=1,ee=2,ne=new O,te=new O;R.prototype._validateInput=function(e){return $(e)},R.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},R.prototype._init=function(){this._result=new Array(this.length)};var re=R;R.prototype._enumerate=function(){for(var e=this,n=e.length,t=e.promise,r=e._input,o=0;t._state===V&&n>o;o++)e._eachEntry(r[o],o)},R.prototype._eachEntry=function(e,n){var r=this,o=r._instanceConstructor;t(e)?e.constructor===o&&e._state!==V?(e._onerror=null,r._settledAt(e._state,n,e._result)):r._willSettleAt(o.resolve(e),n):(r._remaining--,r._result[n]=e)},R.prototype._settledAt=function(e,n,t){var r=this,o=r.promise;o._state===V&&(r._remaining--,e===ee?C(o,t):r._result[n]=t),0===r._remaining&&A(o,r._result)},R.prototype._willSettleAt=function(e,n){var t=this;L(e,void 0,function(e){t._settledAt(X,n,e)},function(e){t._settledAt(ee,n,e)})};var oe=P,ie=j,se=x,ue=T,ae=0,ce=D;D.all=oe,D.race=ie,D.resolve=se,D.reject=ue,D._setScheduler=r,D._setAsap=o,D._asap=J,D.prototype={constructor:D,then:function(e,n){var t=this,r=t._state;if(r===X&&!e||r===ee&&!n)return this;var o=new this.constructor(g),i=t._result;if(r){var s=arguments[r-1];J(function(){N(r,o,s,i)})}else L(t,o,e,n);return o},"catch":function(e){return this.then(null,e)}};var le=B,fe={Promise:ce,polyfill:le};"function"==typeof define&&define.amd?define(function(){return fe}):"undefined"!=typeof module&&module.exports?module.exports=fe:"undefined"!=typeof this&&(this.ES6Promise=fe),le()}).call(this),function(){"undefined"==typeof Promise&&ES6Promise.polyfill()}(),function(e,n){"use strict";"function"==typeof define&&define.amd?define("stackframe",[],n):"object"==typeof exports?module.exports=n():e.StackFrame=n()}(this,function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function n(e,n,t,r,o,i){void 0!==e&&this.setFunctionName(e),void 0!==n&&this.setArgs(n),void 0!==t&&this.setFileName(t),void 0!==r&&this.setLineNumber(r),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return n.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(e){this.functionName=String(e)},getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getFileName:function(){return this.fileName},setFileName:function(e){this.fileName=String(e)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(n){if(!e(n))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(n)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(n){if(!e(n))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(n)},getSource:function(){return this.source},setSource:function(e){this.source=String(e)},toString:function(){var n=this.getFunctionName()||"{anonymous}",t="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",o=e(this.getLineNumber())?":"+this.getLineNumber():"",i=e(this.getColumnNumber())?":"+this.getColumnNumber():"";return n+t+r+o+i}},n});var SourceMap=function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n,t){function r(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var t=u.getArg(n,"version"),r=u.getArg(n,"sources"),o=u.getArg(n,"names",[]),i=u.getArg(n,"sourceRoot",null),s=u.getArg(n,"sourcesContent",null),a=u.getArg(n,"mappings"),l=u.getArg(n,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);r=r.map(String).map(u.normalize).map(function(e){return i&&u.isAbsolute(i)&&u.isAbsolute(e)?u.relative(i,e):e}),this._names=c.fromArray(o.map(String),!0),this._sources=c.fromArray(r,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=a,this.file=l}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var t=u.getArg(n,"version"),o=u.getArg(n,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new c,this._names=new c;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=u.getArg(e,"offset"),t=u.getArg(n,"line"),o=u.getArg(n,"column");if(t<i.line||t===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=n,{generatedOffset:{generatedLine:t+1,generatedColumn:o+1},consumer:new r(u.getArg(e,"map"))}})}var u=t(1),a=t(2),c=t(3).ArraySet,l=t(4),f=t(6).quickSort;r.fromSourceMap=function(e){return o.fromSourceMap(e)},r.prototype._version=3,r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),r.prototype._charIsMappingSeparator=function(e,n){var t=e.charAt(n);return";"===t||","===t},r.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.prototype.eachMapping=function(e,n,t){var o,i=n||null,s=t||r.GENERATED_ORDER;switch(s){case r.GENERATED_ORDER:o=this._generatedMappings;break;case r.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map(function(e){var n=null===e.source?null:this._sources.at(e.source);return null!=n&&null!=a&&(n=u.join(a,n)),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,i)},r.prototype.allGeneratedPositionsFor=function(e){var n=u.getArg(e,"line"),t={source:u.getArg(e,"source"),originalLine:n,originalColumn:u.getArg(e,"column",0)};if(null!=this.sourceRoot&&(t.source=u.relative(this.sourceRoot,t.source)),!this._sources.has(t.source))return[];t.source=this._sources.indexOf(t.source);var r=[],o=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",u.compareByOriginalPositions,a.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)r.push({line:u.getArg(i,"generatedLine",null),column:u.getArg(i,"generatedColumn",null),lastColumn:u.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var c=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==c;)r.push({line:u.getArg(i,"generatedLine",null),column:u.getArg(i,"generatedColumn",null),lastColumn:u.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return r},n.SourceMapConsumer=r,o.prototype=Object.create(r.prototype),o.prototype.consumer=r,o.fromSourceMap=function(e){var n=Object.create(o.prototype),t=n._names=c.fromArray(e._names.toArray(),!0),r=n._sources=c.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],g=0,p=s.length;p>g;g++){var h=s[g],m=new i;m.generatedLine=h.generatedLine,m.generatedColumn=h.generatedColumn,h.source&&(m.source=r.indexOf(h.source),m.originalLine=h.originalLine,m.originalColumn=h.originalColumn,h.name&&(m.name=t.indexOf(h.name)),l.push(m)),a.push(m)}return f(n.__originalMappings,u.compareByOriginalPositions),n},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?u.join(this.sourceRoot,e):e},this)}}),o.prototype._parseMappings=function(e,n){for(var t,r,o,s,a,c=1,g=0,p=0,h=0,m=0,d=0,_=e.length,v=0,y={},b={},w=[],A=[];_>v;)if(";"===e.charAt(v))c++,v++,g=0;else if(","===e.charAt(v))v++;else{for(t=new i,t.generatedLine=c,s=v;_>s&&!this._charIsMappingSeparator(e,s);s++);if(r=e.slice(v,s),o=y[r])v+=r.length;else{for(o=[];s>v;)l.decode(e,v,b),a=b.value,v=b.rest,o.push(a);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");y[r]=o}t.generatedColumn=g+o[0],g=t.generatedColumn,o.length>1&&(t.source=m+o[1],m+=o[1],t.originalLine=p+o[2],p=t.originalLine,t.originalLine+=1,t.originalColumn=h+o[3],h=t.originalColumn,o.length>4&&(t.name=d+o[4],d+=o[4])),A.push(t),"number"==typeof t.originalLine&&w.push(t)}f(A,u.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,f(w,u.compareByOriginalPositions),this.__originalMappings=w},o.prototype._findMapping=function(e,n,t,r,o,i){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return a.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var t=this._generatedMappings[e+1];if(n.generatedLine===t.generatedLine){n.lastGeneratedColumn=t.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(e){var n={generatedLine:u.getArg(e,"line"),generatedColumn:u.getArg(e,"column")},t=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",u.compareByGeneratedPositionsDeflated,u.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(t>=0){var o=this._generatedMappings[t];if(o.generatedLine===n.generatedLine){var i=u.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=u.join(this.sourceRoot,i)));var s=u.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:u.getArg(o,"originalLine",null),column:u.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}):!1},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=u.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var t;if(null!=this.sourceRoot&&(t=u.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==t.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!t.path||"/"==t.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=u.getArg(e,"source");if(null!=this.sourceRoot&&(n=u.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var t={source:n,originalLine:u.getArg(e,"line"),originalColumn:u.getArg(e,"column")},o=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",u.compareByOriginalPositions,u.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===t.source)return{line:u.getArg(i,"generatedLine",null),column:u.getArg(i,"generatedColumn",null),lastColumn:u.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(r.prototype),s.prototype.constructor=r,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var t=0;t<this._sections[n].consumer.sources.length;t++)e.push(this._sections[n].consumer.sources[t]);return e}}),s.prototype.originalPositionFor=function(e){var n={generatedLine:u.getArg(e,"line"),generatedColumn:u.getArg(e,"column")},t=a.search(n,this._sections,function(e,n){var t=e.generatedLine-n.generatedOffset.generatedLine;return t?t:e.generatedColumn-n.generatedOffset.generatedColumn}),r=this._sections[t];return r?r.consumer.originalPositionFor({line:n.generatedLine-(r.generatedOffset.generatedLine-1),column:n.generatedColumn-(r.generatedOffset.generatedLine===n.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},s.prototype.sourceContentFor=function(e,n){for(var t=0;t<this._sections.length;t++){var r=this._sections[t],o=r.consumer.sourceContentFor(e,!0);if(o)return o}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var t=this._sections[n];if(-1!==t.consumer.sources.indexOf(u.getArg(e,"source"))){var r=t.consumer.generatedPositionFor(e);if(r){var o={line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},s.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],o=r.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],a=r.consumer._sources.at(s.source);null!==r.consumer.sourceRoot&&(a=u.join(r.consumer.sourceRoot,a)),this._sources.add(a),a=this._sources.indexOf(a);var c=r.consumer._names.at(s.name);this._names.add(c),c=this._names.indexOf(c);var l={source:a,generatedLine:s.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(r.generatedOffset.generatedLine===s.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:c};this.__generatedMappings.push(l),"number"==typeof l.originalLine&&this.__originalMappings.push(l)}f(this.__generatedMappings,u.compareByGeneratedPositionsDeflated),f(this.__originalMappings,u.compareByOriginalPositions)},n.IndexedSourceMapConsumer=s},function(e,n){function t(e,n,t){if(n in e)return e[n];if(3===arguments.length)return t;throw new Error('"'+n+'" is a required argument.')}function r(e){var n=e.match(d);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(e){var t=e,i=r(e);if(i){if(!i.path)return e;t=i.path}for(var s,u=n.isAbsolute(t),a=t.split(/\/+/),c=0,l=a.length-1;l>=0;l--)s=a[l],"."===s?a.splice(l,1):".."===s?c++:c>0&&(""===s?(a.splice(l+1,c),c=0):(a.splice(l,2),c--));return t=a.join("/"),""===t&&(t=u?"/":"."),i?(i.path=t,o(i)):t}function s(e,n){""===e&&(e="."),""===n&&(n=".");var t=r(n),s=r(e);if(s&&(e=s.path||"/"),t&&!t.scheme)return s&&(t.scheme=s.scheme),o(t);if(t||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var u="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=u,o(s)):u}function u(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var t=0;0!==n.indexOf(e+"/");){var r=e.lastIndexOf("/");if(0>r)return n;if(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/))return n;++t}return Array(t+1).join("../")+n.substr(e.length+1)}function a(e){return e}function c(e){return f(e)?"$"+e:e}function l(e){return f(e)?e.slice(1):e}function f(e){if(!e)return!1;var n=e.length;if(9>n)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var t=n-10;t>=0;t--)if(36!==e.charCodeAt(t))return!1;return!0}function g(e,n,t){var r=e.source-n.source;return 0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r||t?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=e.generatedLine-n.generatedLine,0!==r?r:e.name-n.name))))}function p(e,n,t){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r||t?r:(r=e.source-n.source,0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:e.name-n.name))))}function h(e,n){return e===n?0:e>n?1:-1}function m(e,n){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=h(e.source,n.source),0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:h(e.name,n.name)))))}n.getArg=t;var d=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=r,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(d)},n.relative=u;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?a:c,n.fromSetString=v?a:l,n.compareByOriginalPositions=g,n.compareByGeneratedPositionsDeflated=p,n.compareByGeneratedPositionsInflated=m},function(e,n){function t(e,r,o,i,s,u){var a=Math.floor((r-e)/2)+e,c=s(o,i[a],!0);return 0===c?a:c>0?r-a>1?t(a,r,o,i,s,u):u==n.LEAST_UPPER_BOUND?r<i.length?r:-1:a:a-e>1?t(e,a,o,i,s,u):u==n.LEAST_UPPER_BOUND?a:0>e?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,o,i){if(0===r.length)return-1;var s=t(-1,r.length,e,r,o,i||n.GREATEST_LOWER_BOUND);if(0>s)return-1;for(;s-1>=0&&0===o(r[s],r[s-1],!0);)--s;return s}},function(e,n,t){function r(){this._array=[],this._set=Object.create(null)}var o=t(1),i=Object.prototype.hasOwnProperty;r.fromArray=function(e,n){for(var t=new r,o=0,i=e.length;i>o;o++)t.add(e[o],n);return t},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(e,n){var t=o.toSetString(e),r=i.call(this._set,t),s=this._array.length;(!r||n)&&this._array.push(e),r||(this._set[t]=s)},r.prototype.has=function(e){var n=o.toSetString(e);return i.call(this._set,n)},r.prototype.indexOf=function(e){var n=o.toSetString(e);if(i.call(this._set,n))return this._set[n];throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},r.prototype.toArray=function(){return this._array.slice()},n.ArraySet=r},function(e,n,t){function r(e){return 0>e?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),t=e>>1;return n?-t:t}var i=t(5),s=5,u=1<<s,a=u-1,c=u;n.encode=function(e){var n,t="",o=r(e);do n=o&a,o>>>=s,o>0&&(n|=c),t+=i.encode(n);while(o>0);return t},n.decode=function(e,n,t){var r,u,l=e.length,f=0,g=0;do{if(n>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(u=i.decode(e.charCodeAt(n++)),-1===u)throw new Error("Invalid base64 digit: "+e.charAt(n-1));r=!!(u&c),u&=a,f+=u<<g,g+=s}while(r);t.value=o(f),t.rest=n}},function(e,n){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(e>=0&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){var n=65,t=90,r=97,o=122,i=48,s=57,u=43,a=47,c=26,l=52;return e>=n&&t>=e?e-n:e>=r&&o>=e?e-r+c:e>=i&&s>=e?e-i+l:e==u?62:e==a?63:-1}},function(e,n){function t(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function r(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(s>i){var u=r(i,s),a=i-1;t(e,u,s);for(var c=e[s],l=i;s>l;l++)n(e[l],c)<=0&&(a+=1,t(e,a,l));t(e,a+1,l);var f=a+1;o(e,n,i,f-1),o(e,n,f+1,s)}}n.quickSort=function(e,n){o(e,n,0,e.length-1)}}]);!function(e,n){"use strict";"function"==typeof define&&define.amd?define("stacktrace-gps",["source-map","stackframe"],n):"object"==typeof exports?module.exports=n(require("source-map/lib/source-map-consumer"),require("stackframe")):e.StackTraceGPS=n(e.SourceMap||e.sourceMap,e.StackFrame)}(this,function(e,n){"use strict";function t(e){return new Promise(function(n,t){var r=new XMLHttpRequest;r.open("get",e),r.onerror=t,r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?n(r.responseText):t(new Error("HTTP status: "+r.status+" retrieving "+e)))},r.send()})}function r(e){if("undefined"!=typeof window&&window.atob)return window.atob(e);throw new Error("You must supply a polyfill for window.atob in this environment")}function o(e){if("undefined"!=typeof JSON&&JSON.parse)return JSON.parse(e);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function i(e,n){for(var t,r=/function\s+([^(]*?)\s*\(([^)]*)\)/,o=/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,i=/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,s=e.split("\n"),u="",a=Math.min(n,20),c=0;a>c;++c){var l=s[n-c-1],f=l.indexOf("//");if(f>=0&&(l=l.substr(0,f)),l){if(u=l+u,t=o.exec(u),t&&t[1])return t[1];if(t=r.exec(u),t&&t[1])return t[1];if(t=i.exec(u),t&&t[1])return t[1]}}}function s(){if("function"!=typeof Object.defineProperty||"function"!=typeof Object.create)throw new Error("Unable to consume source maps in older browsers")}function u(e){if("object"!=typeof e)throw new TypeError("Given StackFrame is not an object");if("string"!=typeof e.fileName)throw new TypeError("Given file name is not a String");if("number"!=typeof e.lineNumber||e.lineNumber%1!==0||e.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if("number"!=typeof e.columnNumber||e.columnNumber%1!==0||e.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function a(e){var n=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/.exec(e);if(n&&n[1])return n[1];throw new Error("sourceMappingURL not found")}function c(t,r,o){return new Promise(function(i,s){var u=new e.SourceMapConsumer(r),a=u.originalPositionFor({line:t.lineNumber,column:t.columnNumber});if(a.source){var c=u.sourceContentFor(a.source);c&&(o[a.source]=c),i(new n(a.name||t.functionName,t.args,a.source,a.line,a.column))}else s(new Error("Could not get original source for given stackframe and source map"))})}return function l(e){return this instanceof l?(e=e||{},this.sourceCache=e.sourceCache||{},this.ajax=e.ajax||t,this._atob=e.atob||r,this._get=function(n){return new Promise(function(t,r){var o="data:"===n.substr(0,5);if(this.sourceCache[n])t(this.sourceCache[n]);else if(e.offline&&!o)r(new Error("Cannot make network requests in offline mode"));else if(o){var i=/^data:application\/json;([\w=:"-]+;)*base64,/,s=n.match(i);if(s){var u=s[0].length,a=n.substr(u),c=this._atob(a);this.sourceCache[n]=c,t(c)}else r(new Error("The encoding of the inline sourcemap is not supported"))}else{var l=this.ajax(n,{method:"get"});this.sourceCache[n]=l,l.then(t,r)}}.bind(this))},this.pinpoint=function(e){return new Promise(function(n,t){this.getMappedLocation(e).then(function(e){function t(){n(e)}this.findFunctionName(e).then(n,t)["catch"](t)}.bind(this),t)}.bind(this))},this.findFunctionName=function(e){return new Promise(function(t,r){u(e),this._get(e.fileName).then(function(r){var o=e.lineNumber,s=e.columnNumber,u=i(r,o,s);t(u?new n(u,e.args,e.fileName,o,s):e)},r)["catch"](r)}.bind(this))},void(this.getMappedLocation=function(e){return new Promise(function(n,t){s(),u(e);var r=this.sourceCache,i=e.fileName;this._get(i).then(function(s){var u=a(s),l="data:"===u.substr(0,5),f=i.substring(0,i.lastIndexOf("/")+1);"/"===u[0]||l||/^https?:\/\/|^\/\//i.test(u)||(u=f+u),this._get(u).then(function(t){"string"==typeof t&&(t=o(t.replace(/^\)\]\}'/,""))),"undefined"==typeof t.sourceRoot&&(t.sourceRoot=f),c(e,t,r).then(n)["catch"](function(){n(e)})},t)["catch"](t)}.bind(this),t)["catch"](t)}.bind(this))})):new l(e)}}); //# sourceMappingURL=stacktrace-gps-with-polyfills.min.js.map