From f5bd9667b367e90eadc6048684dfd26f9b6c84ec Mon Sep 17 00:00:00 2001 From: Thomas Ardal Date: Sat, 17 Aug 2019 17:20:08 +0200 Subject: [PATCH] Updated to 3.0.3 --- dist/elmahio.js | 2 +- dist/elmahio.js.map | 2 +- dist/elmahio.min.js | 2 +- dist/elmahio.min.js.map | 2 +- elmah.io.javascript.nuspec | 2 +- package.json | 2 +- src/elmahio.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/elmahio.js b/dist/elmahio.js index b35d884..47b8e96 100644 --- a/dist/elmahio.js +++ b/dist/elmahio.js @@ -1,5 +1,5 @@ /*! - * elmah.io Javascript Logger - version 3.0.1 + * elmah.io Javascript Logger - version 3.0.3 * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io */ (function(root, factory) { diff --git a/dist/elmahio.js.map b/dist/elmahio.js.map index 5c3d89e..f423e44 100644 --- a/dist/elmahio.js.map +++ b/dist/elmahio.js.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["elmahio.js"],"sourcesContent":["/*!\r\n * elmah.io Javascript Logger - version 3.0.1\r\n * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io\r\n */\r\n\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define([], function () {\r\n return factory(root);\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory(root);\r\n } else {\r\n root.Elmahio = factory(root);\r\n }\r\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\r\n\r\n 'use strict';\r\n\r\n //\r\n // ==== STACKFRAME ====\r\n //\r\n\r\n var StackFrame = (function () {\r\n \"use strict\";\r\n function _isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n }\r\n function _capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n }\r\n function _getter(p) {\r\n return function () {\r\n return this[p];\r\n };\r\n }\r\n var booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\r\n var numericProps = [\"columnNumber\", \"lineNumber\"];\r\n var stringProps = [\"fileName\", \"functionName\", \"source\"];\r\n var arrayProps = [\"args\"];\r\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\r\n function StackFrame(obj) {\r\n if (obj instanceof Object) {\r\n for (var i = 0; i < props.length; i++) {\r\n if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {\r\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\r\n }\r\n }\r\n }\r\n }\r\n StackFrame.prototype = {\r\n getArgs: function () {\r\n return this.args;\r\n },\r\n setArgs: function (v) {\r\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\r\n throw new TypeError(\"Args must be an Array\");\r\n }\r\n this.args = v;\r\n },\r\n getEvalOrigin: function () {\r\n return this.evalOrigin;\r\n },\r\n setEvalOrigin: function (v) {\r\n if (v instanceof StackFrame) {\r\n this.evalOrigin = v;\r\n } else if (v instanceof Object) {\r\n this.evalOrigin = new StackFrame(v);\r\n } else {\r\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\r\n }\r\n },\r\n toString: function () {\r\n var functionName = this.getFunctionName() || \"{anonymous}\";\r\n var args = \"(\" + (this.getArgs() || []).join(\",\") + \")\";\r\n var fileName = this.getFileName() ? \"@\" + this.getFileName() : \"\";\r\n var lineNumber = _isNumber(this.getLineNumber()) ? \":\" + this.getLineNumber() : \"\";\r\n var columnNumber = _isNumber(this.getColumnNumber()) ? \":\" + this.getColumnNumber() : \"\";\r\n return functionName + args + fileName + lineNumber + columnNumber;\r\n }\r\n };\r\n StackFrame.fromString = function StackFrame$$fromString(str) {\r\n var argsStartIndex = str.indexOf(\"(\");\r\n var argsEndIndex = str.lastIndexOf(\")\");\r\n var functionName = str.substring(0, argsStartIndex);\r\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\r\n var locationString = str.substring(argsEndIndex + 1);\r\n if (locationString.indexOf(\"@\") === 0) {\r\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\r\n var fileName = parts[1];\r\n var lineNumber = parts[2];\r\n var columnNumber = parts[3];\r\n }\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args || undefined,\r\n fileName: fileName,\r\n lineNumber: lineNumber || undefined,\r\n columnNumber: columnNumber || undefined\r\n });\r\n };\r\n for (var i = 0; i < booleanProps.length; i++) {\r\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\r\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = function (p) {\r\n return function (v) {\r\n this[p] = Boolean(v);\r\n };\r\n }(booleanProps[i]);\r\n }\r\n for (var j = 0; j < numericProps.length; j++) {\r\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(numericProps[j]);\r\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = function (p) {\r\n return function (v) {\r\n if (!_isNumber(v)) {\r\n throw new TypeError(p + \" must be a Number\");\r\n }\r\n this[p] = Number(v);\r\n };\r\n }(numericProps[j]);\r\n }\r\n for (var k = 0; k < stringProps.length; k++) {\r\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(stringProps[k]);\r\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = function (p) {\r\n return function (v) {\r\n this[p] = String(v);\r\n };\r\n }(stringProps[k]);\r\n }\r\n return StackFrame;\r\n })();\r\n\r\n //\r\n // ==== ERROR STACK PARSER ====\r\n //\r\n\r\n var ErrorStackParser = (function () {\r\n \"use strict\";\r\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+\\:\\d+/;\r\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m;\r\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code\\])?$/;\r\n return {\r\n /**\r\n * Given an Error object, extract the most information from it.\r\n *\r\n * @param {Error} error object\r\n * @return {Array} of StackFrames\r\n */\r\n parse: function ErrorStackParser$$parse(error) {\r\n if (typeof error.stacktrace !== \"undefined\" || typeof error[\"opera#sourceloc\"] !== \"undefined\") {\r\n return this.parseOpera(error);\r\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\r\n return this.parseV8OrIE(error);\r\n } else if (error.stack) {\r\n return this.parseFFOrSafari(error);\r\n } else {\r\n throw new Error(\"Cannot parse given Error object\");\r\n }\r\n },\r\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\r\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\r\n // Fail-fast but return locations like \"(native)\"\r\n if (urlLike.indexOf(\":\") === -1) {\r\n return [urlLike];\r\n }\r\n var regExp = /(.+?)(?:\\:(\\d+))?(?:\\:(\\d+))?$/;\r\n var parts = regExp.exec(urlLike.replace(/[\\(\\)]/g, \"\"));\r\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\r\n },\r\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(CHROME_IE_STACK_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n if (line.indexOf(\"(eval \") > -1) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g, \"\");\r\n }\r\n var tokens = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").split(/\\s+/).slice(1);\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionName = tokens.join(\" \") || undefined;\r\n var fileName = [\"eval\", \"\"].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: fileName,\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n },\r\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n if (line.indexOf(\" > eval\") > -1) {\r\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g, \":$1\");\r\n }\r\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\r\n // Safari eval frames only have function names and nothing else\r\n return new StackFrame({\r\n functionName: line\r\n });\r\n } else {\r\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\r\n var matches = line.match(functionNameRegex);\r\n var functionName = matches && matches[1] ? matches[1] : undefined;\r\n var locationParts = this.extractLocation(line.replace(functionNameRegex, \"\"));\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }\r\n }, this);\r\n },\r\n parseOpera: function ErrorStackParser$$parseOpera(e) {\r\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\r\n return this.parseOpera9(e);\r\n } else if (!e.stack) {\r\n return this.parseOpera10(e);\r\n } else {\r\n return this.parseOpera11(e);\r\n }\r\n },\r\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\r\n var lines = e.message.split(\"\\n\");\r\n var result = [];\r\n for (var i = 2, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\r\n var lines = e.stacktrace.split(\"\\n\");\r\n var result = [];\r\n for (var i = 0, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n functionName: match[3] || undefined,\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n // Opera 10.65+ Error.stack very similar to FF/Safari\r\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\r\n }, this);\r\n return filtered.map(function (line) {\r\n var tokens = line.split(\"@\");\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionCall = tokens.shift() || \"\";\r\n var functionName = functionCall.replace(//, \"$2\").replace(/\\([^\\)]*\\)/g, \"\") || undefined;\r\n var argsRaw;\r\n if (functionCall.match(/\\(([^\\)]*)\\)/)) {\r\n argsRaw = functionCall.replace(/^[^\\(]+\\(([^\\)]*)\\)$/, \"$1\");\r\n }\r\n var args = argsRaw === undefined || argsRaw === \"[arguments not available]\" ? undefined : argsRaw.split(\",\");\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n }\r\n };\r\n })();\r\n\r\n //\r\n // ==== STACKTRACE-GPS ====\r\n //\r\n\r\n var SourceMap = function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=n,r.p=\"\",r(0)}([function(e,n,r){var t=r(1),o=r(2),i=r(3).ArraySet,a=r(4),s=r(6).quickSort;function u(e){var n=e;return\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\"))),null!=n.sections?new c(n):new l(n)}function l(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sources\"),a=t.getArg(n,\"names\",[]),s=t.getArg(n,\"sourceRoot\",null),u=t.getArg(n,\"sourcesContent\",null),l=t.getArg(n,\"mappings\"),g=t.getArg(n,\"file\",null);if(r!=this._version)throw new Error(\"Unsupported version: \"+r);o=o.map(String).map(t.normalize).map(function(e){return s&&t.isAbsolute(s)&&t.isAbsolute(e)?t.relative(s,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=g}function g(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sections\");if(r!=this._version)throw new Error(\"Unsupported version: \"+r);this._sources=new i,this._names=new i;var a={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=t.getArg(e,\"offset\"),r=t.getArg(n,\"line\"),o=t.getArg(n,\"column\");if(r=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=a.length;p1&&(r.source=d+i[1],d+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+i[3],f=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),L.push(r),\"number\"==typeof r.originalLine&&y.push(r)}s(L,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(y,t.compareByOriginalPositions),this.__originalMappings=y},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[t]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,\"name\",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,\"originalLine\",null),column:t.getArg(o,\"originalColumn\",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\\/\\//,\"\");if(\"file\"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||\"/\"==r.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.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,\"source\");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,\"line\"),originalColumn:t.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(e,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,\"generatedLine\",null),column:t.getArg(i,\"generatedColumn\",null),lastColumn:t.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,c.prototype=Object.create(u.prototype),c.prototype.constructor=u,c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){for(var e=[],n=0;n=0;g--)\".\"===(a=u[g])?u.splice(g,1):\"..\"===a?l++:l>0&&(\"\"===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=s?\"/\":\".\"),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){\"\"===e&&(e=\".\"),\"\"===n&&(n=\".\");var r=o(n),s=o(e);if(s&&(e=s.path||\"/\"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u=\"/\"===n.charAt(0)?n:a(e.replace(/\\/+$/,\"\")+\"/\"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return\"/\"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==n.indexOf(e+\"/\");){var t=e.lastIndexOf(\"/\");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\\/]+:\\/)?\\/*$/))return n;++r}return Array(r+1).join(\"../\")+n.substr(e.length+1)};var s=!(\"__proto__\"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)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 r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?\"$\"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=g(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,g=0;do{if(n>=u)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");n.encode=function(e){if(0<=e&&e= 200 && req.status < 300 || url.substr(0, 7) === \"file://\" && req.responseText) {\r\n resolve(req.responseText);\r\n } else {\r\n reject(new Error(\"HTTP status: \" + req.status + \" retrieving \" + url));\r\n }\r\n }\r\n };\r\n req.send();\r\n });\r\n }\r\n /**\r\n * Convert a Base64-encoded string into its original representation.\r\n * Used for inline sourcemaps.\r\n *\r\n * @param {String} b64str Base-64 encoded string\r\n * @returns {String} original representation of the base64-encoded string.\r\n */\r\n function _atob(b64str) {\r\n if (typeof window !== \"undefined\" && window.atob) {\r\n return window.atob(b64str);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for window.atob in this environment\");\r\n }\r\n }\r\n function _parseJson(string) {\r\n if (typeof JSON !== \"undefined\" && JSON.parse) {\r\n return JSON.parse(string);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for JSON.parse in this environment\");\r\n }\r\n }\r\n function _findFunctionName(source, lineNumber) {\r\n var syntaxes = [ // {name} = function ({args}) TODO args capture\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/, // function {name}({args}) m[1]=name m[2]=args\r\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/, // {name} = eval()\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/, // fn_name() {\r\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/, // {name} = () => {\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/];\r\n var lines = source.split(\"\\n\");\r\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\r\n var code = \"\";\r\n var maxLines = Math.min(lineNumber, 20);\r\n for (var i = 0; i < maxLines; ++i) {\r\n // lineNo is 1-based, source[] is 0-based\r\n var line = lines[lineNumber - i - 1];\r\n var commentPos = line.indexOf(\"//\");\r\n if (commentPos >= 0) {\r\n line = line.substr(0, commentPos);\r\n }\r\n if (line) {\r\n code = line + code;\r\n var len = syntaxes.length;\r\n for (var index = 0; index < len; index++) {\r\n var m = syntaxes[index].exec(code);\r\n if (m && m[1]) {\r\n return m[1];\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n function _ensureSupportedEnvironment() {\r\n if (typeof Object.defineProperty !== \"function\" || typeof Object.create !== \"function\") {\r\n throw new Error(\"Unable to consume source maps in older browsers\");\r\n }\r\n }\r\n function _ensureStackFrameIsLegit(stackframe) {\r\n if (typeof stackframe !== \"object\") {\r\n throw new TypeError(\"Given StackFrame is not an object\");\r\n } else if (typeof stackframe.fileName !== \"string\") {\r\n throw new TypeError(\"Given file name is not a String\");\r\n } else if (typeof stackframe.lineNumber !== \"number\" || stackframe.lineNumber % 1 !== 0 || stackframe.lineNumber < 1) {\r\n throw new TypeError(\"Given line number must be a positive integer\");\r\n } else if (typeof stackframe.columnNumber !== \"number\" || stackframe.columnNumber % 1 !== 0 || stackframe.columnNumber < 0) {\r\n throw new TypeError(\"Given column number must be a non-negative integer\");\r\n }\r\n return true;\r\n }\r\n function _findSourceMappingURL(source) {\r\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\r\n var lastSourceMappingUrl;\r\n var matchSourceMappingUrl;\r\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\r\n // jshint ignore:line\r\n lastSourceMappingUrl = matchSourceMappingUrl[1];\r\n }\r\n if (lastSourceMappingUrl) {\r\n return lastSourceMappingUrl;\r\n } else {\r\n throw new Error(\"sourceMappingURL not found\");\r\n }\r\n }\r\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\r\n return new Promise(function (resolve, reject) {\r\n var loc = sourceMapConsumer.originalPositionFor({\r\n line: stackframe.lineNumber,\r\n column: stackframe.columnNumber\r\n });\r\n if (loc.source) {\r\n // cache mapped sources\r\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\r\n if (mappedSource) {\r\n sourceCache[loc.source] = mappedSource;\r\n }\r\n resolve(// given stackframe and source location, update stackframe\r\n new StackFrame({\r\n functionName: loc.name || stackframe.functionName,\r\n args: stackframe.args,\r\n fileName: loc.source,\r\n lineNumber: loc.line,\r\n columnNumber: loc.column\r\n }));\r\n } else {\r\n reject(new Error(\"Could not get original source for given stackframe and source map\"));\r\n }\r\n });\r\n }\r\n /**\r\n * @constructor\r\n * @param {Object} opts\r\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\r\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\r\n * opts.offline = True to prevent network requests.\r\n * Best effort without sources or source maps.\r\n * opts.ajax = Promise returning function to make X-Domain requests\r\n */\r\n return function StackTraceGPS(opts) {\r\n if (!(this instanceof StackTraceGPS)) {\r\n return new StackTraceGPS(opts);\r\n }\r\n opts = opts || {};\r\n this.sourceCache = opts.sourceCache || {};\r\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\r\n this.ajax = opts.ajax || _xdr;\r\n this._atob = opts.atob || _atob;\r\n\r\n this._get = function _get(location) {\r\n return new Promise(function (resolve, reject) {\r\n var isDataUrl = location.substr(0, 5) === \"data:\";\r\n if (this.sourceCache[location]) {\r\n resolve(this.sourceCache[location]);\r\n } else if (opts.offline && !isDataUrl) {\r\n reject(new Error(\"Cannot make network requests in offline mode\"));\r\n } else {\r\n if (isDataUrl) {\r\n // data URLs can have parameters.\r\n // see http://tools.ietf.org/html/rfc2397\r\n var supportedEncodingRegexp = /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\r\n var match = location.match(supportedEncodingRegexp);\r\n if (match) {\r\n var sourceMapStart = match[0].length;\r\n var encodedSource = location.substr(sourceMapStart);\r\n var source = this._atob(encodedSource);\r\n this.sourceCache[location] = source;\r\n resolve(source);\r\n } else {\r\n reject(new Error(\"The encoding of the inline sourcemap is not supported\"));\r\n }\r\n } else {\r\n var xhrPromise = this.ajax(location, {\r\n method: \"get\"\r\n });\r\n // Cache the Promise to prevent duplicate in-flight requests\r\n this.sourceCache[location] = xhrPromise;\r\n xhrPromise.then(resolve, reject);\r\n }\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\r\n * SourceMapConsumer in a per-instance cache.\r\n *\r\n * @param {String} sourceMappingURL = URL to fetch source map from\r\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\r\n * @returns {Promise} that resolves a SourceMapConsumer\r\n */\r\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\r\n return new Promise(function (resolve, reject) {\r\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\r\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\r\n } else {\r\n var sourceMapConsumerPromise = new Promise(function (resolve, reject) {\r\n return this._get(sourceMappingURL).then(function (sourceMapSource) {\r\n if (typeof sourceMapSource === \"string\") {\r\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, \"\"));\r\n }\r\n if (typeof sourceMapSource.sourceRoot === \"undefined\") {\r\n sourceMapSource.sourceRoot = defaultSourceRoot;\r\n }\r\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\r\n }, reject);\r\n }.bind(this));\r\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\r\n resolve(sourceMapConsumerPromise);\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, enhance function name and use source maps for a\r\n * better StackFrame.\r\n *\r\n * @param {StackFrame} stackframe object\r\n * @returns {Promise} that resolves with with source-mapped StackFrame\r\n */\r\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n this.getMappedLocation(stackframe).then(function (mappedStackFrame) {\r\n function resolveMappedStackFrame() {\r\n resolve(mappedStackFrame);\r\n }\r\n this.findFunctionName(mappedStackFrame).then(resolve, resolveMappedStackFrame)[\"catch\"](resolveMappedStackFrame);\r\n }.bind(this), reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, guess function name from location information.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureStackFrameIsLegit(stackframe);\r\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\r\n var lineNumber = stackframe.lineNumber;\r\n var columnNumber = stackframe.columnNumber;\r\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\r\n // Only replace functionName if we found something\r\n if (guessedFunctionName) {\r\n resolve(new StackFrame({\r\n functionName: guessedFunctionName,\r\n args: stackframe.args,\r\n fileName: stackframe.fileName,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber\r\n }));\r\n } else {\r\n resolve(stackframe);\r\n }\r\n }, reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureSupportedEnvironment();\r\n _ensureStackFrameIsLegit(stackframe);\r\n var sourceCache = this.sourceCache;\r\n var fileName = stackframe.fileName;\r\n this._get(fileName).then(function (source) {\r\n var sourceMappingURL = _findSourceMappingURL(source);\r\n var isDataUrl = sourceMappingURL.substr(0, 5) === \"data:\";\r\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf(\"/\") + 1);\r\n if (sourceMappingURL[0] !== \"/\" && !isDataUrl && !/^https?:\\/\\/|^\\/\\//i.test(sourceMappingURL)) {\r\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\r\n }\r\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot).then(function (sourceMapConsumer) {\r\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache).then(resolve)[\"catch\"](function () {\r\n resolve(stackframe);\r\n });\r\n });\r\n }.bind(this), reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n };\r\n })(SourceMap, StackFrame);\r\n\r\n //\r\n // Shared Variables\r\n //\r\n\r\n var scriptFile = document.getElementsByTagName('script');\r\n var scriptIndex = scriptFile.length - 1;\r\n var myScript = scriptFile[scriptIndex];\r\n var queryString = myScript.src.replace(/^[^\\?]+\\??/, '');\r\n var params = parseQuery(queryString);\r\n var paramsLength = objectLength(params);\r\n\r\n var debugSettings = {\r\n label: ' elmah.io debugger : On ',\r\n labelCSS: 'background: #06a89c; color: #ffffff; display: inline-block; font-size: 14px;',\r\n successCSS: 'background: #d4edda; color: #155724; display: inline-block; font-size: 13px;',\r\n errorCSS: 'background: #f8d7da; color: #721c24; display: inline-block; font-size: 13px;',\r\n warningCSS: 'background: #fff3cd; color: #856404; display: inline-block; font-size: 13px;',\r\n lightCSS: 'background: #e2e3e5; color: #383d41; display: inline-block; font-size: 13px;'\r\n };\r\n\r\n var defaults = {\r\n apiKey: null,\r\n logId: null,\r\n debug: false,\r\n application: null,\r\n filter: null\r\n };\r\n\r\n //\r\n // Shared Methods\r\n //\r\n\r\n var extend = function () {\r\n\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n\r\n // Check if a deep merge\r\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\r\n deep = arguments[0];\r\n i++;\r\n }\r\n\r\n // Merge the object into the extended object\r\n var merge = function (obj) {\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If property is an object, merge properties\r\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\r\n extended[prop] = extend(extended[prop], obj[prop]);\r\n } else {\r\n extended[prop] = obj[prop];\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Loop through each object and conduct a merge\r\n for (; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n merge(obj);\r\n }\r\n\r\n return extended;\r\n\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n function parseQuery(query) {\r\n var Params = new Object();\r\n if (!query) return Params; // return empty object\r\n var Pairs = query.split(/[;&]/);\r\n for (var i = 0; i < Pairs.length; i++) {\r\n var KeyVal = Pairs[i].split('=');\r\n if (!KeyVal || KeyVal.length !== 2) continue;\r\n var key = unescape(KeyVal[0]);\r\n var val = unescape(KeyVal[1]);\r\n val = val.replace(/\\+/g, ' ');\r\n Params[key] = val;\r\n }\r\n return Params;\r\n }\r\n\r\n function objectLength(obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n };\r\n\r\n function getSearchParameters() {\r\n var prmstr = window.location.search.substr(1);\r\n return prmstr !== null && prmstr !== \"\" ? transformToAssocArray(prmstr) : {};\r\n }\r\n\r\n function transformToAssocArray(prmstr) {\r\n var params = [];\r\n var prmarr = prmstr.split(\"&\");\r\n for (var i = 0; i < prmarr.length; i++) {\r\n var tmparr = prmarr[i].split(\"=\");\r\n params.push({\r\n 'key': tmparr[0],\r\n 'value': tmparr[1]\r\n });\r\n }\r\n return params;\r\n }\r\n\r\n function merge_objects(obj1, obj2) {\r\n var obj3 = {};\r\n for (var attrname1 in obj1) {\r\n obj3[attrname1] = obj1[attrname1];\r\n }\r\n for (var attrname2 in obj2) {\r\n obj3[attrname2] = obj2[attrname2];\r\n }\r\n\r\n return obj3;\r\n }\r\n\r\n //\r\n // Constructor\r\n // Can be named anything you want\r\n //\r\n\r\n var Constructor = function (options) {\r\n\r\n //\r\n // Unique Variables\r\n //\r\n\r\n var publicAPIs = {};\r\n var settings;\r\n\r\n function getPayload() {\r\n var payload = {\r\n \"url\": document.location.pathname || '/',\r\n \"application\": settings.application\r\n };\r\n\r\n var payload_data = [];\r\n\r\n if (document.documentMode) payload_data.push({ \"key\": \"Document-Mode\", \"value\": document.documentMode });\r\n if (window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth) payload_data.push({ \"key\": \"Browser-Width\", \"value\": window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth });\r\n if (window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight) payload_data.push({ \"key\": \"Browser-Height\", \"value\": window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight });\r\n if ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type) !== undefined) payload_data.push({ \"key\": \"Screen-Orientation\", \"value\": ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type).split(\"-\"))[0] });\r\n if (screen.width) payload_data.push({ \"key\": \"Screen-Width\", \"value\": screen.width });\r\n if (screen.height) payload_data.push({ \"key\": \"Screen-Height\", \"value\": screen.height });\r\n if (screen.colorDepth) payload_data.push({ \"key\": \"Color-Depth\", \"value\": screen.colorDepth });\r\n payload_data.push({ \"key\": \"X-ELMAHIO-SEARCH-isClientside\", \"value\": \"true\" });\r\n\r\n payload.data = payload_data;\r\n\r\n var payload_serverVariables = [];\r\n if (navigator.language) payload_serverVariables.push({ \"key\": \"User-Language\", \"value\": navigator.language });\r\n if (navigator.userAgent) payload_serverVariables.push({ \"key\": \"User-Agent\", \"value\": navigator.userAgent });\r\n if (document.referrer) payload_serverVariables.push({ \"key\": \"Referer\", \"value\": document.referrer });\r\n if (document.location.protocol === \"https:\") payload_serverVariables.push({ \"key\": \"HTTPS\", \"value\": 'on' });\r\n if (document.location.hostname) payload_serverVariables.push({ \"key\": \"Host\", \"value\": document.location.hostname });\r\n\r\n payload.serverVariables = payload_serverVariables;\r\n\r\n return payload;\r\n }\r\n\r\n function confirmResponse(status, response) {\r\n if (settings.debug) {\r\n if (status === 'error') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n } else if (status === 'success') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2714 ' + response + ' at ' + new Date().toLocaleString() + ' ', debugSettings.lightCSS, debugSettings.successCSS);\r\n } else {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created. Title should not be undefined, null or empty ! ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n }\r\n }\r\n }\r\n\r\n function stackGPS(error, xhr, jsonData) {\r\n \tvar errorStack = error.toString().split(\"\\n\")[0];\r\n \tvar gps = new StackTraceGPS();\r\n var promise = new Promise(function(resolve) {\r\n\t var stackframes = ErrorStackParser.parse(error);\r\n\t resolve(Promise.all(stackframes.map(function(sf) {\r\n\t return new Promise(function(resolve) {\r\n\t function resolveOriginal() {\r\n\t resolve(sf);\r\n\t }\r\n\t gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\r\n\t });\r\n\t })));\r\n \t}\r\n );\r\n\r\n promise.then(function(newFrames){\r\n \tnewFrames.forEach(function(stackFrame, i){\r\n\t\t\t\t\tif(stackFrame.functionName) {\r\n \t\t\tvar fn = stackFrame.functionName + ' ';\r\n \t\t} else {\r\n \t\t\tvar fn = '';\r\n \t\t}\r\n \t\tvar stackString = ' at ' + fn + '(' + stackFrame.fileName + ':' + stackFrame.lineNumber + ':' + stackFrame.columnNumber + ')';\r\n \t\tnewFrames[i] = stackString;\r\n \t});\r\n \tnewFrames.unshift(errorStack);\r\n \tjsonData.detail = newFrames.join(\"\\n\");\r\n \txhr.send(JSON.stringify(jsonData));\r\n });\r\n }\r\n\r\n // Private methods\r\n\r\n var sendPayload = function (apiKey, logId, callback, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n error = errorLog,\r\n send = 1,\r\n queryParams = getSearchParameters(),\r\n stack = error.error ? ErrorStackParser.parse(error.error) : '';\r\n\r\n // Ignoring error from an external script\r\n if (error && error.colno === 0 && error.lineno === 0 && (!stack || stack === '') && error.message && (error.message === \"Script error.\" || error.message === \"Script error\")) {\r\n\t\t\t if (settings.debug) {\r\n\t\t\t console.log('%c \\u2BC8 Error log: ' + '%c \\uD83D\\uDEC8 Ignoring error from external script ', debugSettings.lightCSS, debugSettings.warningCSS);\r\n\t\t\t }\r\n\t\t\t return;\r\n\t\t\t}\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"detail\": error.error ? error.error.stack : null,\r\n \"title\": error.message || 'Unspecified error',\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"severity\": \"Error\",\r\n \"type\": error.error ? error.error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error.error && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n \t// send message trying to pinpoint stackframes\r\n \tstackGPS(error.error, xhr, jsonData);\r\n\t } else {\r\n\t \t// send message\r\n \txhr.send(JSON.stringify(jsonData));\r\n\t }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendManualPayload = function (apiKey, logId, callback, logType, messageLog, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n type = logType,\r\n error = errorLog,\r\n message = messageLog,\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n if (type !== \"Log\") {\r\n\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": type,\r\n \"type\": error ? error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n } else {\r\n\r\n jsonData = error;\r\n\r\n }\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error && type !== \"Log\" && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n\t \t\t\t\t\t// send message trying to pinpoint stackframes\r\n \t\tstackGPS(error, xhr, jsonData);\r\n\t\t } else {\r\n\t\t \t// send message\r\n\t \txhr.send(JSON.stringify(jsonData));\r\n\t\t }\r\n\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n // Some public methods\r\n\r\n publicAPIs.error = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg);\r\n };\r\n publicAPIs.error = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg, error);\r\n };\r\n\r\n publicAPIs.verbose = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg);\r\n };\r\n publicAPIs.verbose = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg, error);\r\n };\r\n\r\n publicAPIs.debug = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg);\r\n };\r\n publicAPIs.debug = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg, error);\r\n };\r\n\r\n publicAPIs.information = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg);\r\n };\r\n publicAPIs.information = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg, error);\r\n };\r\n\r\n publicAPIs.warning = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg);\r\n };\r\n publicAPIs.warning = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg, error);\r\n };\r\n\r\n publicAPIs.fatal = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg);\r\n };\r\n publicAPIs.fatal = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg, error);\r\n };\r\n\r\n publicAPIs.log = function (obj) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Log', null, obj);\r\n };\r\n\r\n publicAPIs.on = function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx\r\n });\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.emit = function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.init = function (options) {\r\n\r\n // Merge options into defaults\r\n settings = extend(defaults, options || {});\r\n\r\n // Code goes here...\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n\r\n var errorLog = {\r\n 'message': message,\r\n 'source': source,\r\n 'lineno': lineno,\r\n 'colno': colno,\r\n 'error': error\r\n }\r\n\r\n sendPayload(settings.apiKey, settings.logId, confirmResponse, errorLog);\r\n\r\n return false;\r\n }\r\n\r\n };\r\n\r\n // Initialize the plugin\r\n publicAPIs.init(options);\r\n\r\n if (settings.debug) {\r\n console.log('%c' + debugSettings.label, debugSettings.labelCSS);\r\n }\r\n\r\n // Return the public APIs\r\n return publicAPIs;\r\n\r\n };\r\n\r\n\r\n //\r\n // Return the constructor\r\n //\r\n\r\n if (paramsLength && params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n // Immediately-Invoked Function Expression (IIFE)\r\n return new Constructor;\r\n } else {\r\n // UMD Constructor\r\n return Constructor;\r\n }\r\n\r\n});\r\n"],"file":"elmahio.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["elmahio.js"],"sourcesContent":["/*!\r\n * elmah.io Javascript Logger - version 3.0.3\r\n * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io\r\n */\r\n\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define([], function () {\r\n return factory(root);\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory(root);\r\n } else {\r\n root.Elmahio = factory(root);\r\n }\r\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\r\n\r\n 'use strict';\r\n\r\n //\r\n // ==== STACKFRAME ====\r\n //\r\n\r\n var StackFrame = (function () {\r\n \"use strict\";\r\n function _isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n }\r\n function _capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n }\r\n function _getter(p) {\r\n return function () {\r\n return this[p];\r\n };\r\n }\r\n var booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\r\n var numericProps = [\"columnNumber\", \"lineNumber\"];\r\n var stringProps = [\"fileName\", \"functionName\", \"source\"];\r\n var arrayProps = [\"args\"];\r\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\r\n function StackFrame(obj) {\r\n if (obj instanceof Object) {\r\n for (var i = 0; i < props.length; i++) {\r\n if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {\r\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\r\n }\r\n }\r\n }\r\n }\r\n StackFrame.prototype = {\r\n getArgs: function () {\r\n return this.args;\r\n },\r\n setArgs: function (v) {\r\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\r\n throw new TypeError(\"Args must be an Array\");\r\n }\r\n this.args = v;\r\n },\r\n getEvalOrigin: function () {\r\n return this.evalOrigin;\r\n },\r\n setEvalOrigin: function (v) {\r\n if (v instanceof StackFrame) {\r\n this.evalOrigin = v;\r\n } else if (v instanceof Object) {\r\n this.evalOrigin = new StackFrame(v);\r\n } else {\r\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\r\n }\r\n },\r\n toString: function () {\r\n var functionName = this.getFunctionName() || \"{anonymous}\";\r\n var args = \"(\" + (this.getArgs() || []).join(\",\") + \")\";\r\n var fileName = this.getFileName() ? \"@\" + this.getFileName() : \"\";\r\n var lineNumber = _isNumber(this.getLineNumber()) ? \":\" + this.getLineNumber() : \"\";\r\n var columnNumber = _isNumber(this.getColumnNumber()) ? \":\" + this.getColumnNumber() : \"\";\r\n return functionName + args + fileName + lineNumber + columnNumber;\r\n }\r\n };\r\n StackFrame.fromString = function StackFrame$$fromString(str) {\r\n var argsStartIndex = str.indexOf(\"(\");\r\n var argsEndIndex = str.lastIndexOf(\")\");\r\n var functionName = str.substring(0, argsStartIndex);\r\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\r\n var locationString = str.substring(argsEndIndex + 1);\r\n if (locationString.indexOf(\"@\") === 0) {\r\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\r\n var fileName = parts[1];\r\n var lineNumber = parts[2];\r\n var columnNumber = parts[3];\r\n }\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args || undefined,\r\n fileName: fileName,\r\n lineNumber: lineNumber || undefined,\r\n columnNumber: columnNumber || undefined\r\n });\r\n };\r\n for (var i = 0; i < booleanProps.length; i++) {\r\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\r\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = function (p) {\r\n return function (v) {\r\n this[p] = Boolean(v);\r\n };\r\n }(booleanProps[i]);\r\n }\r\n for (var j = 0; j < numericProps.length; j++) {\r\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(numericProps[j]);\r\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = function (p) {\r\n return function (v) {\r\n if (!_isNumber(v)) {\r\n throw new TypeError(p + \" must be a Number\");\r\n }\r\n this[p] = Number(v);\r\n };\r\n }(numericProps[j]);\r\n }\r\n for (var k = 0; k < stringProps.length; k++) {\r\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(stringProps[k]);\r\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = function (p) {\r\n return function (v) {\r\n this[p] = String(v);\r\n };\r\n }(stringProps[k]);\r\n }\r\n return StackFrame;\r\n })();\r\n\r\n //\r\n // ==== ERROR STACK PARSER ====\r\n //\r\n\r\n var ErrorStackParser = (function () {\r\n \"use strict\";\r\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+\\:\\d+/;\r\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m;\r\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code\\])?$/;\r\n return {\r\n /**\r\n * Given an Error object, extract the most information from it.\r\n *\r\n * @param {Error} error object\r\n * @return {Array} of StackFrames\r\n */\r\n parse: function ErrorStackParser$$parse(error) {\r\n if (typeof error.stacktrace !== \"undefined\" || typeof error[\"opera#sourceloc\"] !== \"undefined\") {\r\n return this.parseOpera(error);\r\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\r\n return this.parseV8OrIE(error);\r\n } else if (error.stack) {\r\n return this.parseFFOrSafari(error);\r\n } else {\r\n throw new Error(\"Cannot parse given Error object\");\r\n }\r\n },\r\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\r\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\r\n // Fail-fast but return locations like \"(native)\"\r\n if (urlLike.indexOf(\":\") === -1) {\r\n return [urlLike];\r\n }\r\n var regExp = /(.+?)(?:\\:(\\d+))?(?:\\:(\\d+))?$/;\r\n var parts = regExp.exec(urlLike.replace(/[\\(\\)]/g, \"\"));\r\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\r\n },\r\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(CHROME_IE_STACK_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n if (line.indexOf(\"(eval \") > -1) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g, \"\");\r\n }\r\n var tokens = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").split(/\\s+/).slice(1);\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionName = tokens.join(\" \") || undefined;\r\n var fileName = [\"eval\", \"\"].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: fileName,\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n },\r\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n if (line.indexOf(\" > eval\") > -1) {\r\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g, \":$1\");\r\n }\r\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\r\n // Safari eval frames only have function names and nothing else\r\n return new StackFrame({\r\n functionName: line\r\n });\r\n } else {\r\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\r\n var matches = line.match(functionNameRegex);\r\n var functionName = matches && matches[1] ? matches[1] : undefined;\r\n var locationParts = this.extractLocation(line.replace(functionNameRegex, \"\"));\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }\r\n }, this);\r\n },\r\n parseOpera: function ErrorStackParser$$parseOpera(e) {\r\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\r\n return this.parseOpera9(e);\r\n } else if (!e.stack) {\r\n return this.parseOpera10(e);\r\n } else {\r\n return this.parseOpera11(e);\r\n }\r\n },\r\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\r\n var lines = e.message.split(\"\\n\");\r\n var result = [];\r\n for (var i = 2, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\r\n var lines = e.stacktrace.split(\"\\n\");\r\n var result = [];\r\n for (var i = 0, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n functionName: match[3] || undefined,\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n // Opera 10.65+ Error.stack very similar to FF/Safari\r\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\r\n }, this);\r\n return filtered.map(function (line) {\r\n var tokens = line.split(\"@\");\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionCall = tokens.shift() || \"\";\r\n var functionName = functionCall.replace(//, \"$2\").replace(/\\([^\\)]*\\)/g, \"\") || undefined;\r\n var argsRaw;\r\n if (functionCall.match(/\\(([^\\)]*)\\)/)) {\r\n argsRaw = functionCall.replace(/^[^\\(]+\\(([^\\)]*)\\)$/, \"$1\");\r\n }\r\n var args = argsRaw === undefined || argsRaw === \"[arguments not available]\" ? undefined : argsRaw.split(\",\");\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n }\r\n };\r\n })();\r\n\r\n //\r\n // ==== STACKTRACE-GPS ====\r\n //\r\n\r\n var SourceMap = function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=n,r.p=\"\",r(0)}([function(e,n,r){var t=r(1),o=r(2),i=r(3).ArraySet,a=r(4),s=r(6).quickSort;function u(e){var n=e;return\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\"))),null!=n.sections?new c(n):new l(n)}function l(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sources\"),a=t.getArg(n,\"names\",[]),s=t.getArg(n,\"sourceRoot\",null),u=t.getArg(n,\"sourcesContent\",null),l=t.getArg(n,\"mappings\"),g=t.getArg(n,\"file\",null);if(r!=this._version)throw new Error(\"Unsupported version: \"+r);o=o.map(String).map(t.normalize).map(function(e){return s&&t.isAbsolute(s)&&t.isAbsolute(e)?t.relative(s,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=g}function g(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sections\");if(r!=this._version)throw new Error(\"Unsupported version: \"+r);this._sources=new i,this._names=new i;var a={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=t.getArg(e,\"offset\"),r=t.getArg(n,\"line\"),o=t.getArg(n,\"column\");if(r=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=a.length;p1&&(r.source=d+i[1],d+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+i[3],f=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),L.push(r),\"number\"==typeof r.originalLine&&y.push(r)}s(L,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(y,t.compareByOriginalPositions),this.__originalMappings=y},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[t]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,\"name\",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,\"originalLine\",null),column:t.getArg(o,\"originalColumn\",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\\/\\//,\"\");if(\"file\"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||\"/\"==r.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.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,\"source\");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,\"line\"),originalColumn:t.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(e,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,\"generatedLine\",null),column:t.getArg(i,\"generatedColumn\",null),lastColumn:t.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,c.prototype=Object.create(u.prototype),c.prototype.constructor=u,c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){for(var e=[],n=0;n=0;g--)\".\"===(a=u[g])?u.splice(g,1):\"..\"===a?l++:l>0&&(\"\"===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=s?\"/\":\".\"),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){\"\"===e&&(e=\".\"),\"\"===n&&(n=\".\");var r=o(n),s=o(e);if(s&&(e=s.path||\"/\"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u=\"/\"===n.charAt(0)?n:a(e.replace(/\\/+$/,\"\")+\"/\"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return\"/\"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==n.indexOf(e+\"/\");){var t=e.lastIndexOf(\"/\");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\\/]+:\\/)?\\/*$/))return n;++r}return Array(r+1).join(\"../\")+n.substr(e.length+1)};var s=!(\"__proto__\"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)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 r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?\"$\"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=g(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,g=0;do{if(n>=u)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");n.encode=function(e){if(0<=e&&e= 200 && req.status < 300 || url.substr(0, 7) === \"file://\" && req.responseText) {\r\n resolve(req.responseText);\r\n } else {\r\n reject(new Error(\"HTTP status: \" + req.status + \" retrieving \" + url));\r\n }\r\n }\r\n };\r\n req.send();\r\n });\r\n }\r\n /**\r\n * Convert a Base64-encoded string into its original representation.\r\n * Used for inline sourcemaps.\r\n *\r\n * @param {String} b64str Base-64 encoded string\r\n * @returns {String} original representation of the base64-encoded string.\r\n */\r\n function _atob(b64str) {\r\n if (typeof window !== \"undefined\" && window.atob) {\r\n return window.atob(b64str);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for window.atob in this environment\");\r\n }\r\n }\r\n function _parseJson(string) {\r\n if (typeof JSON !== \"undefined\" && JSON.parse) {\r\n return JSON.parse(string);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for JSON.parse in this environment\");\r\n }\r\n }\r\n function _findFunctionName(source, lineNumber) {\r\n var syntaxes = [ // {name} = function ({args}) TODO args capture\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/, // function {name}({args}) m[1]=name m[2]=args\r\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/, // {name} = eval()\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/, // fn_name() {\r\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/, // {name} = () => {\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/];\r\n var lines = source.split(\"\\n\");\r\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\r\n var code = \"\";\r\n var maxLines = Math.min(lineNumber, 20);\r\n for (var i = 0; i < maxLines; ++i) {\r\n // lineNo is 1-based, source[] is 0-based\r\n var line = lines[lineNumber - i - 1];\r\n var commentPos = line.indexOf(\"//\");\r\n if (commentPos >= 0) {\r\n line = line.substr(0, commentPos);\r\n }\r\n if (line) {\r\n code = line + code;\r\n var len = syntaxes.length;\r\n for (var index = 0; index < len; index++) {\r\n var m = syntaxes[index].exec(code);\r\n if (m && m[1]) {\r\n return m[1];\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n function _ensureSupportedEnvironment() {\r\n if (typeof Object.defineProperty !== \"function\" || typeof Object.create !== \"function\") {\r\n throw new Error(\"Unable to consume source maps in older browsers\");\r\n }\r\n }\r\n function _ensureStackFrameIsLegit(stackframe) {\r\n if (typeof stackframe !== \"object\") {\r\n throw new TypeError(\"Given StackFrame is not an object\");\r\n } else if (typeof stackframe.fileName !== \"string\") {\r\n throw new TypeError(\"Given file name is not a String\");\r\n } else if (typeof stackframe.lineNumber !== \"number\" || stackframe.lineNumber % 1 !== 0 || stackframe.lineNumber < 1) {\r\n throw new TypeError(\"Given line number must be a positive integer\");\r\n } else if (typeof stackframe.columnNumber !== \"number\" || stackframe.columnNumber % 1 !== 0 || stackframe.columnNumber < 0) {\r\n throw new TypeError(\"Given column number must be a non-negative integer\");\r\n }\r\n return true;\r\n }\r\n function _findSourceMappingURL(source) {\r\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\r\n var lastSourceMappingUrl;\r\n var matchSourceMappingUrl;\r\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\r\n // jshint ignore:line\r\n lastSourceMappingUrl = matchSourceMappingUrl[1];\r\n }\r\n if (lastSourceMappingUrl) {\r\n return lastSourceMappingUrl;\r\n } else {\r\n throw new Error(\"sourceMappingURL not found\");\r\n }\r\n }\r\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\r\n return new Promise(function (resolve, reject) {\r\n var loc = sourceMapConsumer.originalPositionFor({\r\n line: stackframe.lineNumber,\r\n column: stackframe.columnNumber\r\n });\r\n if (loc.source) {\r\n // cache mapped sources\r\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\r\n if (mappedSource) {\r\n sourceCache[loc.source] = mappedSource;\r\n }\r\n resolve(// given stackframe and source location, update stackframe\r\n new StackFrame({\r\n functionName: loc.name || stackframe.functionName,\r\n args: stackframe.args,\r\n fileName: loc.source,\r\n lineNumber: loc.line,\r\n columnNumber: loc.column\r\n }));\r\n } else {\r\n reject(new Error(\"Could not get original source for given stackframe and source map\"));\r\n }\r\n });\r\n }\r\n /**\r\n * @constructor\r\n * @param {Object} opts\r\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\r\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\r\n * opts.offline = True to prevent network requests.\r\n * Best effort without sources or source maps.\r\n * opts.ajax = Promise returning function to make X-Domain requests\r\n */\r\n return function StackTraceGPS(opts) {\r\n if (!(this instanceof StackTraceGPS)) {\r\n return new StackTraceGPS(opts);\r\n }\r\n opts = opts || {};\r\n this.sourceCache = opts.sourceCache || {};\r\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\r\n this.ajax = opts.ajax || _xdr;\r\n this._atob = opts.atob || _atob;\r\n\r\n this._get = function _get(location) {\r\n return new Promise(function (resolve, reject) {\r\n var isDataUrl = location.substr(0, 5) === \"data:\";\r\n if (this.sourceCache[location]) {\r\n resolve(this.sourceCache[location]);\r\n } else if (opts.offline && !isDataUrl) {\r\n reject(new Error(\"Cannot make network requests in offline mode\"));\r\n } else {\r\n if (isDataUrl) {\r\n // data URLs can have parameters.\r\n // see http://tools.ietf.org/html/rfc2397\r\n var supportedEncodingRegexp = /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\r\n var match = location.match(supportedEncodingRegexp);\r\n if (match) {\r\n var sourceMapStart = match[0].length;\r\n var encodedSource = location.substr(sourceMapStart);\r\n var source = this._atob(encodedSource);\r\n this.sourceCache[location] = source;\r\n resolve(source);\r\n } else {\r\n reject(new Error(\"The encoding of the inline sourcemap is not supported\"));\r\n }\r\n } else {\r\n var xhrPromise = this.ajax(location, {\r\n method: \"get\"\r\n });\r\n // Cache the Promise to prevent duplicate in-flight requests\r\n this.sourceCache[location] = xhrPromise;\r\n xhrPromise.then(resolve, reject);\r\n }\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\r\n * SourceMapConsumer in a per-instance cache.\r\n *\r\n * @param {String} sourceMappingURL = URL to fetch source map from\r\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\r\n * @returns {Promise} that resolves a SourceMapConsumer\r\n */\r\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\r\n return new Promise(function (resolve, reject) {\r\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\r\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\r\n } else {\r\n var sourceMapConsumerPromise = new Promise(function (resolve, reject) {\r\n return this._get(sourceMappingURL).then(function (sourceMapSource) {\r\n if (typeof sourceMapSource === \"string\") {\r\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, \"\"));\r\n }\r\n if (typeof sourceMapSource.sourceRoot === \"undefined\") {\r\n sourceMapSource.sourceRoot = defaultSourceRoot;\r\n }\r\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\r\n }, reject);\r\n }.bind(this));\r\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\r\n resolve(sourceMapConsumerPromise);\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, enhance function name and use source maps for a\r\n * better StackFrame.\r\n *\r\n * @param {StackFrame} stackframe object\r\n * @returns {Promise} that resolves with with source-mapped StackFrame\r\n */\r\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n this.getMappedLocation(stackframe).then(function (mappedStackFrame) {\r\n function resolveMappedStackFrame() {\r\n resolve(mappedStackFrame);\r\n }\r\n this.findFunctionName(mappedStackFrame).then(resolve, resolveMappedStackFrame)[\"catch\"](resolveMappedStackFrame);\r\n }.bind(this), reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, guess function name from location information.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureStackFrameIsLegit(stackframe);\r\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\r\n var lineNumber = stackframe.lineNumber;\r\n var columnNumber = stackframe.columnNumber;\r\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\r\n // Only replace functionName if we found something\r\n if (guessedFunctionName) {\r\n resolve(new StackFrame({\r\n functionName: guessedFunctionName,\r\n args: stackframe.args,\r\n fileName: stackframe.fileName,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber\r\n }));\r\n } else {\r\n resolve(stackframe);\r\n }\r\n }, reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureSupportedEnvironment();\r\n _ensureStackFrameIsLegit(stackframe);\r\n var sourceCache = this.sourceCache;\r\n var fileName = stackframe.fileName;\r\n this._get(fileName).then(function (source) {\r\n var sourceMappingURL = _findSourceMappingURL(source);\r\n var isDataUrl = sourceMappingURL.substr(0, 5) === \"data:\";\r\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf(\"/\") + 1);\r\n if (sourceMappingURL[0] !== \"/\" && !isDataUrl && !/^https?:\\/\\/|^\\/\\//i.test(sourceMappingURL)) {\r\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\r\n }\r\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot).then(function (sourceMapConsumer) {\r\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache).then(resolve)[\"catch\"](function () {\r\n resolve(stackframe);\r\n });\r\n });\r\n }.bind(this), reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n };\r\n })(SourceMap, StackFrame);\r\n\r\n //\r\n // Shared Variables\r\n //\r\n\r\n var scriptFile = document.getElementsByTagName('script');\r\n var scriptIndex = scriptFile.length - 1;\r\n var myScript = scriptFile[scriptIndex];\r\n var queryString = myScript.src.replace(/^[^\\?]+\\??/, '');\r\n var params = parseQuery(queryString);\r\n var paramsLength = objectLength(params);\r\n\r\n var debugSettings = {\r\n label: ' elmah.io debugger : On ',\r\n labelCSS: 'background: #06a89c; color: #ffffff; display: inline-block; font-size: 14px;',\r\n successCSS: 'background: #d4edda; color: #155724; display: inline-block; font-size: 13px;',\r\n errorCSS: 'background: #f8d7da; color: #721c24; display: inline-block; font-size: 13px;',\r\n warningCSS: 'background: #fff3cd; color: #856404; display: inline-block; font-size: 13px;',\r\n lightCSS: 'background: #e2e3e5; color: #383d41; display: inline-block; font-size: 13px;'\r\n };\r\n\r\n var defaults = {\r\n apiKey: null,\r\n logId: null,\r\n debug: false,\r\n application: null,\r\n filter: null\r\n };\r\n\r\n //\r\n // Shared Methods\r\n //\r\n\r\n var extend = function () {\r\n\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n\r\n // Check if a deep merge\r\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\r\n deep = arguments[0];\r\n i++;\r\n }\r\n\r\n // Merge the object into the extended object\r\n var merge = function (obj) {\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If property is an object, merge properties\r\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\r\n extended[prop] = extend(extended[prop], obj[prop]);\r\n } else {\r\n extended[prop] = obj[prop];\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Loop through each object and conduct a merge\r\n for (; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n merge(obj);\r\n }\r\n\r\n return extended;\r\n\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n function parseQuery(query) {\r\n var Params = new Object();\r\n if (!query) return Params; // return empty object\r\n var Pairs = query.split(/[;&]/);\r\n for (var i = 0; i < Pairs.length; i++) {\r\n var KeyVal = Pairs[i].split('=');\r\n if (!KeyVal || KeyVal.length !== 2) continue;\r\n var key = unescape(KeyVal[0]);\r\n var val = unescape(KeyVal[1]);\r\n val = val.replace(/\\+/g, ' ');\r\n Params[key] = val;\r\n }\r\n return Params;\r\n }\r\n\r\n function objectLength(obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n };\r\n\r\n function getSearchParameters() {\r\n var prmstr = window.location.search.substr(1);\r\n return prmstr !== null && prmstr !== \"\" ? transformToAssocArray(prmstr) : {};\r\n }\r\n\r\n function transformToAssocArray(prmstr) {\r\n var params = [];\r\n var prmarr = prmstr.split(\"&\");\r\n for (var i = 0; i < prmarr.length; i++) {\r\n var tmparr = prmarr[i].split(\"=\");\r\n params.push({\r\n 'key': tmparr[0],\r\n 'value': tmparr[1]\r\n });\r\n }\r\n return params;\r\n }\r\n\r\n function merge_objects(obj1, obj2) {\r\n var obj3 = {};\r\n for (var attrname1 in obj1) {\r\n obj3[attrname1] = obj1[attrname1];\r\n }\r\n for (var attrname2 in obj2) {\r\n obj3[attrname2] = obj2[attrname2];\r\n }\r\n\r\n return obj3;\r\n }\r\n\r\n //\r\n // Constructor\r\n // Can be named anything you want\r\n //\r\n\r\n var Constructor = function (options) {\r\n\r\n //\r\n // Unique Variables\r\n //\r\n\r\n var publicAPIs = {};\r\n var settings;\r\n\r\n function getPayload() {\r\n var payload = {\r\n \"url\": document.location.pathname || '/',\r\n \"application\": settings.application\r\n };\r\n\r\n var payload_data = [];\r\n\r\n if (document.documentMode) payload_data.push({ \"key\": \"Document-Mode\", \"value\": document.documentMode });\r\n if (window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth) payload_data.push({ \"key\": \"Browser-Width\", \"value\": window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth });\r\n if (window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight) payload_data.push({ \"key\": \"Browser-Height\", \"value\": window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight });\r\n if ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type) !== undefined) payload_data.push({ \"key\": \"Screen-Orientation\", \"value\": ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type).split(\"-\"))[0] });\r\n if (screen.width) payload_data.push({ \"key\": \"Screen-Width\", \"value\": screen.width });\r\n if (screen.height) payload_data.push({ \"key\": \"Screen-Height\", \"value\": screen.height });\r\n if (screen.colorDepth) payload_data.push({ \"key\": \"Color-Depth\", \"value\": screen.colorDepth });\r\n payload_data.push({ \"key\": \"X-ELMAHIO-SEARCH-isClientside\", \"value\": \"true\" });\r\n\r\n payload.data = payload_data;\r\n\r\n var payload_serverVariables = [];\r\n if (navigator.language) payload_serverVariables.push({ \"key\": \"User-Language\", \"value\": navigator.language });\r\n if (navigator.userAgent) payload_serverVariables.push({ \"key\": \"User-Agent\", \"value\": navigator.userAgent });\r\n if (document.referrer) payload_serverVariables.push({ \"key\": \"Referer\", \"value\": document.referrer });\r\n if (document.location.protocol === \"https:\") payload_serverVariables.push({ \"key\": \"HTTPS\", \"value\": 'on' });\r\n if (document.location.hostname) payload_serverVariables.push({ \"key\": \"Host\", \"value\": document.location.hostname });\r\n\r\n payload.serverVariables = payload_serverVariables;\r\n\r\n return payload;\r\n }\r\n\r\n function confirmResponse(status, response) {\r\n if (settings.debug) {\r\n if (status === 'error') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n } else if (status === 'success') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2714 ' + response + ' at ' + new Date().toLocaleString() + ' ', debugSettings.lightCSS, debugSettings.successCSS);\r\n } else {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created. Title should not be undefined, null or empty ! ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n }\r\n }\r\n }\r\n\r\n function stackGPS(error, xhr, jsonData) {\r\n \tvar errorStack = error.toString().split(\"\\n\")[0];\r\n \tvar gps = new StackTraceGPS();\r\n var promise = new Promise(function(resolve) {\r\n\t var stackframes = ErrorStackParser.parse(error);\r\n\t resolve(Promise.all(stackframes.map(function(sf) {\r\n\t return new Promise(function(resolve) {\r\n\t function resolveOriginal() {\r\n\t resolve(sf);\r\n\t }\r\n\t gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\r\n\t });\r\n\t })));\r\n \t}\r\n );\r\n\r\n promise.then(function(newFrames){\r\n \tnewFrames.forEach(function(stackFrame, i){\r\n\t\t\t\t\tif(stackFrame.functionName) {\r\n \t\t\tvar fn = stackFrame.functionName + ' ';\r\n \t\t} else {\r\n \t\t\tvar fn = '';\r\n \t\t}\r\n \t\tvar stackString = ' at ' + fn + '(' + stackFrame.fileName + ':' + stackFrame.lineNumber + ':' + stackFrame.columnNumber + ')';\r\n \t\tnewFrames[i] = stackString;\r\n \t});\r\n \tnewFrames.unshift(errorStack);\r\n \tjsonData.detail = newFrames.join(\"\\n\");\r\n \txhr.send(JSON.stringify(jsonData));\r\n });\r\n }\r\n\r\n // Private methods\r\n\r\n var sendPayload = function (apiKey, logId, callback, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n error = errorLog,\r\n send = 1,\r\n queryParams = getSearchParameters(),\r\n stack = error.error ? ErrorStackParser.parse(error.error) : '';\r\n\r\n // Ignoring error from an external script\r\n if (error && error.colno === 0 && error.lineno === 0 && (!stack || stack === '') && error.message && (error.message === \"Script error.\" || error.message === \"Script error\")) {\r\n\t\t\t if (settings.debug) {\r\n\t\t\t console.log('%c \\u2BC8 Error log: ' + '%c \\uD83D\\uDEC8 Ignoring error from external script ', debugSettings.lightCSS, debugSettings.warningCSS);\r\n\t\t\t }\r\n\t\t\t return;\r\n\t\t\t}\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"detail\": error.error ? error.error.stack : null,\r\n \"title\": error.message || 'Unspecified error',\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"severity\": \"Error\",\r\n \"type\": error.error ? error.error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error.error && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n \t// send message trying to pinpoint stackframes\r\n \tstackGPS(error.error, xhr, jsonData);\r\n\t } else {\r\n\t \t// send message\r\n \txhr.send(JSON.stringify(jsonData));\r\n\t }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendManualPayload = function (apiKey, logId, callback, logType, messageLog, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n type = logType,\r\n error = errorLog,\r\n message = messageLog,\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n if (type !== \"Log\") {\r\n\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": type,\r\n \"type\": error ? error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n } else {\r\n\r\n jsonData = error;\r\n\r\n }\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error && type !== \"Log\" && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n\t \t\t\t\t\t// send message trying to pinpoint stackframes\r\n \t\tstackGPS(error, xhr, jsonData);\r\n\t\t } else {\r\n\t\t \t// send message\r\n\t \txhr.send(JSON.stringify(jsonData));\r\n\t\t }\r\n\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n // Some public methods\r\n\r\n publicAPIs.error = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg);\r\n };\r\n publicAPIs.error = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg, error);\r\n };\r\n\r\n publicAPIs.verbose = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg);\r\n };\r\n publicAPIs.verbose = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg, error);\r\n };\r\n\r\n publicAPIs.debug = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg);\r\n };\r\n publicAPIs.debug = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg, error);\r\n };\r\n\r\n publicAPIs.information = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg);\r\n };\r\n publicAPIs.information = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg, error);\r\n };\r\n\r\n publicAPIs.warning = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg);\r\n };\r\n publicAPIs.warning = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg, error);\r\n };\r\n\r\n publicAPIs.fatal = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg);\r\n };\r\n publicAPIs.fatal = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg, error);\r\n };\r\n\r\n publicAPIs.log = function (obj) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Log', null, obj);\r\n };\r\n\r\n publicAPIs.on = function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx\r\n });\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.emit = function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.init = function (options) {\r\n\r\n // Merge options into defaults\r\n settings = extend(defaults, options || {});\r\n\r\n // Code goes here...\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n\r\n var errorLog = {\r\n 'message': message,\r\n 'source': source,\r\n 'lineno': lineno,\r\n 'colno': colno,\r\n 'error': error\r\n }\r\n\r\n sendPayload(settings.apiKey, settings.logId, confirmResponse, errorLog);\r\n\r\n return false;\r\n }\r\n\r\n };\r\n\r\n // Initialize the plugin\r\n publicAPIs.init(options);\r\n\r\n if (settings.debug) {\r\n console.log('%c' + debugSettings.label, debugSettings.labelCSS);\r\n }\r\n\r\n // Return the public APIs\r\n return publicAPIs;\r\n\r\n };\r\n\r\n\r\n //\r\n // Return the constructor\r\n //\r\n\r\n if (paramsLength && params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n // Immediately-Invoked Function Expression (IIFE)\r\n return new Constructor;\r\n } else {\r\n // UMD Constructor\r\n return Constructor;\r\n }\r\n\r\n});\r\n"],"file":"elmahio.js"} \ No newline at end of file diff --git a/dist/elmahio.min.js b/dist/elmahio.min.js index 02d62a9..cb0d7ab 100644 --- a/dist/elmahio.min.js +++ b/dist/elmahio.min.js @@ -1,5 +1,5 @@ /*! - * elmah.io Javascript Logger - version 3.0.1 + * elmah.io Javascript Logger - version 3.0.3 * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io */ !function(e,n){"function"==typeof define&&define.amd?define([],function(){return n(e)}):"object"==typeof exports?module.exports=n(e):e.Elmahio=n(e)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,function(e){"use strict";var n,r,t,o=function(){function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function n(e){return e.charAt(0).toUpperCase()+e.substring(1)}function r(e){return function(){return this[e]}}var t=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],a=t.concat(o,i,["args"]);function s(e){if(e instanceof Object)for(var r=0;r-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),t=n.join(" ")||void 0,i=["eval",""].indexOf(r[0])>-1?void 0:r[0];return new o({functionName:t,fileName:i,lineNumber:r[1],columnNumber:r[2],source:e})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(t)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new o({functionName:e});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(n),t=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(n,""));return new o({functionName:t,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),t=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new o({functionName:a,args:s,fileName:t[0],lineNumber:t[1],columnNumber:t[2],source:e})},this)}}),a=function(n,r){function t(e){return new Promise(function(n,r){var t=new XMLHttpRequest;t.open("get",e),t.onerror=r,t.onreadystatechange=function(){4===t.readyState&&(t.status>=200&&t.status<300||"file://"===e.substr(0,7)&&t.responseText?n(t.responseText):r(new Error("HTTP status: "+t.status+" retrieving "+e)))},t.send()})}function o(n){if(void 0!==e&&e.atob)return e.atob(n);throw new Error("You must supply a polyfill for window.atob in this environment")}function i(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}return function e(a){if(!(this instanceof e))return new e(a);a=a||{},this.sourceCache=a.sourceCache||{},this.sourceMapConsumerCache=a.sourceMapConsumerCache||{},this.ajax=a.ajax||t,this._atob=a.atob||o,this._get=function(e){return new Promise(function(n,r){var t="data:"===e.substr(0,5);if(this.sourceCache[e])n(this.sourceCache[e]);else if(a.offline&&!t)r(new Error("Cannot make network requests in offline mode"));else if(t){var o=e.match(/^data:application\/json;([\w=:"-]+;)*base64,/);if(o){var i=o[0].length,s=e.substr(i),u=this._atob(s);this.sourceCache[e]=u,n(u)}else r(new Error("The encoding of the inline sourcemap is not supported"))}else{var l=this.ajax(e,{method:"get"});this.sourceCache[e]=l,l.then(n,r)}}.bind(this))},this._getSourceMapConsumer=function(e,r){return new Promise(function(t,o){if(this.sourceMapConsumerCache[e])t(this.sourceMapConsumerCache[e]);else{var i=new Promise(function(t,o){return this._get(e).then(function(e){"string"==typeof e&&(e=function(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")}(e.replace(/^\)\]\}'/,""))),void 0===e.sourceRoot&&(e.sourceRoot=r),t(new n.SourceMapConsumer(e))},o)}.bind(this));this.sourceMapConsumerCache[e]=i,t(i)}}.bind(this))},this.pinpoint=function(e){return new Promise(function(n,r){this.getMappedLocation(e).then(function(e){function r(){n(e)}this.findFunctionName(e).then(n,r).catch(r)}.bind(this),r)}.bind(this))},this.findFunctionName=function(e){return new Promise(function(n,t){i(e),this._get(e.fileName).then(function(t){var o=e.lineNumber,i=e.columnNumber,a=function(e,n){for(var r=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],t=e.split("\n"),o="",i=Math.min(n,20),a=0;a=0&&(s=s.substr(0,u)),s){o=s+o;for(var l=r.length,c=0;c=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],g=n.__originalMappings=[],p=0,f=a.length;p1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=h+i[3],h=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),O.push(r),"number"==typeof r.originalLine&&w.push(r)}s(O,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=O,s(w,t.compareByOriginalPositions),this.__originalMappings=w},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,"originalLine",null),column:t.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e})},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||"/"==r.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.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,"source");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,"line"),originalColumn:t.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,"generatedLine",null),column:t.getArg(i,"generatedColumn",null),lastColumn:t.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,g.prototype=Object.create(u.prototype),g.prototype.constructor=u,g.prototype._version=3,Object.defineProperty(g.prototype,"sources",{get:function(){for(var e=[],n=0;n=0;c--)"."===(a=u[c])?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(r=u.join("/"))&&(r=s?"/":"."),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){""===e&&(e="."),""===n&&(n=".");var r=o(n),s=o(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u="/"===n.charAt(0)?n:a(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)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 r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function c(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?"$"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=c(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:c(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,c=0;do{if(n>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e0?C[0].fileName:null,detail:y?y.stack:null,severity:v,type:y?y.name:null,queryString:JSON.parse(JSON.stringify(w))};S=h(S,o())}else S=y;null!==r.filter&&r.filter(S)&&(b=0),1===b&&(S.title?(t.emit("message",S),y&&"Log"!==v&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?m(y,O,S):O.send(JSON.stringify(S))):a("missing-title",O.statusText))};return t.error=function(e){d(r.apiKey,r.logId,s,"Error",e)},t.error=function(e,n){d(r.apiKey,r.logId,s,"Error",e,n)},t.verbose=function(e){d(r.apiKey,r.logId,s,"Verbose",e)},t.verbose=function(e,n){d(r.apiKey,r.logId,s,"Verbose",e,n)},t.debug=function(e){d(r.apiKey,r.logId,s,"Debug",e)},t.debug=function(e,n){d(r.apiKey,r.logId,s,"Debug",e,n)},t.information=function(e){d(r.apiKey,r.logId,s,"Information",e)},t.information=function(e,n){d(r.apiKey,r.logId,s,"Information",e,n)},t.warning=function(e){d(r.apiKey,r.logId,s,"Warning",e)},t.warning=function(e,n){d(r.apiKey,r.logId,s,"Warning",e,n)},t.fatal=function(e){d(r.apiKey,r.logId,s,"Fatal",e)},t.fatal=function(e,n){d(r.apiKey,r.logId,s,"Fatal",e,n)},t.log=function(e){d(r.apiKey,r.logId,s,"Log",null,e)},t.on=function(e,n,r){var t=this.e||(this.e={});return(t[e]||(t[e]=[])).push({fn:n,ctx:r}),this},t.emit=function(e){for(var n=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),t=0,o=r.length;t0?_[0].fileName:null,severity:"Error",type:d.error?d.error.name:null,queryString:JSON.parse(JSON.stringify(y))};w=h(w,o()),null!==r.filter&&r.filter(w)&&(v=0),1===v&&(t.emit("message",w),d.error&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?m(d.error,b,w):b.send(JSON.stringify(w)))}else r.debug&&console.log("%c ⯈ Error log: %c 🛈 Ignoring error from external script ",c.lightCSS,c.warningCSS)}(r.apiKey,r.logId,s,d),!1}},t.init(n),r.debug&&console.log("%c"+c.label,c.labelCSS),t};return l&&u.hasOwnProperty("apiKey")&&u.hasOwnProperty("logId")?new m:m}); diff --git a/dist/elmahio.min.js.map b/dist/elmahio.min.js.map index 5886c66..3832213 100644 --- a/dist/elmahio.min.js.map +++ b/dist/elmahio.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["elmahio.js"],"names":["root","factory","define","amd","exports","module","Elmahio","global","window","this","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","StackFrame","_isNumber","n","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","props","concat","obj","Object","i","length","hasOwnProperty","undefined","prototype","getArgs","args","setArgs","v","toString","call","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFunctionName","join","getFileName","getLineNumber","getColumnNumber","fromString","argsStartIndex","indexOf","argsEndIndex","lastIndexOf","functionName","split","locationString","parts","exec","fileName","lineNumber","columnNumber","Boolean","j","Number","k","String","ErrorStackParser","parse","error","stacktrace","parseOpera","stack","match","parseV8OrIE","parseFFOrSafari","Error","extractLocation","urlLike","replace","filter","line","map","tokens","slice","locationParts","pop","source","functionNameRegex","matches","e","message","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","result","len","push","argsRaw","functionCall","shift","StackTraceGPS","SourceMap","_xdr","url","Promise","resolve","reject","req","XMLHttpRequest","open","onerror","onreadystatechange","readyState","status","substr","responseText","send","_atob","b64str","atob","_ensureStackFrameIsLegit","stackframe","opts","sourceCache","sourceMapConsumerCache","ajax","_get","location","isDataUrl","offline","sourceMapStart","encodedSource","xhrPromise","method","then","bind","_getSourceMapConsumer","sourceMappingURL","defaultSourceRoot","sourceMapConsumerPromise","sourceMapSource","string","JSON","_parseJson","sourceRoot","SourceMapConsumer","pinpoint","getMappedLocation","mappedStackFrame","resolveMappedStackFrame","findFunctionName","guessedFunctionName","syntaxes","code","maxLines","Math","min","commentPos","index","m","_findFunctionName","defineProperty","create","_ensureSupportedEnvironment","lastSourceMappingUrl","matchSourceMappingUrl","sourceMappingUrlRegExp","_findSourceMappingURL","test","sourceMapConsumer","loc","originalPositionFor","column","mappedSource","sourceContentFor","name","_extractLocationInfoFromSourceMapSource","r","t","o","id","loaded","c","ArraySet","a","s","quickSort","u","sections","l","getArg","g","_version","normalize","isAbsolute","relative","_names","fromArray","_sources","sourcesContent","_mappings","file","generatedLine","generatedColumn","originalLine","originalColumn","_sections","generatedOffset","consumer","fromSourceMap","__generatedMappings","get","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","eachMapping","_generatedMappings","_originalMappings","at","forEach","allGeneratedPositionsFor","has","_findMapping","compareByOriginalPositions","lastColumn","toArray","_sourceRoot","_generateSourcesContent","_file","h","f","d","_","C","A","y","L","decode","value","rest","compareByGeneratedPositionsDeflated","search","computeColumnSpans","lastGeneratedColumn","hasContentsOfAllSources","size","some","urlParse","scheme","path","generatedPositionFor","BasicSourceMapConsumer","constructor","sources","bias","every","add","IndexedSourceMapConsumer","arguments","auth","host","port","splice","urlGenerate","Array","charCodeAt","toSetString","fromSetString","compareByGeneratedPositionsInflated","floor","_array","_set","getOwnPropertyNames","encode","round","random","scriptFile","document","getElementsByTagName","params","query","Params","Pairs","KeyVal","key","unescape","val","parseQuery","src","paramsLength","objectLength","debugSettings","label","labelCSS","successCSS","errorCSS","warningCSS","lightCSS","defaults","apiKey","logId","debug","application","extend","extended","deep","merge","prop","getSearchParameters","prmstr","prmarr","tmparr","transformToAssocArray","merge_objects","obj1","obj2","obj3","attrname1","attrname2","Constructor","options","settings","publicAPIs","getPayload","payload","pathname","payload_data","documentMode","innerWidth","documentElement","clientWidth","innerHeight","clientHeight","screen","msOrientation","orientation","mozOrientation","type","width","height","colorDepth","data","payload_serverVariables","navigator","language","userAgent","referrer","protocol","hostname","serverVariables","confirmResponse","response","console","log","Date","toLocaleString","stackGPS","xhr","jsonData","errorStack","gps","stackframes","all","sf","resolveOriginal","newFrames","stackFrame","fn","stackString","unshift","detail","stringify","sendManualPayload","callback","logType","messageLog","errorLog","api_key","log_id","queryParams","setRequestHeader","onload","statusText","emit","title","severity","queryString","msg","verbose","information","warning","fatal","on","ctx","evtArr","apply","init","lineno","colno","sendPayload"],"mappings":";;;;CAIA,SAAUA,EAAMC,GACQ,mBAAXC,QAAyBA,OAAOC,IACzCD,OAAO,GAAI,WACT,OAAOD,EAAQD,KAEW,iBAAZI,QAChBC,OAAOD,QAAUH,EAAQD,GAEzBA,EAAKM,QAAUL,EAAQD,GAR3B,CAUqB,oBAAXO,OAAyBA,OAA2B,oBAAXC,OAAyBA,OAASC,KAAM,SAASD,GAClG,aACA,IAiHME,EACAC,EACAC,EAnHFC,EAAa,WAGf,SAASC,EAAUC,GACjB,OAAQC,MAAMC,WAAWF,KAAOG,SAASH,GAG3C,SAASI,EAAYC,GACnB,OAAOA,EAAIC,OAAO,GAAGC,cAAgBF,EAAIG,UAAU,GAGrD,SAASC,EAAQC,GACf,OAAO,WACL,OAAOhB,KAAKgB,IAGhB,IAAIC,EAAe,CAAC,gBAAiB,SAAU,WAAY,cACvDC,EAAe,CAAC,eAAgB,cAChCC,EAAc,CAAC,WAAY,eAAgB,UAE3CC,EAAQH,EAAaI,OAAOH,EAAcC,EAD7B,CAAC,SAGlB,SAASf,EAAWkB,GAClB,GAAIA,aAAeC,OACjB,IAAK,IAAIC,EAAI,EAAGA,EAAIJ,EAAMK,OAAQD,IAC5BF,EAAII,eAAeN,EAAMI,UAAyBG,IAAlBL,EAAIF,EAAMI,KAC5CxB,KAAK,MAAQU,EAAYU,EAAMI,KAAKF,EAAIF,EAAMI,KAKtDpB,EAAWwB,UAAY,CACrBC,QAAS,WACP,OAAO7B,KAAK8B,MAEdC,QAAS,SAASC,GAChB,GAA0C,mBAAtCT,OAAOK,UAAUK,SAASC,KAAKF,GACjC,MAA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0B,KAAKyO,UAAUb,UA3CxBrC,EAASpB,OACXmD,QAAQC,IAAI,6DAAkF9D,EAAcM,SAAUN,EAAcK,YAkLtIuG,CAAY9E,EAAStB,OAAQsB,EAASrB,MAAOkD,EAAiB0B,IACvD,IAGXtD,EAAW0E,KAAK5E,GACZC,EAASpB,OACXmD,QAAQC,IAAI,KAAO9D,EAAcC,MAAOD,EAAcE,UAEjD6B,GAET,OAAIjC,GAAgBV,EAAO/P,eAAe,WAAa+P,EAAO/P,eAAe,SACpE,IAAIuS,EAEJA","sourcesContent":["/*!\r\n * elmah.io Javascript Logger - version 3.0.1\r\n * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io\r\n */\r\n\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define([], function () {\r\n return factory(root);\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory(root);\r\n } else {\r\n root.Elmahio = factory(root);\r\n }\r\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\r\n\r\n 'use strict';\r\n\r\n //\r\n // ==== STACKFRAME ====\r\n //\r\n\r\n var StackFrame = (function () {\r\n \"use strict\";\r\n function _isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n }\r\n function _capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n }\r\n function _getter(p) {\r\n return function () {\r\n return this[p];\r\n };\r\n }\r\n var booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\r\n var numericProps = [\"columnNumber\", \"lineNumber\"];\r\n var stringProps = [\"fileName\", \"functionName\", \"source\"];\r\n var arrayProps = [\"args\"];\r\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\r\n function StackFrame(obj) {\r\n if (obj instanceof Object) {\r\n for (var i = 0; i < props.length; i++) {\r\n if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {\r\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\r\n }\r\n }\r\n }\r\n }\r\n StackFrame.prototype = {\r\n getArgs: function () {\r\n return this.args;\r\n },\r\n setArgs: function (v) {\r\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\r\n throw new TypeError(\"Args must be an Array\");\r\n }\r\n this.args = v;\r\n },\r\n getEvalOrigin: function () {\r\n return this.evalOrigin;\r\n },\r\n setEvalOrigin: function (v) {\r\n if (v instanceof StackFrame) {\r\n this.evalOrigin = v;\r\n } else if (v instanceof Object) {\r\n this.evalOrigin = new StackFrame(v);\r\n } else {\r\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\r\n }\r\n },\r\n toString: function () {\r\n var functionName = this.getFunctionName() || \"{anonymous}\";\r\n var args = \"(\" + (this.getArgs() || []).join(\",\") + \")\";\r\n var fileName = this.getFileName() ? \"@\" + this.getFileName() : \"\";\r\n var lineNumber = _isNumber(this.getLineNumber()) ? \":\" + this.getLineNumber() : \"\";\r\n var columnNumber = _isNumber(this.getColumnNumber()) ? \":\" + this.getColumnNumber() : \"\";\r\n return functionName + args + fileName + lineNumber + columnNumber;\r\n }\r\n };\r\n StackFrame.fromString = function StackFrame$$fromString(str) {\r\n var argsStartIndex = str.indexOf(\"(\");\r\n var argsEndIndex = str.lastIndexOf(\")\");\r\n var functionName = str.substring(0, argsStartIndex);\r\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\r\n var locationString = str.substring(argsEndIndex + 1);\r\n if (locationString.indexOf(\"@\") === 0) {\r\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\r\n var fileName = parts[1];\r\n var lineNumber = parts[2];\r\n var columnNumber = parts[3];\r\n }\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args || undefined,\r\n fileName: fileName,\r\n lineNumber: lineNumber || undefined,\r\n columnNumber: columnNumber || undefined\r\n });\r\n };\r\n for (var i = 0; i < booleanProps.length; i++) {\r\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\r\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = function (p) {\r\n return function (v) {\r\n this[p] = Boolean(v);\r\n };\r\n }(booleanProps[i]);\r\n }\r\n for (var j = 0; j < numericProps.length; j++) {\r\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(numericProps[j]);\r\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = function (p) {\r\n return function (v) {\r\n if (!_isNumber(v)) {\r\n throw new TypeError(p + \" must be a Number\");\r\n }\r\n this[p] = Number(v);\r\n };\r\n }(numericProps[j]);\r\n }\r\n for (var k = 0; k < stringProps.length; k++) {\r\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(stringProps[k]);\r\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = function (p) {\r\n return function (v) {\r\n this[p] = String(v);\r\n };\r\n }(stringProps[k]);\r\n }\r\n return StackFrame;\r\n })();\r\n\r\n //\r\n // ==== ERROR STACK PARSER ====\r\n //\r\n\r\n var ErrorStackParser = (function () {\r\n \"use strict\";\r\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+\\:\\d+/;\r\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m;\r\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code\\])?$/;\r\n return {\r\n /**\r\n * Given an Error object, extract the most information from it.\r\n *\r\n * @param {Error} error object\r\n * @return {Array} of StackFrames\r\n */\r\n parse: function ErrorStackParser$$parse(error) {\r\n if (typeof error.stacktrace !== \"undefined\" || typeof error[\"opera#sourceloc\"] !== \"undefined\") {\r\n return this.parseOpera(error);\r\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\r\n return this.parseV8OrIE(error);\r\n } else if (error.stack) {\r\n return this.parseFFOrSafari(error);\r\n } else {\r\n throw new Error(\"Cannot parse given Error object\");\r\n }\r\n },\r\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\r\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\r\n // Fail-fast but return locations like \"(native)\"\r\n if (urlLike.indexOf(\":\") === -1) {\r\n return [urlLike];\r\n }\r\n var regExp = /(.+?)(?:\\:(\\d+))?(?:\\:(\\d+))?$/;\r\n var parts = regExp.exec(urlLike.replace(/[\\(\\)]/g, \"\"));\r\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\r\n },\r\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(CHROME_IE_STACK_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n if (line.indexOf(\"(eval \") > -1) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g, \"\");\r\n }\r\n var tokens = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").split(/\\s+/).slice(1);\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionName = tokens.join(\" \") || undefined;\r\n var fileName = [\"eval\", \"\"].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: fileName,\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n },\r\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n if (line.indexOf(\" > eval\") > -1) {\r\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g, \":$1\");\r\n }\r\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\r\n // Safari eval frames only have function names and nothing else\r\n return new StackFrame({\r\n functionName: line\r\n });\r\n } else {\r\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\r\n var matches = line.match(functionNameRegex);\r\n var functionName = matches && matches[1] ? matches[1] : undefined;\r\n var locationParts = this.extractLocation(line.replace(functionNameRegex, \"\"));\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }\r\n }, this);\r\n },\r\n parseOpera: function ErrorStackParser$$parseOpera(e) {\r\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\r\n return this.parseOpera9(e);\r\n } else if (!e.stack) {\r\n return this.parseOpera10(e);\r\n } else {\r\n return this.parseOpera11(e);\r\n }\r\n },\r\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\r\n var lines = e.message.split(\"\\n\");\r\n var result = [];\r\n for (var i = 2, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\r\n var lines = e.stacktrace.split(\"\\n\");\r\n var result = [];\r\n for (var i = 0, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n functionName: match[3] || undefined,\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n // Opera 10.65+ Error.stack very similar to FF/Safari\r\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\r\n }, this);\r\n return filtered.map(function (line) {\r\n var tokens = line.split(\"@\");\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionCall = tokens.shift() || \"\";\r\n var functionName = functionCall.replace(//, \"$2\").replace(/\\([^\\)]*\\)/g, \"\") || undefined;\r\n var argsRaw;\r\n if (functionCall.match(/\\(([^\\)]*)\\)/)) {\r\n argsRaw = functionCall.replace(/^[^\\(]+\\(([^\\)]*)\\)$/, \"$1\");\r\n }\r\n var args = argsRaw === undefined || argsRaw === \"[arguments not available]\" ? undefined : argsRaw.split(\",\");\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n }\r\n };\r\n })();\r\n\r\n //\r\n // ==== STACKTRACE-GPS ====\r\n //\r\n\r\n var SourceMap = function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=n,r.p=\"\",r(0)}([function(e,n,r){var t=r(1),o=r(2),i=r(3).ArraySet,a=r(4),s=r(6).quickSort;function u(e){var n=e;return\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\"))),null!=n.sections?new c(n):new l(n)}function l(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sources\"),a=t.getArg(n,\"names\",[]),s=t.getArg(n,\"sourceRoot\",null),u=t.getArg(n,\"sourcesContent\",null),l=t.getArg(n,\"mappings\"),g=t.getArg(n,\"file\",null);if(r!=this._version)throw new Error(\"Unsupported version: \"+r);o=o.map(String).map(t.normalize).map(function(e){return s&&t.isAbsolute(s)&&t.isAbsolute(e)?t.relative(s,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=g}function g(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sections\");if(r!=this._version)throw new Error(\"Unsupported version: \"+r);this._sources=new i,this._names=new i;var a={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=t.getArg(e,\"offset\"),r=t.getArg(n,\"line\"),o=t.getArg(n,\"column\");if(r=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=a.length;p1&&(r.source=d+i[1],d+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+i[3],f=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),L.push(r),\"number\"==typeof r.originalLine&&y.push(r)}s(L,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(y,t.compareByOriginalPositions),this.__originalMappings=y},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[t]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,\"name\",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,\"originalLine\",null),column:t.getArg(o,\"originalColumn\",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\\/\\//,\"\");if(\"file\"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||\"/\"==r.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.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,\"source\");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,\"line\"),originalColumn:t.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(e,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,\"generatedLine\",null),column:t.getArg(i,\"generatedColumn\",null),lastColumn:t.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,c.prototype=Object.create(u.prototype),c.prototype.constructor=u,c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){for(var e=[],n=0;n=0;g--)\".\"===(a=u[g])?u.splice(g,1):\"..\"===a?l++:l>0&&(\"\"===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=s?\"/\":\".\"),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){\"\"===e&&(e=\".\"),\"\"===n&&(n=\".\");var r=o(n),s=o(e);if(s&&(e=s.path||\"/\"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u=\"/\"===n.charAt(0)?n:a(e.replace(/\\/+$/,\"\")+\"/\"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return\"/\"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==n.indexOf(e+\"/\");){var t=e.lastIndexOf(\"/\");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\\/]+:\\/)?\\/*$/))return n;++r}return Array(r+1).join(\"../\")+n.substr(e.length+1)};var s=!(\"__proto__\"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)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 r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?\"$\"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=g(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,g=0;do{if(n>=u)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");n.encode=function(e){if(0<=e&&e= 200 && req.status < 300 || url.substr(0, 7) === \"file://\" && req.responseText) {\r\n resolve(req.responseText);\r\n } else {\r\n reject(new Error(\"HTTP status: \" + req.status + \" retrieving \" + url));\r\n }\r\n }\r\n };\r\n req.send();\r\n });\r\n }\r\n /**\r\n * Convert a Base64-encoded string into its original representation.\r\n * Used for inline sourcemaps.\r\n *\r\n * @param {String} b64str Base-64 encoded string\r\n * @returns {String} original representation of the base64-encoded string.\r\n */\r\n function _atob(b64str) {\r\n if (typeof window !== \"undefined\" && window.atob) {\r\n return window.atob(b64str);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for window.atob in this environment\");\r\n }\r\n }\r\n function _parseJson(string) {\r\n if (typeof JSON !== \"undefined\" && JSON.parse) {\r\n return JSON.parse(string);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for JSON.parse in this environment\");\r\n }\r\n }\r\n function _findFunctionName(source, lineNumber) {\r\n var syntaxes = [ // {name} = function ({args}) TODO args capture\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/, // function {name}({args}) m[1]=name m[2]=args\r\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/, // {name} = eval()\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/, // fn_name() {\r\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/, // {name} = () => {\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/];\r\n var lines = source.split(\"\\n\");\r\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\r\n var code = \"\";\r\n var maxLines = Math.min(lineNumber, 20);\r\n for (var i = 0; i < maxLines; ++i) {\r\n // lineNo is 1-based, source[] is 0-based\r\n var line = lines[lineNumber - i - 1];\r\n var commentPos = line.indexOf(\"//\");\r\n if (commentPos >= 0) {\r\n line = line.substr(0, commentPos);\r\n }\r\n if (line) {\r\n code = line + code;\r\n var len = syntaxes.length;\r\n for (var index = 0; index < len; index++) {\r\n var m = syntaxes[index].exec(code);\r\n if (m && m[1]) {\r\n return m[1];\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n function _ensureSupportedEnvironment() {\r\n if (typeof Object.defineProperty !== \"function\" || typeof Object.create !== \"function\") {\r\n throw new Error(\"Unable to consume source maps in older browsers\");\r\n }\r\n }\r\n function _ensureStackFrameIsLegit(stackframe) {\r\n if (typeof stackframe !== \"object\") {\r\n throw new TypeError(\"Given StackFrame is not an object\");\r\n } else if (typeof stackframe.fileName !== \"string\") {\r\n throw new TypeError(\"Given file name is not a String\");\r\n } else if (typeof stackframe.lineNumber !== \"number\" || stackframe.lineNumber % 1 !== 0 || stackframe.lineNumber < 1) {\r\n throw new TypeError(\"Given line number must be a positive integer\");\r\n } else if (typeof stackframe.columnNumber !== \"number\" || stackframe.columnNumber % 1 !== 0 || stackframe.columnNumber < 0) {\r\n throw new TypeError(\"Given column number must be a non-negative integer\");\r\n }\r\n return true;\r\n }\r\n function _findSourceMappingURL(source) {\r\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\r\n var lastSourceMappingUrl;\r\n var matchSourceMappingUrl;\r\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\r\n // jshint ignore:line\r\n lastSourceMappingUrl = matchSourceMappingUrl[1];\r\n }\r\n if (lastSourceMappingUrl) {\r\n return lastSourceMappingUrl;\r\n } else {\r\n throw new Error(\"sourceMappingURL not found\");\r\n }\r\n }\r\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\r\n return new Promise(function (resolve, reject) {\r\n var loc = sourceMapConsumer.originalPositionFor({\r\n line: stackframe.lineNumber,\r\n column: stackframe.columnNumber\r\n });\r\n if (loc.source) {\r\n // cache mapped sources\r\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\r\n if (mappedSource) {\r\n sourceCache[loc.source] = mappedSource;\r\n }\r\n resolve(// given stackframe and source location, update stackframe\r\n new StackFrame({\r\n functionName: loc.name || stackframe.functionName,\r\n args: stackframe.args,\r\n fileName: loc.source,\r\n lineNumber: loc.line,\r\n columnNumber: loc.column\r\n }));\r\n } else {\r\n reject(new Error(\"Could not get original source for given stackframe and source map\"));\r\n }\r\n });\r\n }\r\n /**\r\n * @constructor\r\n * @param {Object} opts\r\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\r\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\r\n * opts.offline = True to prevent network requests.\r\n * Best effort without sources or source maps.\r\n * opts.ajax = Promise returning function to make X-Domain requests\r\n */\r\n return function StackTraceGPS(opts) {\r\n if (!(this instanceof StackTraceGPS)) {\r\n return new StackTraceGPS(opts);\r\n }\r\n opts = opts || {};\r\n this.sourceCache = opts.sourceCache || {};\r\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\r\n this.ajax = opts.ajax || _xdr;\r\n this._atob = opts.atob || _atob;\r\n\r\n this._get = function _get(location) {\r\n return new Promise(function (resolve, reject) {\r\n var isDataUrl = location.substr(0, 5) === \"data:\";\r\n if (this.sourceCache[location]) {\r\n resolve(this.sourceCache[location]);\r\n } else if (opts.offline && !isDataUrl) {\r\n reject(new Error(\"Cannot make network requests in offline mode\"));\r\n } else {\r\n if (isDataUrl) {\r\n // data URLs can have parameters.\r\n // see http://tools.ietf.org/html/rfc2397\r\n var supportedEncodingRegexp = /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\r\n var match = location.match(supportedEncodingRegexp);\r\n if (match) {\r\n var sourceMapStart = match[0].length;\r\n var encodedSource = location.substr(sourceMapStart);\r\n var source = this._atob(encodedSource);\r\n this.sourceCache[location] = source;\r\n resolve(source);\r\n } else {\r\n reject(new Error(\"The encoding of the inline sourcemap is not supported\"));\r\n }\r\n } else {\r\n var xhrPromise = this.ajax(location, {\r\n method: \"get\"\r\n });\r\n // Cache the Promise to prevent duplicate in-flight requests\r\n this.sourceCache[location] = xhrPromise;\r\n xhrPromise.then(resolve, reject);\r\n }\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\r\n * SourceMapConsumer in a per-instance cache.\r\n *\r\n * @param {String} sourceMappingURL = URL to fetch source map from\r\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\r\n * @returns {Promise} that resolves a SourceMapConsumer\r\n */\r\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\r\n return new Promise(function (resolve, reject) {\r\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\r\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\r\n } else {\r\n var sourceMapConsumerPromise = new Promise(function (resolve, reject) {\r\n return this._get(sourceMappingURL).then(function (sourceMapSource) {\r\n if (typeof sourceMapSource === \"string\") {\r\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, \"\"));\r\n }\r\n if (typeof sourceMapSource.sourceRoot === \"undefined\") {\r\n sourceMapSource.sourceRoot = defaultSourceRoot;\r\n }\r\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\r\n }, reject);\r\n }.bind(this));\r\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\r\n resolve(sourceMapConsumerPromise);\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, enhance function name and use source maps for a\r\n * better StackFrame.\r\n *\r\n * @param {StackFrame} stackframe object\r\n * @returns {Promise} that resolves with with source-mapped StackFrame\r\n */\r\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n this.getMappedLocation(stackframe).then(function (mappedStackFrame) {\r\n function resolveMappedStackFrame() {\r\n resolve(mappedStackFrame);\r\n }\r\n this.findFunctionName(mappedStackFrame).then(resolve, resolveMappedStackFrame)[\"catch\"](resolveMappedStackFrame);\r\n }.bind(this), reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, guess function name from location information.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureStackFrameIsLegit(stackframe);\r\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\r\n var lineNumber = stackframe.lineNumber;\r\n var columnNumber = stackframe.columnNumber;\r\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\r\n // Only replace functionName if we found something\r\n if (guessedFunctionName) {\r\n resolve(new StackFrame({\r\n functionName: guessedFunctionName,\r\n args: stackframe.args,\r\n fileName: stackframe.fileName,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber\r\n }));\r\n } else {\r\n resolve(stackframe);\r\n }\r\n }, reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureSupportedEnvironment();\r\n _ensureStackFrameIsLegit(stackframe);\r\n var sourceCache = this.sourceCache;\r\n var fileName = stackframe.fileName;\r\n this._get(fileName).then(function (source) {\r\n var sourceMappingURL = _findSourceMappingURL(source);\r\n var isDataUrl = sourceMappingURL.substr(0, 5) === \"data:\";\r\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf(\"/\") + 1);\r\n if (sourceMappingURL[0] !== \"/\" && !isDataUrl && !/^https?:\\/\\/|^\\/\\//i.test(sourceMappingURL)) {\r\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\r\n }\r\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot).then(function (sourceMapConsumer) {\r\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache).then(resolve)[\"catch\"](function () {\r\n resolve(stackframe);\r\n });\r\n });\r\n }.bind(this), reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n };\r\n })(SourceMap, StackFrame);\r\n\r\n //\r\n // Shared Variables\r\n //\r\n\r\n var scriptFile = document.getElementsByTagName('script');\r\n var scriptIndex = scriptFile.length - 1;\r\n var myScript = scriptFile[scriptIndex];\r\n var queryString = myScript.src.replace(/^[^\\?]+\\??/, '');\r\n var params = parseQuery(queryString);\r\n var paramsLength = objectLength(params);\r\n\r\n var debugSettings = {\r\n label: ' elmah.io debugger : On ',\r\n labelCSS: 'background: #06a89c; color: #ffffff; display: inline-block; font-size: 14px;',\r\n successCSS: 'background: #d4edda; color: #155724; display: inline-block; font-size: 13px;',\r\n errorCSS: 'background: #f8d7da; color: #721c24; display: inline-block; font-size: 13px;',\r\n warningCSS: 'background: #fff3cd; color: #856404; display: inline-block; font-size: 13px;',\r\n lightCSS: 'background: #e2e3e5; color: #383d41; display: inline-block; font-size: 13px;'\r\n };\r\n\r\n var defaults = {\r\n apiKey: null,\r\n logId: null,\r\n debug: false,\r\n application: null,\r\n filter: null\r\n };\r\n\r\n //\r\n // Shared Methods\r\n //\r\n\r\n var extend = function () {\r\n\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n\r\n // Check if a deep merge\r\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\r\n deep = arguments[0];\r\n i++;\r\n }\r\n\r\n // Merge the object into the extended object\r\n var merge = function (obj) {\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If property is an object, merge properties\r\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\r\n extended[prop] = extend(extended[prop], obj[prop]);\r\n } else {\r\n extended[prop] = obj[prop];\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Loop through each object and conduct a merge\r\n for (; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n merge(obj);\r\n }\r\n\r\n return extended;\r\n\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n function parseQuery(query) {\r\n var Params = new Object();\r\n if (!query) return Params; // return empty object\r\n var Pairs = query.split(/[;&]/);\r\n for (var i = 0; i < Pairs.length; i++) {\r\n var KeyVal = Pairs[i].split('=');\r\n if (!KeyVal || KeyVal.length !== 2) continue;\r\n var key = unescape(KeyVal[0]);\r\n var val = unescape(KeyVal[1]);\r\n val = val.replace(/\\+/g, ' ');\r\n Params[key] = val;\r\n }\r\n return Params;\r\n }\r\n\r\n function objectLength(obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n };\r\n\r\n function getSearchParameters() {\r\n var prmstr = window.location.search.substr(1);\r\n return prmstr !== null && prmstr !== \"\" ? transformToAssocArray(prmstr) : {};\r\n }\r\n\r\n function transformToAssocArray(prmstr) {\r\n var params = [];\r\n var prmarr = prmstr.split(\"&\");\r\n for (var i = 0; i < prmarr.length; i++) {\r\n var tmparr = prmarr[i].split(\"=\");\r\n params.push({\r\n 'key': tmparr[0],\r\n 'value': tmparr[1]\r\n });\r\n }\r\n return params;\r\n }\r\n\r\n function merge_objects(obj1, obj2) {\r\n var obj3 = {};\r\n for (var attrname1 in obj1) {\r\n obj3[attrname1] = obj1[attrname1];\r\n }\r\n for (var attrname2 in obj2) {\r\n obj3[attrname2] = obj2[attrname2];\r\n }\r\n\r\n return obj3;\r\n }\r\n\r\n //\r\n // Constructor\r\n // Can be named anything you want\r\n //\r\n\r\n var Constructor = function (options) {\r\n\r\n //\r\n // Unique Variables\r\n //\r\n\r\n var publicAPIs = {};\r\n var settings;\r\n\r\n function getPayload() {\r\n var payload = {\r\n \"url\": document.location.pathname || '/',\r\n \"application\": settings.application\r\n };\r\n\r\n var payload_data = [];\r\n\r\n if (document.documentMode) payload_data.push({ \"key\": \"Document-Mode\", \"value\": document.documentMode });\r\n if (window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth) payload_data.push({ \"key\": \"Browser-Width\", \"value\": window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth });\r\n if (window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight) payload_data.push({ \"key\": \"Browser-Height\", \"value\": window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight });\r\n if ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type) !== undefined) payload_data.push({ \"key\": \"Screen-Orientation\", \"value\": ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type).split(\"-\"))[0] });\r\n if (screen.width) payload_data.push({ \"key\": \"Screen-Width\", \"value\": screen.width });\r\n if (screen.height) payload_data.push({ \"key\": \"Screen-Height\", \"value\": screen.height });\r\n if (screen.colorDepth) payload_data.push({ \"key\": \"Color-Depth\", \"value\": screen.colorDepth });\r\n payload_data.push({ \"key\": \"X-ELMAHIO-SEARCH-isClientside\", \"value\": \"true\" });\r\n\r\n payload.data = payload_data;\r\n\r\n var payload_serverVariables = [];\r\n if (navigator.language) payload_serverVariables.push({ \"key\": \"User-Language\", \"value\": navigator.language });\r\n if (navigator.userAgent) payload_serverVariables.push({ \"key\": \"User-Agent\", \"value\": navigator.userAgent });\r\n if (document.referrer) payload_serverVariables.push({ \"key\": \"Referer\", \"value\": document.referrer });\r\n if (document.location.protocol === \"https:\") payload_serverVariables.push({ \"key\": \"HTTPS\", \"value\": 'on' });\r\n if (document.location.hostname) payload_serverVariables.push({ \"key\": \"Host\", \"value\": document.location.hostname });\r\n\r\n payload.serverVariables = payload_serverVariables;\r\n\r\n return payload;\r\n }\r\n\r\n function confirmResponse(status, response) {\r\n if (settings.debug) {\r\n if (status === 'error') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n } else if (status === 'success') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2714 ' + response + ' at ' + new Date().toLocaleString() + ' ', debugSettings.lightCSS, debugSettings.successCSS);\r\n } else {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created. Title should not be undefined, null or empty ! ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n }\r\n }\r\n }\r\n\r\n function stackGPS(error, xhr, jsonData) {\r\n \tvar errorStack = error.toString().split(\"\\n\")[0];\r\n \tvar gps = new StackTraceGPS();\r\n var promise = new Promise(function(resolve) {\r\n\t var stackframes = ErrorStackParser.parse(error);\r\n\t resolve(Promise.all(stackframes.map(function(sf) {\r\n\t return new Promise(function(resolve) {\r\n\t function resolveOriginal() {\r\n\t resolve(sf);\r\n\t }\r\n\t gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\r\n\t });\r\n\t })));\r\n \t}\r\n );\r\n\r\n promise.then(function(newFrames){\r\n \tnewFrames.forEach(function(stackFrame, i){\r\n\t\t\t\t\tif(stackFrame.functionName) {\r\n \t\t\tvar fn = stackFrame.functionName + ' ';\r\n \t\t} else {\r\n \t\t\tvar fn = '';\r\n \t\t}\r\n \t\tvar stackString = ' at ' + fn + '(' + stackFrame.fileName + ':' + stackFrame.lineNumber + ':' + stackFrame.columnNumber + ')';\r\n \t\tnewFrames[i] = stackString;\r\n \t});\r\n \tnewFrames.unshift(errorStack);\r\n \tjsonData.detail = newFrames.join(\"\\n\");\r\n \txhr.send(JSON.stringify(jsonData));\r\n });\r\n }\r\n\r\n // Private methods\r\n\r\n var sendPayload = function (apiKey, logId, callback, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n error = errorLog,\r\n send = 1,\r\n queryParams = getSearchParameters(),\r\n stack = error.error ? ErrorStackParser.parse(error.error) : '';\r\n\r\n // Ignoring error from an external script\r\n if (error && error.colno === 0 && error.lineno === 0 && (!stack || stack === '') && error.message && (error.message === \"Script error.\" || error.message === \"Script error\")) {\r\n\t\t\t if (settings.debug) {\r\n\t\t\t console.log('%c \\u2BC8 Error log: ' + '%c \\uD83D\\uDEC8 Ignoring error from external script ', debugSettings.lightCSS, debugSettings.warningCSS);\r\n\t\t\t }\r\n\t\t\t return;\r\n\t\t\t}\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"detail\": error.error ? error.error.stack : null,\r\n \"title\": error.message || 'Unspecified error',\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"severity\": \"Error\",\r\n \"type\": error.error ? error.error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error.error && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n \t// send message trying to pinpoint stackframes\r\n \tstackGPS(error.error, xhr, jsonData);\r\n\t } else {\r\n\t \t// send message\r\n \txhr.send(JSON.stringify(jsonData));\r\n\t }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendManualPayload = function (apiKey, logId, callback, logType, messageLog, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n type = logType,\r\n error = errorLog,\r\n message = messageLog,\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n if (type !== \"Log\") {\r\n\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": type,\r\n \"type\": error ? error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n } else {\r\n\r\n jsonData = error;\r\n\r\n }\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error && type !== \"Log\" && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n\t \t\t\t\t\t// send message trying to pinpoint stackframes\r\n \t\tstackGPS(error, xhr, jsonData);\r\n\t\t } else {\r\n\t\t \t// send message\r\n\t \txhr.send(JSON.stringify(jsonData));\r\n\t\t }\r\n\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n // Some public methods\r\n\r\n publicAPIs.error = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg);\r\n };\r\n publicAPIs.error = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg, error);\r\n };\r\n\r\n publicAPIs.verbose = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg);\r\n };\r\n publicAPIs.verbose = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg, error);\r\n };\r\n\r\n publicAPIs.debug = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg);\r\n };\r\n publicAPIs.debug = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg, error);\r\n };\r\n\r\n publicAPIs.information = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg);\r\n };\r\n publicAPIs.information = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg, error);\r\n };\r\n\r\n publicAPIs.warning = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg);\r\n };\r\n publicAPIs.warning = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg, error);\r\n };\r\n\r\n publicAPIs.fatal = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg);\r\n };\r\n publicAPIs.fatal = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg, error);\r\n };\r\n\r\n publicAPIs.log = function (obj) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Log', null, obj);\r\n };\r\n\r\n publicAPIs.on = function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx\r\n });\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.emit = function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.init = function (options) {\r\n\r\n // Merge options into defaults\r\n settings = extend(defaults, options || {});\r\n\r\n // Code goes here...\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n\r\n var errorLog = {\r\n 'message': message,\r\n 'source': source,\r\n 'lineno': lineno,\r\n 'colno': colno,\r\n 'error': error\r\n }\r\n\r\n sendPayload(settings.apiKey, settings.logId, confirmResponse, errorLog);\r\n\r\n return false;\r\n }\r\n\r\n };\r\n\r\n // Initialize the plugin\r\n publicAPIs.init(options);\r\n\r\n if (settings.debug) {\r\n console.log('%c' + debugSettings.label, debugSettings.labelCSS);\r\n }\r\n\r\n // Return the public APIs\r\n return publicAPIs;\r\n\r\n };\r\n\r\n\r\n //\r\n // Return the constructor\r\n //\r\n\r\n if (paramsLength && params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n // Immediately-Invoked Function Expression (IIFE)\r\n return new Constructor;\r\n } else {\r\n // UMD Constructor\r\n return Constructor;\r\n }\r\n\r\n});\r\n"],"file":"elmahio.min.js"} \ No newline at end of file +{"version":3,"sources":["elmahio.js"],"names":["root","factory","define","amd","exports","module","Elmahio","global","window","this","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","StackFrame","_isNumber","n","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","props","concat","obj","Object","i","length","hasOwnProperty","undefined","prototype","getArgs","args","setArgs","v","toString","call","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFunctionName","join","getFileName","getLineNumber","getColumnNumber","fromString","argsStartIndex","indexOf","argsEndIndex","lastIndexOf","functionName","split","locationString","parts","exec","fileName","lineNumber","columnNumber","Boolean","j","Number","k","String","ErrorStackParser","parse","error","stacktrace","parseOpera","stack","match","parseV8OrIE","parseFFOrSafari","Error","extractLocation","urlLike","replace","filter","line","map","tokens","slice","locationParts","pop","source","functionNameRegex","matches","e","message","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","result","len","push","argsRaw","functionCall","shift","StackTraceGPS","SourceMap","_xdr","url","Promise","resolve","reject","req","XMLHttpRequest","open","onerror","onreadystatechange","readyState","status","substr","responseText","send","_atob","b64str","atob","_ensureStackFrameIsLegit","stackframe","opts","sourceCache","sourceMapConsumerCache","ajax","_get","location","isDataUrl","offline","sourceMapStart","encodedSource","xhrPromise","method","then","bind","_getSourceMapConsumer","sourceMappingURL","defaultSourceRoot","sourceMapConsumerPromise","sourceMapSource","string","JSON","_parseJson","sourceRoot","SourceMapConsumer","pinpoint","getMappedLocation","mappedStackFrame","resolveMappedStackFrame","findFunctionName","guessedFunctionName","syntaxes","code","maxLines","Math","min","commentPos","index","m","_findFunctionName","defineProperty","create","_ensureSupportedEnvironment","lastSourceMappingUrl","matchSourceMappingUrl","sourceMappingUrlRegExp","_findSourceMappingURL","test","sourceMapConsumer","loc","originalPositionFor","column","mappedSource","sourceContentFor","name","_extractLocationInfoFromSourceMapSource","r","t","o","id","loaded","c","ArraySet","a","s","quickSort","u","sections","l","getArg","g","_version","normalize","isAbsolute","relative","_names","fromArray","_sources","sourcesContent","_mappings","file","generatedLine","generatedColumn","originalLine","originalColumn","_sections","generatedOffset","consumer","fromSourceMap","__generatedMappings","get","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","eachMapping","_generatedMappings","_originalMappings","at","forEach","allGeneratedPositionsFor","has","_findMapping","compareByOriginalPositions","lastColumn","toArray","_sourceRoot","_generateSourcesContent","_file","h","f","d","_","C","A","y","L","decode","value","rest","compareByGeneratedPositionsDeflated","search","computeColumnSpans","lastGeneratedColumn","hasContentsOfAllSources","size","some","urlParse","scheme","path","generatedPositionFor","BasicSourceMapConsumer","constructor","sources","bias","every","add","IndexedSourceMapConsumer","arguments","auth","host","port","splice","urlGenerate","Array","charCodeAt","toSetString","fromSetString","compareByGeneratedPositionsInflated","floor","_array","_set","getOwnPropertyNames","encode","round","random","scriptFile","document","getElementsByTagName","params","query","Params","Pairs","KeyVal","key","unescape","val","parseQuery","src","paramsLength","objectLength","debugSettings","label","labelCSS","successCSS","errorCSS","warningCSS","lightCSS","defaults","apiKey","logId","debug","application","extend","extended","deep","merge","prop","getSearchParameters","prmstr","prmarr","tmparr","transformToAssocArray","merge_objects","obj1","obj2","obj3","attrname1","attrname2","Constructor","options","settings","publicAPIs","getPayload","payload","pathname","payload_data","documentMode","innerWidth","documentElement","clientWidth","innerHeight","clientHeight","screen","msOrientation","orientation","mozOrientation","type","width","height","colorDepth","data","payload_serverVariables","navigator","language","userAgent","referrer","protocol","hostname","serverVariables","confirmResponse","response","console","log","Date","toLocaleString","stackGPS","xhr","jsonData","errorStack","gps","stackframes","all","sf","resolveOriginal","newFrames","stackFrame","fn","stackString","unshift","detail","stringify","sendManualPayload","callback","logType","messageLog","errorLog","api_key","log_id","queryParams","setRequestHeader","onload","statusText","emit","title","severity","queryString","msg","verbose","information","warning","fatal","on","ctx","evtArr","apply","init","lineno","colno","sendPayload"],"mappings":";;;;CAIA,SAAUA,EAAMC,GACQ,mBAAXC,QAAyBA,OAAOC,IACzCD,OAAO,GAAI,WACT,OAAOD,EAAQD,KAEW,iBAAZI,QAChBC,OAAOD,QAAUH,EAAQD,GAEzBA,EAAKM,QAAUL,EAAQD,GAR3B,CAUqB,oBAAXO,OAAyBA,OAA2B,oBAAXC,OAAyBA,OAASC,KAAM,SAASD,GAClG,aACA,IAiHME,EACAC,EACAC,EAnHFC,EAAa,WAGf,SAASC,EAAUC,GACjB,OAAQC,MAAMC,WAAWF,KAAOG,SAASH,GAG3C,SAASI,EAAYC,GACnB,OAAOA,EAAIC,OAAO,GAAGC,cAAgBF,EAAIG,UAAU,GAGrD,SAASC,EAAQC,GACf,OAAO,WACL,OAAOhB,KAAKgB,IAGhB,IAAIC,EAAe,CAAC,gBAAiB,SAAU,WAAY,cACvDC,EAAe,CAAC,eAAgB,cAChCC,EAAc,CAAC,WAAY,eAAgB,UAE3CC,EAAQH,EAAaI,OAAOH,EAAcC,EAD7B,CAAC,SAGlB,SAASf,EAAWkB,GAClB,GAAIA,aAAeC,OACjB,IAAK,IAAIC,EAAI,EAAGA,EAAIJ,EAAMK,OAAQD,IAC5BF,EAAII,eAAeN,EAAMI,UAAyBG,IAAlBL,EAAIF,EAAMI,KAC5CxB,KAAK,MAAQU,EAAYU,EAAMI,KAAKF,EAAIF,EAAMI,KAKtDpB,EAAWwB,UAAY,CACrBC,QAAS,WACP,OAAO7B,K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,QAAQrE,WAAWa,QAAQ,iBAC9EwT,EAAStS,EAAMA,MAAOuS,EAAKC,GAE3BD,EAAIrP,KAAK0B,KAAKyO,UAAUb,UA3CxBrC,EAASpB,OACXmD,QAAQC,IAAI,6DAAkF9D,EAAcM,SAAUN,EAAcK,YAkLtIuG,CAAY9E,EAAStB,OAAQsB,EAASrB,MAAOkD,EAAiB0B,IACvD,IAGXtD,EAAW0E,KAAK5E,GACZC,EAASpB,OACXmD,QAAQC,IAAI,KAAO9D,EAAcC,MAAOD,EAAcE,UAEjD6B,GAET,OAAIjC,GAAgBV,EAAO/P,eAAe,WAAa+P,EAAO/P,eAAe,SACpE,IAAIuS,EAEJA","sourcesContent":["/*!\r\n * elmah.io Javascript Logger - version 3.0.3\r\n * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io\r\n */\r\n\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define([], function () {\r\n return factory(root);\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory(root);\r\n } else {\r\n root.Elmahio = factory(root);\r\n }\r\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\r\n\r\n 'use strict';\r\n\r\n //\r\n // ==== STACKFRAME ====\r\n //\r\n\r\n var StackFrame = (function () {\r\n \"use strict\";\r\n function _isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n }\r\n function _capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n }\r\n function _getter(p) {\r\n return function () {\r\n return this[p];\r\n };\r\n }\r\n var booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\r\n var numericProps = [\"columnNumber\", \"lineNumber\"];\r\n var stringProps = [\"fileName\", \"functionName\", \"source\"];\r\n var arrayProps = [\"args\"];\r\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\r\n function StackFrame(obj) {\r\n if (obj instanceof Object) {\r\n for (var i = 0; i < props.length; i++) {\r\n if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {\r\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\r\n }\r\n }\r\n }\r\n }\r\n StackFrame.prototype = {\r\n getArgs: function () {\r\n return this.args;\r\n },\r\n setArgs: function (v) {\r\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\r\n throw new TypeError(\"Args must be an Array\");\r\n }\r\n this.args = v;\r\n },\r\n getEvalOrigin: function () {\r\n return this.evalOrigin;\r\n },\r\n setEvalOrigin: function (v) {\r\n if (v instanceof StackFrame) {\r\n this.evalOrigin = v;\r\n } else if (v instanceof Object) {\r\n this.evalOrigin = new StackFrame(v);\r\n } else {\r\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\r\n }\r\n },\r\n toString: function () {\r\n var functionName = this.getFunctionName() || \"{anonymous}\";\r\n var args = \"(\" + (this.getArgs() || []).join(\",\") + \")\";\r\n var fileName = this.getFileName() ? \"@\" + this.getFileName() : \"\";\r\n var lineNumber = _isNumber(this.getLineNumber()) ? \":\" + this.getLineNumber() : \"\";\r\n var columnNumber = _isNumber(this.getColumnNumber()) ? \":\" + this.getColumnNumber() : \"\";\r\n return functionName + args + fileName + lineNumber + columnNumber;\r\n }\r\n };\r\n StackFrame.fromString = function StackFrame$$fromString(str) {\r\n var argsStartIndex = str.indexOf(\"(\");\r\n var argsEndIndex = str.lastIndexOf(\")\");\r\n var functionName = str.substring(0, argsStartIndex);\r\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\r\n var locationString = str.substring(argsEndIndex + 1);\r\n if (locationString.indexOf(\"@\") === 0) {\r\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\r\n var fileName = parts[1];\r\n var lineNumber = parts[2];\r\n var columnNumber = parts[3];\r\n }\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args || undefined,\r\n fileName: fileName,\r\n lineNumber: lineNumber || undefined,\r\n columnNumber: columnNumber || undefined\r\n });\r\n };\r\n for (var i = 0; i < booleanProps.length; i++) {\r\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\r\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = function (p) {\r\n return function (v) {\r\n this[p] = Boolean(v);\r\n };\r\n }(booleanProps[i]);\r\n }\r\n for (var j = 0; j < numericProps.length; j++) {\r\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(numericProps[j]);\r\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = function (p) {\r\n return function (v) {\r\n if (!_isNumber(v)) {\r\n throw new TypeError(p + \" must be a Number\");\r\n }\r\n this[p] = Number(v);\r\n };\r\n }(numericProps[j]);\r\n }\r\n for (var k = 0; k < stringProps.length; k++) {\r\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(stringProps[k]);\r\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = function (p) {\r\n return function (v) {\r\n this[p] = String(v);\r\n };\r\n }(stringProps[k]);\r\n }\r\n return StackFrame;\r\n })();\r\n\r\n //\r\n // ==== ERROR STACK PARSER ====\r\n //\r\n\r\n var ErrorStackParser = (function () {\r\n \"use strict\";\r\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+\\:\\d+/;\r\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m;\r\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code\\])?$/;\r\n return {\r\n /**\r\n * Given an Error object, extract the most information from it.\r\n *\r\n * @param {Error} error object\r\n * @return {Array} of StackFrames\r\n */\r\n parse: function ErrorStackParser$$parse(error) {\r\n if (typeof error.stacktrace !== \"undefined\" || typeof error[\"opera#sourceloc\"] !== \"undefined\") {\r\n return this.parseOpera(error);\r\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\r\n return this.parseV8OrIE(error);\r\n } else if (error.stack) {\r\n return this.parseFFOrSafari(error);\r\n } else {\r\n throw new Error(\"Cannot parse given Error object\");\r\n }\r\n },\r\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\r\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\r\n // Fail-fast but return locations like \"(native)\"\r\n if (urlLike.indexOf(\":\") === -1) {\r\n return [urlLike];\r\n }\r\n var regExp = /(.+?)(?:\\:(\\d+))?(?:\\:(\\d+))?$/;\r\n var parts = regExp.exec(urlLike.replace(/[\\(\\)]/g, \"\"));\r\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\r\n },\r\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(CHROME_IE_STACK_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n if (line.indexOf(\"(eval \") > -1) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g, \"\");\r\n }\r\n var tokens = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").split(/\\s+/).slice(1);\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionName = tokens.join(\" \") || undefined;\r\n var fileName = [\"eval\", \"\"].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: fileName,\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n },\r\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n if (line.indexOf(\" > eval\") > -1) {\r\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g, \":$1\");\r\n }\r\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\r\n // Safari eval frames only have function names and nothing else\r\n return new StackFrame({\r\n functionName: line\r\n });\r\n } else {\r\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\r\n var matches = line.match(functionNameRegex);\r\n var functionName = matches && matches[1] ? matches[1] : undefined;\r\n var locationParts = this.extractLocation(line.replace(functionNameRegex, \"\"));\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }\r\n }, this);\r\n },\r\n parseOpera: function ErrorStackParser$$parseOpera(e) {\r\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\r\n return this.parseOpera9(e);\r\n } else if (!e.stack) {\r\n return this.parseOpera10(e);\r\n } else {\r\n return this.parseOpera11(e);\r\n }\r\n },\r\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\r\n var lines = e.message.split(\"\\n\");\r\n var result = [];\r\n for (var i = 2, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\r\n var lines = e.stacktrace.split(\"\\n\");\r\n var result = [];\r\n for (var i = 0, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n functionName: match[3] || undefined,\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n // Opera 10.65+ Error.stack very similar to FF/Safari\r\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\r\n }, this);\r\n return filtered.map(function (line) {\r\n var tokens = line.split(\"@\");\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionCall = tokens.shift() || \"\";\r\n var functionName = functionCall.replace(//, \"$2\").replace(/\\([^\\)]*\\)/g, \"\") || undefined;\r\n var argsRaw;\r\n if (functionCall.match(/\\(([^\\)]*)\\)/)) {\r\n argsRaw = functionCall.replace(/^[^\\(]+\\(([^\\)]*)\\)$/, \"$1\");\r\n }\r\n var args = argsRaw === undefined || argsRaw === \"[arguments not available]\" ? undefined : argsRaw.split(\",\");\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n }\r\n };\r\n })();\r\n\r\n //\r\n // ==== STACKTRACE-GPS ====\r\n //\r\n\r\n var SourceMap = function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=n,r.p=\"\",r(0)}([function(e,n,r){var t=r(1),o=r(2),i=r(3).ArraySet,a=r(4),s=r(6).quickSort;function u(e){var n=e;return\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\"))),null!=n.sections?new c(n):new l(n)}function l(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sources\"),a=t.getArg(n,\"names\",[]),s=t.getArg(n,\"sourceRoot\",null),u=t.getArg(n,\"sourcesContent\",null),l=t.getArg(n,\"mappings\"),g=t.getArg(n,\"file\",null);if(r!=this._version)throw new Error(\"Unsupported version: \"+r);o=o.map(String).map(t.normalize).map(function(e){return s&&t.isAbsolute(s)&&t.isAbsolute(e)?t.relative(s,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=g}function g(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sections\");if(r!=this._version)throw new Error(\"Unsupported version: \"+r);this._sources=new i,this._names=new i;var a={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=t.getArg(e,\"offset\"),r=t.getArg(n,\"line\"),o=t.getArg(n,\"column\");if(r=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=a.length;p1&&(r.source=d+i[1],d+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+i[3],f=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),L.push(r),\"number\"==typeof r.originalLine&&y.push(r)}s(L,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(y,t.compareByOriginalPositions),this.__originalMappings=y},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[t]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,\"name\",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,\"originalLine\",null),column:t.getArg(o,\"originalColumn\",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\\/\\//,\"\");if(\"file\"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||\"/\"==r.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.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,\"source\");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,\"line\"),originalColumn:t.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(e,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,\"generatedLine\",null),column:t.getArg(i,\"generatedColumn\",null),lastColumn:t.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,c.prototype=Object.create(u.prototype),c.prototype.constructor=u,c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){for(var e=[],n=0;n=0;g--)\".\"===(a=u[g])?u.splice(g,1):\"..\"===a?l++:l>0&&(\"\"===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=s?\"/\":\".\"),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){\"\"===e&&(e=\".\"),\"\"===n&&(n=\".\");var r=o(n),s=o(e);if(s&&(e=s.path||\"/\"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u=\"/\"===n.charAt(0)?n:a(e.replace(/\\/+$/,\"\")+\"/\"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return\"/\"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==n.indexOf(e+\"/\");){var t=e.lastIndexOf(\"/\");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\\/]+:\\/)?\\/*$/))return n;++r}return Array(r+1).join(\"../\")+n.substr(e.length+1)};var s=!(\"__proto__\"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)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 r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?\"$\"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=g(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,g=0;do{if(n>=u)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");n.encode=function(e){if(0<=e&&e= 200 && req.status < 300 || url.substr(0, 7) === \"file://\" && req.responseText) {\r\n resolve(req.responseText);\r\n } else {\r\n reject(new Error(\"HTTP status: \" + req.status + \" retrieving \" + url));\r\n }\r\n }\r\n };\r\n req.send();\r\n });\r\n }\r\n /**\r\n * Convert a Base64-encoded string into its original representation.\r\n * Used for inline sourcemaps.\r\n *\r\n * @param {String} b64str Base-64 encoded string\r\n * @returns {String} original representation of the base64-encoded string.\r\n */\r\n function _atob(b64str) {\r\n if (typeof window !== \"undefined\" && window.atob) {\r\n return window.atob(b64str);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for window.atob in this environment\");\r\n }\r\n }\r\n function _parseJson(string) {\r\n if (typeof JSON !== \"undefined\" && JSON.parse) {\r\n return JSON.parse(string);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for JSON.parse in this environment\");\r\n }\r\n }\r\n function _findFunctionName(source, lineNumber) {\r\n var syntaxes = [ // {name} = function ({args}) TODO args capture\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/, // function {name}({args}) m[1]=name m[2]=args\r\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/, // {name} = eval()\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/, // fn_name() {\r\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/, // {name} = () => {\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/];\r\n var lines = source.split(\"\\n\");\r\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\r\n var code = \"\";\r\n var maxLines = Math.min(lineNumber, 20);\r\n for (var i = 0; i < maxLines; ++i) {\r\n // lineNo is 1-based, source[] is 0-based\r\n var line = lines[lineNumber - i - 1];\r\n var commentPos = line.indexOf(\"//\");\r\n if (commentPos >= 0) {\r\n line = line.substr(0, commentPos);\r\n }\r\n if (line) {\r\n code = line + code;\r\n var len = syntaxes.length;\r\n for (var index = 0; index < len; index++) {\r\n var m = syntaxes[index].exec(code);\r\n if (m && m[1]) {\r\n return m[1];\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n function _ensureSupportedEnvironment() {\r\n if (typeof Object.defineProperty !== \"function\" || typeof Object.create !== \"function\") {\r\n throw new Error(\"Unable to consume source maps in older browsers\");\r\n }\r\n }\r\n function _ensureStackFrameIsLegit(stackframe) {\r\n if (typeof stackframe !== \"object\") {\r\n throw new TypeError(\"Given StackFrame is not an object\");\r\n } else if (typeof stackframe.fileName !== \"string\") {\r\n throw new TypeError(\"Given file name is not a String\");\r\n } else if (typeof stackframe.lineNumber !== \"number\" || stackframe.lineNumber % 1 !== 0 || stackframe.lineNumber < 1) {\r\n throw new TypeError(\"Given line number must be a positive integer\");\r\n } else if (typeof stackframe.columnNumber !== \"number\" || stackframe.columnNumber % 1 !== 0 || stackframe.columnNumber < 0) {\r\n throw new TypeError(\"Given column number must be a non-negative integer\");\r\n }\r\n return true;\r\n }\r\n function _findSourceMappingURL(source) {\r\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\r\n var lastSourceMappingUrl;\r\n var matchSourceMappingUrl;\r\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\r\n // jshint ignore:line\r\n lastSourceMappingUrl = matchSourceMappingUrl[1];\r\n }\r\n if (lastSourceMappingUrl) {\r\n return lastSourceMappingUrl;\r\n } else {\r\n throw new Error(\"sourceMappingURL not found\");\r\n }\r\n }\r\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\r\n return new Promise(function (resolve, reject) {\r\n var loc = sourceMapConsumer.originalPositionFor({\r\n line: stackframe.lineNumber,\r\n column: stackframe.columnNumber\r\n });\r\n if (loc.source) {\r\n // cache mapped sources\r\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\r\n if (mappedSource) {\r\n sourceCache[loc.source] = mappedSource;\r\n }\r\n resolve(// given stackframe and source location, update stackframe\r\n new StackFrame({\r\n functionName: loc.name || stackframe.functionName,\r\n args: stackframe.args,\r\n fileName: loc.source,\r\n lineNumber: loc.line,\r\n columnNumber: loc.column\r\n }));\r\n } else {\r\n reject(new Error(\"Could not get original source for given stackframe and source map\"));\r\n }\r\n });\r\n }\r\n /**\r\n * @constructor\r\n * @param {Object} opts\r\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\r\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\r\n * opts.offline = True to prevent network requests.\r\n * Best effort without sources or source maps.\r\n * opts.ajax = Promise returning function to make X-Domain requests\r\n */\r\n return function StackTraceGPS(opts) {\r\n if (!(this instanceof StackTraceGPS)) {\r\n return new StackTraceGPS(opts);\r\n }\r\n opts = opts || {};\r\n this.sourceCache = opts.sourceCache || {};\r\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\r\n this.ajax = opts.ajax || _xdr;\r\n this._atob = opts.atob || _atob;\r\n\r\n this._get = function _get(location) {\r\n return new Promise(function (resolve, reject) {\r\n var isDataUrl = location.substr(0, 5) === \"data:\";\r\n if (this.sourceCache[location]) {\r\n resolve(this.sourceCache[location]);\r\n } else if (opts.offline && !isDataUrl) {\r\n reject(new Error(\"Cannot make network requests in offline mode\"));\r\n } else {\r\n if (isDataUrl) {\r\n // data URLs can have parameters.\r\n // see http://tools.ietf.org/html/rfc2397\r\n var supportedEncodingRegexp = /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\r\n var match = location.match(supportedEncodingRegexp);\r\n if (match) {\r\n var sourceMapStart = match[0].length;\r\n var encodedSource = location.substr(sourceMapStart);\r\n var source = this._atob(encodedSource);\r\n this.sourceCache[location] = source;\r\n resolve(source);\r\n } else {\r\n reject(new Error(\"The encoding of the inline sourcemap is not supported\"));\r\n }\r\n } else {\r\n var xhrPromise = this.ajax(location, {\r\n method: \"get\"\r\n });\r\n // Cache the Promise to prevent duplicate in-flight requests\r\n this.sourceCache[location] = xhrPromise;\r\n xhrPromise.then(resolve, reject);\r\n }\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\r\n * SourceMapConsumer in a per-instance cache.\r\n *\r\n * @param {String} sourceMappingURL = URL to fetch source map from\r\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\r\n * @returns {Promise} that resolves a SourceMapConsumer\r\n */\r\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\r\n return new Promise(function (resolve, reject) {\r\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\r\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\r\n } else {\r\n var sourceMapConsumerPromise = new Promise(function (resolve, reject) {\r\n return this._get(sourceMappingURL).then(function (sourceMapSource) {\r\n if (typeof sourceMapSource === \"string\") {\r\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, \"\"));\r\n }\r\n if (typeof sourceMapSource.sourceRoot === \"undefined\") {\r\n sourceMapSource.sourceRoot = defaultSourceRoot;\r\n }\r\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\r\n }, reject);\r\n }.bind(this));\r\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\r\n resolve(sourceMapConsumerPromise);\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, enhance function name and use source maps for a\r\n * better StackFrame.\r\n *\r\n * @param {StackFrame} stackframe object\r\n * @returns {Promise} that resolves with with source-mapped StackFrame\r\n */\r\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n this.getMappedLocation(stackframe).then(function (mappedStackFrame) {\r\n function resolveMappedStackFrame() {\r\n resolve(mappedStackFrame);\r\n }\r\n this.findFunctionName(mappedStackFrame).then(resolve, resolveMappedStackFrame)[\"catch\"](resolveMappedStackFrame);\r\n }.bind(this), reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, guess function name from location information.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureStackFrameIsLegit(stackframe);\r\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\r\n var lineNumber = stackframe.lineNumber;\r\n var columnNumber = stackframe.columnNumber;\r\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\r\n // Only replace functionName if we found something\r\n if (guessedFunctionName) {\r\n resolve(new StackFrame({\r\n functionName: guessedFunctionName,\r\n args: stackframe.args,\r\n fileName: stackframe.fileName,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber\r\n }));\r\n } else {\r\n resolve(stackframe);\r\n }\r\n }, reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureSupportedEnvironment();\r\n _ensureStackFrameIsLegit(stackframe);\r\n var sourceCache = this.sourceCache;\r\n var fileName = stackframe.fileName;\r\n this._get(fileName).then(function (source) {\r\n var sourceMappingURL = _findSourceMappingURL(source);\r\n var isDataUrl = sourceMappingURL.substr(0, 5) === \"data:\";\r\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf(\"/\") + 1);\r\n if (sourceMappingURL[0] !== \"/\" && !isDataUrl && !/^https?:\\/\\/|^\\/\\//i.test(sourceMappingURL)) {\r\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\r\n }\r\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot).then(function (sourceMapConsumer) {\r\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache).then(resolve)[\"catch\"](function () {\r\n resolve(stackframe);\r\n });\r\n });\r\n }.bind(this), reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n };\r\n })(SourceMap, StackFrame);\r\n\r\n //\r\n // Shared Variables\r\n //\r\n\r\n var scriptFile = document.getElementsByTagName('script');\r\n var scriptIndex = scriptFile.length - 1;\r\n var myScript = scriptFile[scriptIndex];\r\n var queryString = myScript.src.replace(/^[^\\?]+\\??/, '');\r\n var params = parseQuery(queryString);\r\n var paramsLength = objectLength(params);\r\n\r\n var debugSettings = {\r\n label: ' elmah.io debugger : On ',\r\n labelCSS: 'background: #06a89c; color: #ffffff; display: inline-block; font-size: 14px;',\r\n successCSS: 'background: #d4edda; color: #155724; display: inline-block; font-size: 13px;',\r\n errorCSS: 'background: #f8d7da; color: #721c24; display: inline-block; font-size: 13px;',\r\n warningCSS: 'background: #fff3cd; color: #856404; display: inline-block; font-size: 13px;',\r\n lightCSS: 'background: #e2e3e5; color: #383d41; display: inline-block; font-size: 13px;'\r\n };\r\n\r\n var defaults = {\r\n apiKey: null,\r\n logId: null,\r\n debug: false,\r\n application: null,\r\n filter: null\r\n };\r\n\r\n //\r\n // Shared Methods\r\n //\r\n\r\n var extend = function () {\r\n\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n\r\n // Check if a deep merge\r\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\r\n deep = arguments[0];\r\n i++;\r\n }\r\n\r\n // Merge the object into the extended object\r\n var merge = function (obj) {\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If property is an object, merge properties\r\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\r\n extended[prop] = extend(extended[prop], obj[prop]);\r\n } else {\r\n extended[prop] = obj[prop];\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Loop through each object and conduct a merge\r\n for (; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n merge(obj);\r\n }\r\n\r\n return extended;\r\n\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n function parseQuery(query) {\r\n var Params = new Object();\r\n if (!query) return Params; // return empty object\r\n var Pairs = query.split(/[;&]/);\r\n for (var i = 0; i < Pairs.length; i++) {\r\n var KeyVal = Pairs[i].split('=');\r\n if (!KeyVal || KeyVal.length !== 2) continue;\r\n var key = unescape(KeyVal[0]);\r\n var val = unescape(KeyVal[1]);\r\n val = val.replace(/\\+/g, ' ');\r\n Params[key] = val;\r\n }\r\n return Params;\r\n }\r\n\r\n function objectLength(obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n };\r\n\r\n function getSearchParameters() {\r\n var prmstr = window.location.search.substr(1);\r\n return prmstr !== null && prmstr !== \"\" ? transformToAssocArray(prmstr) : {};\r\n }\r\n\r\n function transformToAssocArray(prmstr) {\r\n var params = [];\r\n var prmarr = prmstr.split(\"&\");\r\n for (var i = 0; i < prmarr.length; i++) {\r\n var tmparr = prmarr[i].split(\"=\");\r\n params.push({\r\n 'key': tmparr[0],\r\n 'value': tmparr[1]\r\n });\r\n }\r\n return params;\r\n }\r\n\r\n function merge_objects(obj1, obj2) {\r\n var obj3 = {};\r\n for (var attrname1 in obj1) {\r\n obj3[attrname1] = obj1[attrname1];\r\n }\r\n for (var attrname2 in obj2) {\r\n obj3[attrname2] = obj2[attrname2];\r\n }\r\n\r\n return obj3;\r\n }\r\n\r\n //\r\n // Constructor\r\n // Can be named anything you want\r\n //\r\n\r\n var Constructor = function (options) {\r\n\r\n //\r\n // Unique Variables\r\n //\r\n\r\n var publicAPIs = {};\r\n var settings;\r\n\r\n function getPayload() {\r\n var payload = {\r\n \"url\": document.location.pathname || '/',\r\n \"application\": settings.application\r\n };\r\n\r\n var payload_data = [];\r\n\r\n if (document.documentMode) payload_data.push({ \"key\": \"Document-Mode\", \"value\": document.documentMode });\r\n if (window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth) payload_data.push({ \"key\": \"Browser-Width\", \"value\": window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth });\r\n if (window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight) payload_data.push({ \"key\": \"Browser-Height\", \"value\": window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight });\r\n if ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type) !== undefined) payload_data.push({ \"key\": \"Screen-Orientation\", \"value\": ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type).split(\"-\"))[0] });\r\n if (screen.width) payload_data.push({ \"key\": \"Screen-Width\", \"value\": screen.width });\r\n if (screen.height) payload_data.push({ \"key\": \"Screen-Height\", \"value\": screen.height });\r\n if (screen.colorDepth) payload_data.push({ \"key\": \"Color-Depth\", \"value\": screen.colorDepth });\r\n payload_data.push({ \"key\": \"X-ELMAHIO-SEARCH-isClientside\", \"value\": \"true\" });\r\n\r\n payload.data = payload_data;\r\n\r\n var payload_serverVariables = [];\r\n if (navigator.language) payload_serverVariables.push({ \"key\": \"User-Language\", \"value\": navigator.language });\r\n if (navigator.userAgent) payload_serverVariables.push({ \"key\": \"User-Agent\", \"value\": navigator.userAgent });\r\n if (document.referrer) payload_serverVariables.push({ \"key\": \"Referer\", \"value\": document.referrer });\r\n if (document.location.protocol === \"https:\") payload_serverVariables.push({ \"key\": \"HTTPS\", \"value\": 'on' });\r\n if (document.location.hostname) payload_serverVariables.push({ \"key\": \"Host\", \"value\": document.location.hostname });\r\n\r\n payload.serverVariables = payload_serverVariables;\r\n\r\n return payload;\r\n }\r\n\r\n function confirmResponse(status, response) {\r\n if (settings.debug) {\r\n if (status === 'error') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n } else if (status === 'success') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2714 ' + response + ' at ' + new Date().toLocaleString() + ' ', debugSettings.lightCSS, debugSettings.successCSS);\r\n } else {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created. Title should not be undefined, null or empty ! ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n }\r\n }\r\n }\r\n\r\n function stackGPS(error, xhr, jsonData) {\r\n \tvar errorStack = error.toString().split(\"\\n\")[0];\r\n \tvar gps = new StackTraceGPS();\r\n var promise = new Promise(function(resolve) {\r\n\t var stackframes = ErrorStackParser.parse(error);\r\n\t resolve(Promise.all(stackframes.map(function(sf) {\r\n\t return new Promise(function(resolve) {\r\n\t function resolveOriginal() {\r\n\t resolve(sf);\r\n\t }\r\n\t gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\r\n\t });\r\n\t })));\r\n \t}\r\n );\r\n\r\n promise.then(function(newFrames){\r\n \tnewFrames.forEach(function(stackFrame, i){\r\n\t\t\t\t\tif(stackFrame.functionName) {\r\n \t\t\tvar fn = stackFrame.functionName + ' ';\r\n \t\t} else {\r\n \t\t\tvar fn = '';\r\n \t\t}\r\n \t\tvar stackString = ' at ' + fn + '(' + stackFrame.fileName + ':' + stackFrame.lineNumber + ':' + stackFrame.columnNumber + ')';\r\n \t\tnewFrames[i] = stackString;\r\n \t});\r\n \tnewFrames.unshift(errorStack);\r\n \tjsonData.detail = newFrames.join(\"\\n\");\r\n \txhr.send(JSON.stringify(jsonData));\r\n });\r\n }\r\n\r\n // Private methods\r\n\r\n var sendPayload = function (apiKey, logId, callback, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n error = errorLog,\r\n send = 1,\r\n queryParams = getSearchParameters(),\r\n stack = error.error ? ErrorStackParser.parse(error.error) : '';\r\n\r\n // Ignoring error from an external script\r\n if (error && error.colno === 0 && error.lineno === 0 && (!stack || stack === '') && error.message && (error.message === \"Script error.\" || error.message === \"Script error\")) {\r\n\t\t\t if (settings.debug) {\r\n\t\t\t console.log('%c \\u2BC8 Error log: ' + '%c \\uD83D\\uDEC8 Ignoring error from external script ', debugSettings.lightCSS, debugSettings.warningCSS);\r\n\t\t\t }\r\n\t\t\t return;\r\n\t\t\t}\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"detail\": error.error ? error.error.stack : null,\r\n \"title\": error.message || 'Unspecified error',\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"severity\": \"Error\",\r\n \"type\": error.error ? error.error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error.error && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n \t// send message trying to pinpoint stackframes\r\n \tstackGPS(error.error, xhr, jsonData);\r\n\t } else {\r\n\t \t// send message\r\n \txhr.send(JSON.stringify(jsonData));\r\n\t }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendManualPayload = function (apiKey, logId, callback, logType, messageLog, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n type = logType,\r\n error = errorLog,\r\n message = messageLog,\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n if (type !== \"Log\") {\r\n\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": type,\r\n \"type\": error ? error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n } else {\r\n\r\n jsonData = error;\r\n\r\n }\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error && type !== \"Log\" && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n\t \t\t\t\t\t// send message trying to pinpoint stackframes\r\n \t\tstackGPS(error, xhr, jsonData);\r\n\t\t } else {\r\n\t\t \t// send message\r\n\t \txhr.send(JSON.stringify(jsonData));\r\n\t\t }\r\n\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n // Some public methods\r\n\r\n publicAPIs.error = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg);\r\n };\r\n publicAPIs.error = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg, error);\r\n };\r\n\r\n publicAPIs.verbose = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg);\r\n };\r\n publicAPIs.verbose = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg, error);\r\n };\r\n\r\n publicAPIs.debug = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg);\r\n };\r\n publicAPIs.debug = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg, error);\r\n };\r\n\r\n publicAPIs.information = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg);\r\n };\r\n publicAPIs.information = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg, error);\r\n };\r\n\r\n publicAPIs.warning = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg);\r\n };\r\n publicAPIs.warning = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg, error);\r\n };\r\n\r\n publicAPIs.fatal = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg);\r\n };\r\n publicAPIs.fatal = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg, error);\r\n };\r\n\r\n publicAPIs.log = function (obj) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Log', null, obj);\r\n };\r\n\r\n publicAPIs.on = function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx\r\n });\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.emit = function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.init = function (options) {\r\n\r\n // Merge options into defaults\r\n settings = extend(defaults, options || {});\r\n\r\n // Code goes here...\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n\r\n var errorLog = {\r\n 'message': message,\r\n 'source': source,\r\n 'lineno': lineno,\r\n 'colno': colno,\r\n 'error': error\r\n }\r\n\r\n sendPayload(settings.apiKey, settings.logId, confirmResponse, errorLog);\r\n\r\n return false;\r\n }\r\n\r\n };\r\n\r\n // Initialize the plugin\r\n publicAPIs.init(options);\r\n\r\n if (settings.debug) {\r\n console.log('%c' + debugSettings.label, debugSettings.labelCSS);\r\n }\r\n\r\n // Return the public APIs\r\n return publicAPIs;\r\n\r\n };\r\n\r\n\r\n //\r\n // Return the constructor\r\n //\r\n\r\n if (paramsLength && params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n // Immediately-Invoked Function Expression (IIFE)\r\n return new Constructor;\r\n } else {\r\n // UMD Constructor\r\n return Constructor;\r\n }\r\n\r\n});\r\n"],"file":"elmahio.min.js"} \ No newline at end of file diff --git a/elmah.io.javascript.nuspec b/elmah.io.javascript.nuspec index 83a15fc..92fb8da 100644 --- a/elmah.io.javascript.nuspec +++ b/elmah.io.javascript.nuspec @@ -1,7 +1,7 @@  - 3.0.2 + 3.0.3 elmah.io elmah.io elmah.io.javascript diff --git a/package.json b/package.json index f4cc845..2cb0da3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "elmah.io.javascript", "description": "elmah.io javascript logger.", - "version": "3.0.2", + "version": "3.0.3", "repository": "https://github.com/elmahio/elmah.io.javascript", "license": "Apache-2.0", "main": "dist/elmahio.js", diff --git a/src/elmahio.js b/src/elmahio.js index 62951ed..a8593bf 100644 --- a/src/elmahio.js +++ b/src/elmahio.js @@ -1,5 +1,5 @@ /*! - * elmah.io Javascript Logger - version 3.0.1 + * elmah.io Javascript Logger - version 3.0.3 * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io */