Mid-Simulator/node_modules/stacktrace-gps/dist/stacktrace-gps.min.js

2 lines
24 KiB
JavaScript
Raw Normal View History

2022-04-18 01:14:39 +00:00
!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 r(e){return e.charAt(0).toUpperCase()+e.substring(1)}function e(e){return function(){return this[e]}}var n=["isConstructor","isEval","isNative","isToplevel"],t=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=n.concat(t,o,["args"]);function c(e){if(e)for(var n=0;n<i.length;n++)void 0!==e[i[n]]&&this["set"+r(i[n])](e[i[n]])}c.prototype={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},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof c)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new c(e)}},toString:function(){var e=this.getFileName()||"",n=this.getLineNumber()||"",r=this.getColumnNumber()||"",t=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+n+":"+r+")":"[eval]:"+n+":"+r:t?t+" ("+e+":"+n+":"+r+")":e+":"+n+":"+r}},c.fromString=function(e){var n=e.indexOf("("),r=e.lastIndexOf(")"),t=e.substring(0,n),o=e.substring(n+1,r).split(","),i=e.substring(r+1);if(0===i.indexOf("@"))var s=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(i,""),a=s[1],u=s[2],l=s[3];return new c({functionName:t,args:o||void 0,fileName:a,lineNumber:u||void 0,columnNumber:l||void 0})};for(var s=0;s<n.length;s++)c.prototype["get"+r(n[s])]=e(n[s]),c.prototype["set"+r(n[s])]=function(n){return function(e){this[n]=Boolean(e)}}(n[s]);for(var a=0;a<t.length;a++)c.prototype["get"+r(t[a])]=e(t[a]),c.prototype["set"+r(t[a])]=function(r){return function(e){if(n=e,isNaN(parseFloat(n))||!isFinite(n))throw new TypeError(r+" must be a Number");var n;this[r]=Number(e)}}(t[a]);for(var u=0;u<o.length;u++)c.prototype["get"+r(o[u])]=e(o[u]),c.prototype["set"+r(o[u])]=function(n){return function(e){this[n]=String(e)}}(o[u]);return c});var SourceMap=function(r){var t={};function o(e){if(t[e])return t[e].exports;var n=t[e]={i:e,l:!1,exports:{}};return r[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=r,o.c=t,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(n,e){if(1&e&&(n=o(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var t in n)o.d(r,t,function(e){return n[e]}.bind(null,t));return r},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o(o.s=1)}([function(e,u){u.getArg=function(e,n,r){if(n in e)return e[n];if(3===arguments.length)return r;throw new Error('"'+n+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,i=/^data:.+\,.+$/;function l(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 c(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 s(e){var n=e,r=l(e);if(r){if(!r.path)return e;n=r.path}for(var t,o=u.isAbsolute(n),i=n.split(/\/+/),s=0,a=i.length-1;0<=a;a--)"."===(t=i[a])?i.splice(a,1):".."===t?s++:0<s&&(""===t?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return""===(n=i.join("/"))&&(n=o?"/":"."),r?(r.path=n,c(r)):n}u.urlParse=l,u.urlGenerate=c,u.normalize=s,u.join=function(e,n){""===e&&(e="."),""===n&&(n=".");var r=l(n),t=l(e);if(t&&(e=t.path||"/"),r&&!r.scheme)return t&&(r.scheme=t.scheme),c(r);if(r||n.match(i))return n;if(t&&!t.host&&!t.path)return t.host=n,c(t);var o="/"===n.charAt(0)?n:s(e.replace(/\/+$
//# sourceMappingURL=stacktrace-gps.min.js.map